Commit graph

10 commits

Author SHA1 Message Date
Dag-Erling Smørgrav
c6536641c5 Major cleanup of the MD and SHA digests.
- Use the new vector byte-order conversion functions where appropriate.
- Use memset_s() instead of memset() where appropriate.
- Use consistent names and types for function arguments.
- Reindent, rename and reorganize to conform to Cryb style and idiom.

SHA224 and SHA256 were left mostly unchanged.  MD2 and MD4 were completely rewritten as the previous versions (taken from XySSL) seem to have been copied from RSAREF.

This breaks the ABI as some context structures have grown or shrunk and some function arguments have been changed from int to size_t.
2017-04-06 19:51:46 +02:00
Dag-Erling Smørgrav
b77cb1aeb4 Tidy up the headers a bit and make them C++-safe. 2016-10-03 12:31:16 +02:00
Dag-Erling Smørgrav
06a757e878 Big reorganization and cleanup 2016-09-04 14:56:39 +02:00
Dag-Erling Smørgrav
479ffbba4a Remove author and sponsor tags; we'll deal with that some other way.
Remove $Cryb$ tags as it is likely that the code will move to git.
2014-08-01 14:31:07 +00:00
Dag-Erling Smørgrav
910c782b2f In the md4 code, use a 64-bit counter to avoid a manual carry operation. 2014-07-12 22:10:57 +00:00
Dag-Erling Smørgrav
340b3240cf Consistently use const void * for data and keys, uint8_t * for digests
and MACs, and uint8_t, uint32_t or uint64_t (as appropriate) for internal
state.  Also remove a few unnecessary casts.
2014-07-12 21:57:31 +00:00
Dag-Erling Smørgrav
30c8e19de7 Remove HMAC-MD2 and HMAC-MD4. They may or may not reappear at a later
date in libcryb-mac.
2014-07-11 13:54:22 +00:00
Dag-Erling Smørgrav
729e501b79 Mechanical whitespace cleanup 2014-07-11 13:40:06 +00:00
Dag-Erling Smørgrav
b0ff5af2ba Clean up headers and typedefs.
Fix context length in the algorithm descriptors.
Expose the block length and include it in the algorithm descriptors.
Complete the list of available digest algorithms.
2014-07-10 18:09:47 +00:00
Dag-Erling Smørgrav
593125c353 Import sha256 from libcperciva
Import md2, md4, sha384 and sha512 from XySSL
2014-07-10 14:51:07 +00:00