Table of Contents
16.12.2024: Add KMAC128, KMAC256, KMACXOF128, KMACXOF256 These are taken from NIST SP 800-185 SHA-3 Derived Functions, December 2016, including test vectors. They include a so-called custom string besides the key. KMACXOF128, KMACXOF256 can produce extendable length output. The KMAC prefix to SHA3 only supports ASCII keys.
30.08.2024: Add HMAC to SHA3-224, SHA3-256, SHA3-384, SHA3-512 This includes also test vectors taken from NIST SP 800-224 Keyed-Hash Message Authentication Code (HMAC): Specification of HMAC and Recommendations for Message Authentication, Initial Public Draft, June 2024.
27.08.2021: Convert from autotools to cmake build environment Because the autotools have not been consistently maintained in the past few years, the build environment has been converted to cmake. See the INSTALL instructions on how to build fehashmac.
07.09.2016: Replace SHA3, keccak with new code base
02.08.2016: General cleanup. One potential buffer overrun in keccak has been fixed. The code has been checked against STACK for null pointers, three finding have been fixed. Doc has been reorganized. A shell script, md5sum2md5 has been added to convert from md5sum syntax to md5 style.
11.07.2016: MD6 algorithms have been added. md6-224, md6-256, md6-384, md6-512, although they had been retired from the SHA3 competition. Performance comparisons are available in the Doc directory.
29.02.2016: SHA3 algorithms are now based on FIPS 202 issued August 2015. shake128, shake256 support now extendable length output, the previously defined algos xofshake128, xofshake256 are now superseded by shake128, shake256 and are therefore abandoned.
20.05.2015: KMAC implemented for SHA3 algorithms and XOFs. README updated. Algorithm kmac-all selects all algorithms that support KMAC, all-b64 selects all algos that support Base64 encoding, and similarly kmac-all-b64. The KMAC key can either be an ASCII string (up to 253 bytes long, --key=xxx) or a hex string (--hexkey=nnn), whose length in bits may be specified with --keylength=bbb (max value 254*8-1= 2031 bits).
01.05.2015: Extendable Output Functions (XOFs) xofshake128, xofshake256. Output length can be specified to an arbitrary number of bytes up to 9 Exabytes or infinity. BASE64 output is OK.
27.02.2015: BASE64 support for SHAKE. SHAKE can now produce BASE64 output.
18.01.2015: SHA3 performance:
SHA3 is now implemented based on the
KeccakWidth1600Opt64LCu6 version in the
KeccakCodePackage (downloaded on 11.12.2014):
$ git clone https://github.com/gvanas/KeccakCodePackage
This version gives good performance both
on 32 and 64 bit Intel platforms as well as on an
AMD GEODE based appliance. Reports about other platforms
like SPARC are welcome.
02.01.2015: The 6 SHA3 algorithms are now supported, based on the Draft FIPS Pub 202 (May 2014): sha3-224, sha3-256, sha3-384, sha3-512 and the two extendable output functions (XOF) shake128 and shake256. Test vectors are included. Our implementation is based on the reference implementation, a more efficient implementation will follow in an update.
28.01.2012: Multiple algorithms (including HMACs) can be specified simultaneously. The data files are read only once, and all hashes are calculated in parallel. As an option, algorithm "all" expands to the list of all known algorithms, which are thus calculated in parallel for each data file or string. Likewise, algorithm "hmac-all" expands to all known HMAC algorithms. The results of the --check option and the test cases are nicely summarized.
29.03.2011: Support for the sha512-224 sha512-256 algorithms
14.04.2011: HMAC test vectors added for MD5, SHA1, RMD128, RMD160. List of algorithms is now sorted alphabetically.
13.04.2011: Support for all SHA-3 finalists: BLAKE, GROESTL, JH, KECCAK, SKEIN for 224. 256. 384, 512 bits hash length, SKEIN also for 1024 bits. They all support bitwise operation, bitwise test vectors are included (taken from the SHA-3 submissions). HMAC support upgraded to FIPS PUB 198-1 (2008), HMAC test vectors added for sha{224, 256, 384, 512}.
FEHASHMAC is a collection of publicly known hash algorithms integrated into a command-line utility. FEHASHMAC also contains a set of known test vectors and results for each algorithm such that the correct implementation for each hardware platform and compiler version can directly be verified.
FEHASHMAC supports bitwise hash calculation for algorithms with available bitwise test vectors. Currently this applies to the SHA algorithms: sha1, sha224, sha256, sha384, sha512, and to the SHA-3 algorithms: sha3-224, sha3-256, sha3-384, sha3-512, shake128, shake256. The so-called Gillogly bitwise input has only been tested for sha1, but is also implemented in the SHA-2 hashes.
Bitwise hash calculation is also supported in sha512-224, sha512-256, whirl, but there are no bitwise test vectors available.
FEHASHMAC can also calculate hashed message authentication codes (HMAC) as specified in RFC 2104 and extended to arbitrary-length keys in FIPS PUB 198-1. The HMAC key can be specified as an ASCII string or as a hex string, and HMACs can be calculated for files, strings, and hex strings. For SHA3, the KMAC message authentication is available, not HMAC.
To simplify usage, symbolic links with the algorithm name allow to call fehashmac without the -a option. A prepended hmac- will automatically enable HMAC mode. Likewise with kmac- and -b64 for KMAC and Base64.
Hashes and HMACs/KMACs of files can be verified with the --check option.
SHA3 supports now both HMAC and KMAC . (Gilles van Assche, private communication, 11.12.2014, and NIST SP 800-224, June 2024).
$ fehashmac -a md5 -s abc # fehashmac -a md5 -s abc hmacflag, kmacflag, kmacxxxflag = 0, 0, 0 DigestString: abc md5 ("abc") = 900150983cd24fb0d6963f7d28e17f72
or shorter: $ md5 -s abc
$ fehashmac -a md5 -M 0123456789abcdef # fehashmac -a md5 -M 0123456789abcdef hmacflag, kmacflag, kmacxxxflag = 0, 0, 0 a1cd1d1fc6491068d91007283ed84489
$ fehashmac -a sha256 /etc/passwd /etc/group /dev/null # fehashmac -a sha256 /etc/passwd /etc/group /dev/null hmacflag, kmacflag, kmacxxxflag = 0, 0, 0 sha256 (/etc/passwd) = 125f6f2c9316d2cd9e40bc2bbc414af6a52f29fb69f55dfd90200595e3188e4e sha256 (/etc/group) = dc169e84c2634d7244a36ae15d3c21711842d81efcb0eb2320c80167d00be172 sha256 (/dev/null) = e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
or shorter: $ sha256 /etc/passwd /etc/group /dev/null
$ fehashmac -c some.sha256 # fehashmac -c some.sha256 hmacflag, kmacflag, kmacxxxflag = 0, 0, 0 /etc/passwd: OK sha256 /etc/group: OK sha256 /dev/null: OK sha256
Summary: -------- Lines read: 4 Hash entries read: 3 Files found: 3 Files OK: 3
where some.sha256 contains the output of the example above.
$ fehashmac -a hmac-rmd256 -K Boss -s 'Yes,we can!' # fehashmac -a hmac-rmd256 -K Boss -s Yes,we can! hmacflag, kmacflag, kmacxxxflag = 1, 0, 0 key ("hmac") = "Boss" DigestString: Yes,we can! HMAC with string "Yes,we can!" hmac-rmd256 ("Yes,we can!") = 2b2a8cf6cfd56b54d3a80a2067edff63d14ed06ef3c26b1ac972bba224274c89
or shorter: $ hmac-rmd256 -K Boss -s 'Yes,we can!'
$ kmac-sha3-224 -K Boss -s 'Yes,we can!' # kmac-sha3-224 -K Boss -s Yes,we can! hmacflag, kmacflag, kmacxxxflag = 0, 1, 0 key ("kmac") = "Boss" length ("kmac") = 4 DigestString: Yes,we can! KMAC with string "Yes,we can!" sha3-224 ("Yes,we can!") = f32ebb35eddce6acc40472401405aa20b6e0394b4325a8ad3ccdb862
$ hmac-tiger2 --hexkey=fedcba9876543210 /etc/passwd /etc/group /dev/null # hmac-tiger2 --hexkey=fedcba9876543210 /etc/passwd /etc/group /dev/null hexkey ("hmac") = "fedcba9876543210" hexkey ("kmac") = "fedcba9876543210" hmacflag, kmacflag, kmacxxxflag = 1, 0, 0 hexkey ("hmac") = "fedcba9876543210" hmac-tiger2 (/etc/passwd) = 91139606d8d82e87cc2cdb8bf9a94f5f4c422a2d975839ac hmac-tiger2 (/etc/group) = b094610de5fa21cee27c2d82cf528f866c60ab7cbc2d61de hmac-tiger2 (/dev/null) = 5b6a8380f59ecc8b3a97ce6be78c762fa16e30dbe2216e96
$ kmac-sha3-256 --key="ASCII key string" /etc/passwd /etc/group /dev/null # kmac-sha3-256 --key=ASCII key string /etc/passwd /etc/group /dev/null key ("hmac") = "ASCII key string" key ("kmac") = "ASCII key string" hmacflag, kmacflag, kmacxxxflag = 0, 1, 0 key ("kmac") = "ASCII key string" length ("kmac") = 16 kmac-sha3-256 (/etc/passwd) = 0572e5737a46cfa6c7b21192bf9a798cd7fb855f7cf1e847be652d0a229c81da kmac-sha3-256 (/etc/group) = 07428f5b7368fd6411c9260b65746739f1584ec0130e9ff5e9435d6307585a84 kmac-sha3-256 (/dev/null) = 822e4429cdb9468d3502aeb2728f8fc7a147e17ea6f2be2eca724add2440ae34
$ fehashmac -a kmac128,kmac256 --hexkey=deadbeef --custom="ASCII custom string" /dev/null # fehashmac -a kmac128,kmac256 --hexkey=deadbeef --custom=ASCII custom string /dev/null hexkey ("hmac") = "deadbeef" hexkey ("kmac") = "deadbeef" customstring ("kmac") = "ASCII custom string" hmacflag, kmacflag, kmacxxxflag = 0, 0, 2 hexkey ("kmac") = "deadbeef" customstring ("kmac") = "ASCII custom string" kmac128 (/dev/null) = 65886164d46a1b4e6d3cf5baa8a23efe3c41395008dae2329b27f3c116f0c23a kmac256 (/dev/null) = 923a741240ef3632921d1e57616276773a959f23eae2547f8db8dbab8be5b285597f22f15b6a790f7c03d795c8d1f3bd3e6e24c5ed4f8c9c5771766c96cd1a15
$ fehashmac -a kmacxof128,kmacxof256 --hexkey=deadbeef --custom="ASCII custom string" --xoflength=256 /dev/null # fehashmac -a kmacxof128,kmacxof256 --hexkey=deadbeef --custom=ASCII custom string --xoflength=256 /dev/null hexkey ("hmac") = "deadbeef" hexkey ("kmac") = "deadbeef" customstring ("kmac") = "ASCII custom string" xoflength ("Bytes") = 256 hmacflag, kmacflag, kmacxxxflag = 0, 0, 2 hexkey ("kmac") = "deadbeef" customstring ("kmac") = "ASCII custom string" length (xof) = 256 kmacxof128 (/dev/null) = a47e36290670707d92868e428938fcdb6fa1c857fc7fee2defa74e49c6b8f8f39e5c7aca5258e9dd66ee7c8798dd6a2b67c3053aa1ec9964e75e3ec93db4e8a43e9307bbfa1b74de0c1e08feae394e4dcdc3bb1b494a85e9fc4bd702ce5c30de00a604b9f81dbbb628fe058e8f133a6cd42c6eff563da6ea57b1419993582177a522b0b50bae2191e0d394a8bb001a783ae9158dea2734fd1d0fc55e932d0d549a04a358893594427a11a02a2c1f3cbd50877ec2765759f5bdfbc75f524368c27372de24adb241252ce8835d4f5056db1efb7a29ccc8d6e6a85f7ebf9d5e361eccf774702769591529bc2e875e7834001912fff6f2ca28dba2f0a49ac6486916 length (xof) = 256 kmacxof256 (/dev/null) = 2cca1f89a2fa1d56791f91af76d124cb4ffa0999b07499e7543fa726eb7055d1744a8aa7913b420e3dfe6df789c4198566993c6b4aed94db8083c73106f90faef3ff790bf7de5f73b77770dec694810f66b971d4b9e3dff193a2d3fbac2e2cb85ab0362cf78b0c1f82fd85c66ba1b97f06c3b694aa502be0e3643b0a8d2ee0fa3cdeb249c914c3777fd4531973a1d3706eed06c7f3a3ef71fa6b4b0a8e8f3244d371f236bc9a678f53724cd9569cd6301163c6e2f2a5a9faf3bb53c5dab3df2fd1bc8cb8321d7a721fadd72d855659ad3cf22f266bf3c5f1d609ddc0f142902216c87ca18a636c554844c463c2747a98a7587d26322c43c8fbf99333a32d96ce
$ fehashmac -a sha256 --hexstring=98 --bits=5 # fehashmac -a sha256 --hexstring=98 --bits=5 hmacflag, kmacflag, kmacxxxflag = 0, 0, 0 8f136783ea6f000dccc4295d4db99b648f1c8f483b27248db103ba7cd567dbba
Two hashes of some files, each file is read only once
$ fehashmac -a md5,sha256 /etc/passwd /etc/group # fehashmac -a md5,sha256 /etc/passwd /etc/group hmacflag, kmacflag, kmacxxxflag = 0, 0, 0 md5 (/etc/passwd) = 9d070d044ee85c344065e68bd5132d5c sha256 (/etc/passwd) = 125f6f2c9316d2cd9e40bc2bbc414af6a52f29fb69f55dfd90200595e3188e4e md5 (/etc/group) = 95034b2a13cd528f3616a3b32b40b9be sha256 (/etc/group) = dc169e84c2634d7244a36ae15d3c21711842d81efcb0eb2320c80167d00be172
$ fehashmac -a md5,sha256,hmac-md5,hmac-sha256,kmac-sha3-384 --key="Jefe" /etc/passwd /etc/group # fehashmac -a md5,sha256,hmac-md5,hmac-sha256,kmac-sha3-384 --key=Jefe /etc/passwd /etc/group key ("hmac") = "Jefe" key ("kmac") = "Jefe" hmacflag, kmacflag, kmacxxxflag = 2, 1, 0 key ("hmac") = "Jefe" key ("kmac") = "Jefe" length ("kmac") = 4 md5 (/etc/passwd) = 9d070d044ee85c344065e68bd5132d5c sha256 (/etc/passwd) = 125f6f2c9316d2cd9e40bc2bbc414af6a52f29fb69f55dfd90200595e3188e4e hmac-md5 (/etc/passwd) = b3fe4bb74a2419cb11a1ae1d0de8d193 hmac-sha256 (/etc/passwd) = bd4c8888b087e0da8893757a980fbc7208a7413f198f977fff83c0bbe83955e9 kmac-sha3-384 (/etc/passwd) = 9ad7c08c1af062f751c0e3f13cdc924ad6486bc698d6275fa8dfa666455062f6c26d8cc6511ece879074144a00c930b2 md5 (/etc/group) = 95034b2a13cd528f3616a3b32b40b9be sha256 (/etc/group) = dc169e84c2634d7244a36ae15d3c21711842d81efcb0eb2320c80167d00be172 hmac-md5 (/etc/group) = 9769085bb1b3a14427135fc978ba60da hmac-sha256 (/etc/group) = 130f080ffda68c48aadeeec69eb31b839e7a9c7f4458ba66b83998db3b0f71ec kmac-sha3-384 (/etc/group) = c16bb9b16b3e3db329bd8d978dfeaf77049feb277ccc5329cfa127ab0bab0f48773749916523686b268496d5fe731a1e
The default output length is 512 bytes, it can be modified by the --xoflength=nnn parameter, possible values are up to 2**63-1 or -1 for infinity. Base64 output for any desired length is supported.
$ fehashmac -a shake128 /etc/passwd /etc/group # fehashmac -a shake128 /etc/passwd /etc/group hmacflag, kmacflag, kmacxxxflag = 0, 0, 0 length (xof) = 512 shake128 (/etc/passwd) = ecf5a9fbf1debfe103dd9126fe804f1840dbc65a1418fb40bd410d06b0d2b7aa57ea3f52cfd14ad9f627c24540ef3a6adacf8f1b7e07706b22a1528dc36fd0c8315c360192001e34a933833aa18c33c59a0c1221e32947d3b6c9301d464a1b05de1442944137846151e447c8f5bf40da405523ff8ae6a2b265d24448eb86823d9c437ecbd186abc59549abdd990a6f66c0b17e62dc492566d2d52a2e079c7d1d9b1e179ef5589377337a32221e06e9ec50f7b047b4a0ee9dea7abc6f223a2242c4255eb4a8da62a80ecf9e6dc3012567b0e27c2b06ae0b365ee4da0c67b701532b70599f34d6be45ede48335280f9648dadb1bf4d91b3a34657edd621e6eadf1e7c641b4ddc4c9258ca3a875a16e1a57b1b08e69032ccd022aa857e49c52c994bda881a5bf9f04e9bbe52377db409d95788944b70b5d9250b6ea4bd558cf301c757600751a6768b4b1440db6c77a6a5a5d86cf8372728ed7a5f671e572d0cdc93d58d83cefd5b0a556b9a94c4221bffd78441b66ae50404043a0465fbb3257c4a381535cb931fb2f622660b63ad840acc1bfdb49bd33ec6718ebea6e30ca552477b600e7593202340004a364de0b31b1e1ad85ec01bcad4976de1d31167a84dc92b6cbc8ca8f2618d8faea45463978054e00098a263ea99dcd4a04a9ebfea5ba71f2201b683ccc5abdcce0be4613b7e949da6d95158daac1dd3959ee6c011053 length (xof) = 512 shake128 (/etc/group) = 58e8bed5a1a1645905add8ffa9bb2672dc2d4437c4d573b5db043c3301e4daebca322f2f7f3cb6ccd6ab2ca96dd13264f2a93cb1a6ceab7b09297dc97fc78247efe5251265eeeb1ca09f50a113659d0b96ec8b759ef52ba7baad012551c37d418ff95f46c8c0a266e410a3d60af7565fab530c173c0b8abf254f2934085458419fd2730f1bceddb0226c41ecd7f0b42587dd07d732cdd54f3e0f9b6a6a36dd4928eb1a7350e5783a1008c0e325e3897d281cc42700547dd36cdb34661d3f66b43eac2cd57c8d3f1d527febd547b3736595571075215029324f406b0a154cd382f7db7e7ea9b29b028056249a294ba3d5f68ca481df15ad0f97c19fbb90f6bab8d1b1904559b57849ec47b618b7367b1b31c8d90910b39d4843e70223c9fd8032f56ceb1e6b3826cd2d791ab43eab48414203e10c2dfe51515660e6f852a1d00c23d2f2046324ae403b6650addde217f4e5005b360858d9227d73ad35a62f41143fb46ae9b8e718dcc799caa7957ceaa5d5a214aee43cedbd1b05b1e5675ba1403012c46bb5be4c93eed8c61b3fdee9fa64eb20ccb2ea98c07acac92f2aec06bfc26fd5fdde8e2d7648504822e393cbb35d8e5f91e328d025db1b583c234c45a6dd27df242d2e52162c2aef3694eee9031452e9484a08a19a933495feec3b358b59febca15e86e210a4194655ccd5c9d7cd75cd6c14f0996fbf87ad52fff574ad
$ fehashmac -a shake128-b64 --xoflength=64 /dev/null # fehashmac -a shake128-b64 --xoflength=64 /dev/null xoflength ("Bytes") = 64 hmacflag, kmacflag, kmacxxxflag = 0, 0, 0 length (xof) = 64 shake128-b64 (/dev/null) = f5wrpOiPgn1hYEVQdgWFPtc7gJP277yI6xpurPpm7yY8se6piABLkxA8+wru/SpobgH6Sljoo2OcqKHj+a5X4g==
$ fehashmac -a shake128-b64 --xoflength=211 /dev/null | fehashmac -c # fehashmac -c hmacflag, kmacflag, kmacxxxflag = 0, 0, 0 /dev/null: OK shake128-b64, match truncated to 211 bytes
Summary: -------- Lines read: 4 Hash entries read: 3 XOF lengths found: 1 Files found: 1 Files OK: 1
$ fehashmac -a all /etc/passwd # fehashmac -a all /etc/passwd hmacflag, kmacflag, kmacxxxflag = 0, 0, 0 blake224 (/etc/passwd) = dc0420848a7ce597d84f09e9a8ec931d9551487b5301bbf909d8a849 blake256 (/etc/passwd) = 72164c20c405e4d30d07b26d74bae7fd3cbb820bdfe1dd1ca1e32eedce1c8dcd blake384 (/etc/passwd) = 4c7088c0a75a0a0de3f71df8dcd07265f67a10298fb90fcf2c782afb9d7f7ceaaf6fa8c3b5b7a8c129df4eb61d64a5e3 blake512 (/etc/passwd) = 76e66a4bb0bee4689fdeded016d3789fdcf68d859f0443e90ee3c95b8d6baa0cf30de3f3c0f7bb26495da66a1f2c01e39679e3a3d3743b7100105e9a7109bce5 gost (/etc/passwd) = f7e6ffcc8b6f5a1740dd477b0b32402ba680a0e64290163f758270923397b9e3 groestl224 (/etc/passwd) = 08927c3a04d3ee88c0ee13d5081a5f74776897e16b0d326dbe4390c7 groestl256 (/etc/passwd) = 7d5e0458c6c5ec5a5f24acabe90a0de9bfc42d24ffaac4c8e8517d7383e9f65a groestl384 (/etc/passwd) = e7fb7710e30203fd0d660e8c68850cc1b69ebd7dcf8a7e16e652ceefc3b2c1e3fd2ee050bbeecaab79038be6dd66cad3 groestl512 (/etc/passwd) = d05efc3ddb01db5676a08f853f688ee31d29bfd1980137daf1003dedb6c3b91141f6ef8bdc8e3fd410b33134ea3aedca79442f0946df331f8e814c5d11f4994c jh224 (/etc/passwd) = 2fe671990acd31e384e8240cde58a3dee5d3a846d6d2e87336f8b54b jh256 (/etc/passwd) = 574d1f95dff00cd307ade561258dd4690a1fec9502a6051ecb8006a9fbae81fa jh384 (/etc/passwd) = 963a46512512e29c1ef81a62811a36aabfe7e59d9a3af509bd6be60e0ba610a30a47f2315769bddf830bc1f96cdeef37 jh512 (/etc/passwd) = a23209c81bc68579bf4ceb414b02ae84ef2b09601ea2d23fdbc9fc31bb2a88daa62d7685ac657108d934f5873fc403fa4d12b242bce3db468287fa514f0cb9b2 keccak224 (/etc/passwd) = 4f372cfbdfc45a6e19aa80c05fda8a6a33a8624753b8805782e4e30d keccak256 (/etc/passwd) = 0732935c89d33b8cbdef8ec429ae5bc0aeba24269d0672f03becd88cc448975b keccak384 (/etc/passwd) = e2654a844621dc6697f07582f45b70b2ab43f9a0b0021844cd4f55098d3b9adbdbb90d4f52bf5d6a7c0ae1278ff290e7 keccak512 (/etc/passwd) = 077ce91d9623e171d1a5de00b1b9f707abab6326dcb6957afdb645237b982e1bfeb4d72096c9305644eef13d58f2f90beb0a23b95a802b2a21d6ff4a0bfc771e kmac128 (/etc/passwd) = 6ff0cc74444ccb91ad92956a4f9e3aa4498dccd9628a646203d5733656a13427 kmac256 (/etc/passwd) = 551983df81a228b55e9b9f59fde5e5f40f35c597a5b1b1e9c839cbf4694065f5bd271bc54fceacfd4ebbc6a71e5c5be1d01f1aeddcc35dde7b405197abb7386c length (xof) = 32 kmacxof128 (/etc/passwd) = c40cccadb2ccd963c86fdbad9157b5af08a3c87f7a536ed1416efe4aa89c32c3 length (xof) = 64 kmacxof256 (/etc/passwd) = e02ca3070d1d113fa25c4028184d007d986a50e71e487845c828bf177e83f832b3cf212df34e74b3fb7fc38ad5052e364555d7ccbc164aefaed4db1aac353f18 lash160 (/etc/passwd) = b5296561fae80c7e3491c4079384113b70c68b74 lash256 (/etc/passwd) = 175036ee4ef405a802287595f142ab3bc21579c5135d56a4e626caccaf262817 lash384 (/etc/passwd) = 0d7ef7bec86ce5fc045bda38b4edf1f1b9eeded253170a38bf6988b449eefb40f29de161b651fbb3d338def62ed9c39c lash512 (/etc/passwd) = 328f172c447af3a4051f48296ef543c86ebd0e2e38c791937f06cc926a802d2e964c198fcf013bd4c088744b2c4a938f12bb7b75123112ab71c69ceffcf9d800 md2 (/etc/passwd) = e362f2257eedc7a3fc03bebb95dcbb80 md4 (/etc/passwd) = 9f5c3331b2cfc3767f9b70f6d6e922df md5 (/etc/passwd) = 9d070d044ee85c344065e68bd5132d5c md6-224 (/etc/passwd) = 29321165e5ae0b46566608f17c83a42feeb8179cea2504f542e50d46 md6-256 (/etc/passwd) = 8e422ea221f961cdd33768f5dacf1d411603eaf17aa4b087424848bb669e29aa md6-384 (/etc/passwd) = 17f72cf8cb9496fb65ec48eddaab165eec6482cc28201bd81bbe96283924b66d160dd4fb8dad578459f2d7f0db83628d md6-512 (/etc/passwd) = 82f05a0c45867071814bd33e93df910752aaf56048a2466fa6571b581fc04a6dc822ce0d67dc6315268b46f58fb9dcaf586767dc2397409f794c673d820a2ac1 rmd128 (/etc/passwd) = 742cab0cca93aa5b9bdcd1bfbe42ca21 rmd160 (/etc/passwd) = 0334d6924c01a446e49765d7bed7ae0df3641a60 rmd256 (/etc/passwd) = 679e8705da7d1b57fd14f84c890920038c3d89bf80d695bb5d93aeff16333d30 rmd320 (/etc/passwd) = 91704e77e6708ec36cf56c3ce2543092b7ea9c30258d71f17196003357353c63ed2459ab1ba42dfa sha1 (/etc/passwd) = 893c077218cee0bd78cf7961f953f3c9eaf48f7b sha224 (/etc/passwd) = 3e3a77974c53c45acb911d8720361b77e85703186cb3c0dc16f29040 sha256 (/etc/passwd) = 125f6f2c9316d2cd9e40bc2bbc414af6a52f29fb69f55dfd90200595e3188e4e sha3-224 (/etc/passwd) = 47f49d39d4872dfd11ff44d95309c6a71e7530c38538ef650a2a696f sha3-256 (/etc/passwd) = cc3778c994e67c6a3b1614f7d1a4df3d90d21035ec3c67b89eed0c85a433c47f sha3-384 (/etc/passwd) = 689f9ed04f756cb931001a60b54c9905db17e99849c776737bf01b4d1085ba6f766963b63e66ac2281d4559ebc453d80 sha3-512 (/etc/passwd) = 2db5c2413f216a2a033f023e559fc55cf532d97a19d9aeff92b5d4e3ef43b635ac69c4808cf56d81dbac3331e870ee5b7128886367cf5f2343023c3cabe155e5 sha384 (/etc/passwd) = 5d9698a39de53c78c8abaf41d50a80c0c2dd15231b4f8a4d07d7b86544457e05b38a310aaed04c444333ef06d8d0e59f sha512 (/etc/passwd) = 81c489123e1dd3f4195cb2e193b7ac34bc8a2d8668a42321554a2812bd2aa9a56b3553045d47f611ae09210314f79037eb9d8d98cdf72db6e1f2efe0ecaf7877 sha512-224 (/etc/passwd) = cf6358017e03e5a3dd8ac25c8f735a6b1b9274931ae271b0cf7a9f0c sha512-256 (/etc/passwd) = a3a92cf636cf593c25453c616b175411282c65c29378261c90c7b85801c9a814 length (xof) = 512 shake128 (/etc/passwd) = ecf5a9fbf1debfe103dd9126fe804f1840dbc65a1418fb40bd410d06b0d2b7aa57ea3f52cfd14ad9f627c24540ef3a6adacf8f1b7e07706b22a1528dc36fd0c8315c360192001e34a933833aa18c33c59a0c1221e32947d3b6c9301d464a1b05de1442944137846151e447c8f5bf40da405523ff8ae6a2b265d24448eb86823d9c437ecbd186abc59549abdd990a6f66c0b17e62dc492566d2d52a2e079c7d1d9b1e179ef5589377337a32221e06e9ec50f7b047b4a0ee9dea7abc6f223a2242c4255eb4a8da62a80ecf9e6dc3012567b0e27c2b06ae0b365ee4da0c67b701532b70599f34d6be45ede48335280f9648dadb1bf4d91b3a34657edd621e6eadf1e7c641b4ddc4c9258ca3a875a16e1a57b1b08e69032ccd022aa857e49c52c994bda881a5bf9f04e9bbe52377db409d95788944b70b5d9250b6ea4bd558cf301c757600751a6768b4b1440db6c77a6a5a5d86cf8372728ed7a5f671e572d0cdc93d58d83cefd5b0a556b9a94c4221bffd78441b66ae50404043a0465fbb3257c4a381535cb931fb2f622660b63ad840acc1bfdb49bd33ec6718ebea6e30ca552477b600e7593202340004a364de0b31b1e1ad85ec01bcad4976de1d31167a84dc92b6cbc8ca8f2618d8faea45463978054e00098a263ea99dcd4a04a9ebfea5ba71f2201b683ccc5abdcce0be4613b7e949da6d95158daac1dd3959ee6c011053 length (xof) = 512 shake256 (/etc/passwd) = e8cbb4beb75cee8baca6e829bf211d9a2e3bcda872c1460aa160bf46bae6c3c042a8b891684ca46d5144e51900a14af60435f6f0efea89801cd973ec5f3f40a0e462aed142230451bfc42ddf4973461f97ace9584f1252ab1f161ee80065d5a9c8d0148d59aad8c984c712a304215a2be5a1afa2ca778d6157f3fd72cb8025eb5615d159c3af306525ae102d2c6bfae839538eaf1ee8a8fbf04fd31529b596ab94c239a1011be0d1e963249f34670c9085c6e689dac067ba393aa8b822c89551544275eafaf40fff7575b667a1accf44c6e648aadd10fab983917cfea7045221935a9fd81f3cf38e7b1f46048dff86089d9fa4a40ada62d3096ed71752b919b8d73e0b58bf0cecb1e5cdf67340c800c115ac83f60ddb409d620908f925a08b55d8480fd51339cc7af99e1f70749b90bfa91237c90e680f60a69a72265e44c78a93ce3f8f93020e318542278eb1dec7989e0779e6a25ff9c47fa12cbfd609b6887ab568a3959562ee9a2a8f6c80d55dc03c22cb801686b22be99ef8c10e01a8504ff09b7cd711b24fbcdc8083cd2e94be477c34a2026589a43c2fdd5678748a675c495faae1798c55441349c44db2cfc964c6902ec8bfd4c5d0f27a5830213154b6c45901693579433827cb9f0e9a655e1caa71e7f32d2bed40029db616e352576d914aae7e7275cd94de7f7f8334a1e37347235772aaab810cdd037afbdff9ee skein1024 (/etc/passwd) = 62fa3c2dd5218b4f4f1d4d2f6b484e2f46682d124698ee67a3f923e55c7678293cece6ac71aefb5d0725b843bb9d764b1c6376de6c2d06b9fe96afea4e12c682846e152dd1bf1b3f91355a2f22f4a52ccf9de2967b01802f44096784977668de88ba4aaa907f5c1ca0599ec863848cb04a710b9345ea48f4b77d73d13ee04f85 skein224 (/etc/passwd) = 3dc4ea8a834624dde7a9072636c9c69be876561975f3f443c7f7ac83 skein256 (/etc/passwd) = e1583b662d7495e37128209ef6f4d5f1c7cba8dd5a4eedb4cb1aacb47aed5ebc skein384 (/etc/passwd) = 15b16e9fba7c12205fa44755abd2552455ed142ed903e649dcbfac44cdb8547ea8ba4cc3d62f1a0ca0e50389b3cda9e6 skein512 (/etc/passwd) = 897be93211bea725e341f85fae123e38196f662fd6722d3a50c664f52b6c168049fee125f3395c53fd1d42461094460b614960a68d02abee446faa1148b24b2f tiger2 (/etc/passwd) = 3aed8c4ef17df316c88cb7442f9edb386142f7b50ad584e8 whirl (/etc/passwd) = 87adb2a8368f717284d24d3be3bc49a573b50a95c28d8e460e0c8a126ed99d61b0e180c37e1ffedae5e4daff25b75a9cf1a8614444de5306bf81d0963057ca91
If you wish to include all Base64 encodings, use
$ fehashmac -a all,all-b64 /etc/passwd
sha256 has tests for byte and bit strings and HMAC
$ sha256 --test # sha256 --test hmacflag, kmacflag, kmacxxxflag = 0, 0, 0 sha256 Test Suite: sha256 ("abc") = ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad OK sha256 ("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq") = 248d6a61d20638b8e5c026930c3e6039a33ce45964ff2167f6ecedd419db06c1 OK Tests passed: 2, tests failed: 0.
sha256 Bitwise Test Suite: sha256 ("hexstring=C0, bits=2") = 1e1cea10a23697dc97b423c259842ac12ee679d6b43f088f3c32b26dbbfb0d79 OK sha256 ("hexstring=C0, bits=3") = fa0e40cc693c20d55b131b825a32f961d6d0681811a95886d6704e9c376a9abd OK sha256 ("hexstring=68, bits=5") = d6d3e02a31a84a8caa9718ed6c2057be09db45e7823eb5079ce7a573a3760f95 OK sha256 ("hexstring=19, bits=8") = 68aa2e2ee5dff96e3355e6c7ee373e3d6a4e17f75f9518d843709c0c9bc3e3d4 OK sha256 ("hexstring=be2746c6 db52765f db2f8870 0f9a7360, bits=123") = 77ec1dc89c821ff2a1279089fa091b35b8cd960bcaf7de01c6a7680756beb972 OK sha256 ("hexstring=e3d72570 dcdd787c e3887ab2 cd684652, bits=128") = 175ee69b02ba9b58e2b0a5fd13819cea573f3940a94f825128cf4209beabb4e8 OK sha256 ("hexstring=3e740371 c810c2b9 9fc04e80 4907ef7c f26be28b 57cb58a3e2f3c007 166e49c1 2e9ba34c 01040691 29ea7615 642545703a2bd901 e16eb0e0 5deba014 ebff6406 a07d5436 4eff742da779b0b3 a0 , bits=611") = 3e9ad6468bbbad2ac3c2cdc292e018ba5fd70b960cf1679777fce708fdb066e9 OK sha256 ("hexstring=8326754e 2277372f 4fc12b20 527afef0 4d8a0569 71b11ad57123a7c1 37760000 d7bef6f3 c1f7a908 3aa39d81 0db310777dab8b1e 7f02b84a 26c77332 5f8b2374 de7a4b5a 58cb5c5cf35bcee6 fb946e5b d694fa59 3a8beb3f 9d6592ec edaa66ca82a29d0c 51bcf933 6230e5d7 84e4c0a4 3f8d79a3 0a165cbabe452b77 4b9c7109 a97d138f 12922896 6f6c0adc 106aad5a9fdd3082 5769b2c6 71af6759 df28eb393d54d6 , bits=1304") = 97dbca7df46d62c8a422c941dd7e835b8ad3361763f7e9b2d95f4f0da6e1ccbc OK Tests passed: 8, tests failed: 0.
sha256 HMAC Test Suite: hmac-sha256 ("Hi There") = b0344c61d8db38535ca8afceaf0bf12b881dc200c9833da726e9376c2e32cff7 OK
hmac-sha256 ("what do ya want for nothing?") = 5bdcc146bf60754e6a042426089575c75a003f089d2739839dec58b964ec3843 OK
hmac-sha256 ("dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd") = 773ea91e36800e46854db8ebd09181a72959098b3ef8c122d9635514ced565fe OK
hmac-sha256 ("cdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcd") = 82558a389a443c0ea4cc819899f2083a85f0faa3e578f8077a2e3ff46729665b OK
hmac-sha256 ("Test Using Larger Than Block-Size Key - Hash Key First") = 60e431591ee0b67f0d8a26aacbf5b77f8e0bc6213728c5140546040f0ee37f54 OK
hmac-sha256 ("This is a test using a larger than block-size key and a larger than block-size data. The key needs to be hashed before being used by the HMAC algorithm.") = 9b09ffa71b942fcb27635fbcd5b0e944bfdc63644f0713938a7f51535c3a35e2 OK
hmac-sha256 ("5468697320697320612074657374207573696e672061206c6172676572207468616e20626c6f636b2d73697a65206b657920616e642061206c6172676572207468616e20626c6f636b2d73697a6520646174612e20546865206b6579206e6565647320746f20626520686173686564206265666f7265206265696e6720757365642062792074686520484d414320616c676f726974686d2e") = 9b09ffa71b942fcb27635fbcd5b0e944bfdc63644f0713938a7f51535c3a35e2 OK
Tests passed: 7, tests failed: 0.
Summary of Test Results -----------------------
sha256 Hash tests : passed 2, failed 0 sha256 Bitwise hash tests : passed 8, failed 0 sha256 HMAC tests : passed 7, failed 0
Categories: 3, Tests: 17, passed 17, failed 0.
Note: all test cases for all algorithms can be executed using
$ fehashmac -a all --test
$ shake128-b64 /etc/passwd # shake128-b64 /etc/passwd hmacflag, kmacflag, kmacxxxflag = 0, 0, 0 length (xof) = 512 shake128-b64 (/etc/passwd) = 7PWp+/Hev+ED3ZEm/oBPGEDbxloUGPtAvUENBrDSt6pX6j9Sz9FK2fYnwkVA7zpq2s+PG34HcGsioVKNw2/QyDFcNgGSAB40qTODOqGMM8WaDBIh4ylH07bJMB1GShsF3hRClEE3hGFR5EfI9b9A2kBVI/+K5qKyZdJESOuGgj2cQ37L0YarxZVJq92ZCm9mwLF+YtxJJWbS1SouB5x9HZseF571WJN3M3oyIh4G6exQ97BHtKDunep6vG8iOiJCxCVetKjaYqgOz55twwElZ7DifCsGrgs2XuTaDGe3AVMrcFmfNNa+Re3kgzUoD5ZI2tsb9NkbOjRlft1iHm6t8efGQbTdxMkljKOodaFuGlexsI5pAyzNAiqoV+ScUsmUvaiBpb+fBOm75SN320CdlXiJRLcLXZJQtupL1VjPMBx1dgB1GmdotLFEDbbHempaXYbPg3Jyjtel9nHlctDNyT1Y2Dzv1bClVrmpTEIhv/14RBtmrlBAQEOgRl+7MlfEo4FTXLkx+y9iJmC2OthArMG/20m9M+xnGOvqbjDKVSR3tgDnWTICNAAEo2TeCzGx4a2F7AG8rUl23h0xFnqE3JK2y8jKjyYY2PrqRUY5eAVOAAmKJj6pnc1KBKnr/qW6cfIgG2g8zFq9zOC+RhO36UnabZUVjarB3TlZ7mwBEFM=
Alternate: $ shake128 --base64 /etc/passwd The --base64 (or shorter --b64) flag applies base64 output to all supporting algorithms.
$ fehashmac -h # fehashmac -h Usage: fehashmac [ options ] [ file ..] -or- fehashmac -c [file] -or- fehashmac -t Generic Hash and HMAC Program fehashmac V4.0 16.12.2024 Harald von Fellenberg (hvf at hvf dot ch) Supports HMAC (RFC 2104, FIPS PUB 198-1, NIST SP 800-224) for most hash algorithms. Supports SHA3 and SHAKE (FIPS PUB 202, August 2015). Supports base64 encoded output for SHAKE. Supports arbitrary extendable output lengths for SHAKE128, SHAKE256. Supports KMAC (http://keyak.noekeon.org/Keyak-1.2.pdf) for SHA3 algorithms. The previous algos XOFSHAKE are now integrated in SHAKE and are obsolete. Multiple hashes can be calculated simultaneously, files are read only once. Supports kmac128, kmac256, kmacxof128, kmacxof256 (NIST SP 800-185). The supported hash algorithms are (56): blake224 blake256 blake384 blake512 gost groestl224 groestl256 groestl384 groestl512 jh224 jh256 jh384 jh512 keccak224 keccak256 keccak384 keccak512 kmac128 kmac256 kmacxof128 kmacxof256 lash160 lash256 lash384 lash512 md2 md4 md5 md6-224 md6-256 md6-384 md6-512 rmd128 rmd160 rmd256 rmd320 sha1 sha224 sha256 sha3-224 sha3-256 sha3-384 sha3-512 sha384 sha512 sha512-224 sha512-256 shake128 shake256 skein1024 skein224 skein256 skein384 skein512 tiger2 whirl The supported HMAC algorithms are (52): hmac-blake224 hmac-blake256 hmac-blake384 hmac-blake512 hmac-gost hmac-groestl224 hmac-groestl256 hmac-groestl384 hmac-groestl512 hmac-jh224 hmac-jh256 hmac-jh384 hmac-jh512 hmac-keccak224 hmac-keccak256 hmac-keccak384 hmac-keccak512 hmac-lash160 hmac-lash256 hmac-lash384 hmac-lash512 hmac-md2 hmac-md4 hmac-md5 hmac-md6-224 hmac-md6-256 hmac-md6-384 hmac-md6-512 hmac-rmd128 hmac-rmd160 hmac-rmd256 hmac-rmd320 hmac-sha1 hmac-sha224 hmac-sha256 hmac-sha3-224 hmac-sha3-256 hmac-sha3-384 hmac-sha3-512 hmac-sha384 hmac-sha512 hmac-sha512-224 hmac-sha512-256 hmac-shake128 hmac-shake256 hmac-skein1024 hmac-skein224 hmac-skein256 hmac-skein384 hmac-skein512 hmac-tiger2 hmac-whirl The supported KMAC algorithms are (6): kmac-sha3-224 kmac-sha3-256 kmac-sha3-384 kmac-sha3-512 kmac-shake128 kmac-shake256 The supported algorithms with base64 encoding are (2): shake128-b64 shake256-b64 The supported KMAC algorithms with base64 encoding are (2): kmac-shake128-b64 kmac-shake256-b64 The supported algorithms with extendable output length (XOF) are (4): kmacxof128 kmacxof256 shake128 shake256 Options and arguments: -a algo[,algo,...] - choose algorithm(s), see list below --algorithm=algo[,algo,...] - choose algorithm(s), see list below these two arguments can be specified multiple times the files to be hashed are only read once. -a hmac-algo[,...] - choose HMAC algorithm with hash algo. Hash and HMAC algos may be freely mixed. -a kmac-algo[,...] - choose KMAC algorithm with hash algo. -a algo-b64[,...] - choose base64 encoding for hash algo. -a all - choose all hash algorithms -a hmac-all - choose all HMAC algorithms -a kmac-all - choose all KMAC algorithms -a all-b64 - choose all algorithms that support base64 encoding -a kmac-all-b64 - choose all algorithms that support KMAC and base64 encoding -s string - digests string for one algorithm --string=string - digests string for one algorithm --bitstring=bitstring - digests bitstring (Jim Gillogly format, bbb#nnn|bb..) --hexstring=hexstring - digests hexstring (like -M, --M=) --hexstringBitLen=nn - length of hexstring in bits (same as --bits) -t - runs time trial for all algorithms --time - runs time trial for all algorithms -x - runs test script for one algorithm --test - runs test script for one algorithm file ... - digests file(s) for one algorithm (none) - digests standard input for one algorithm -c [file] - checks digests read from file or stdin --check[=file] - checks digests read from file or stdin --bits=nn - message length in number of bits (for SHA only) -M hexstring - message in hexadecimal --M=hexstring - message in hexadecimal -h - print this text --help - print this text --list - print list of algorithms, one per line HMAC options: -K keystring - HMAC key as ASCII string --K=keystring - HMAC key as ASCII string --key=keystring - HMAC key as ASCII string --hexkey=hexkeystring - HMAC key in hexadecimal --hmacverbose - print HMAC, KMAC details KMAC options: -K keystring - KMAC key as ASCII string --K=keystring - KMAC key as ASCII string --key=keystring - KMAC key as ASCII string --hexkey=hexkeystring - KMAC key in hexadecimal --hexkeyBitLen=nn - hexkey length in bits --custom=customstring - KMAC128, 256 customization string --customBitLen=nn - customization string length in bits Base64 options: --b64 - produce digest in base64 format (if supported) --base64 - produce digest in base64 format (if supported) XOF options: --xoflength=longint - length for extendable length output in bytes --xofBitLen=longint - length for extendable length output in bits --xoflength=0 - default length, 512 bytes --xoflength=-1 - indefinite length length goes up to 9223372036854775807 (2**63-1) bytes --digestBitLen=longint - length of shortened digest, in bits Algorithm Hash Size Block Size Bitwise HMAC test Base64 (bits) (bytes) Operation Vectors blake224 224 64 yes blake256 256 64 yes blake384 384 128 yes blake512 512 128 yes gost 256 32 no groestl224 224 64 yes groestl256 256 64 yes groestl384 384 128 yes groestl512 512 128 yes jh224 224 64 yes jh256 256 64 yes jh384 384 64 yes jh512 512 64 yes keccak224 224 144 yes keccak256 256 136 yes keccak384 384 104 yes keccak512 512 72 yes kmac128 256 168 no no support kmac256 512 136 no no support kmacxof128 256 168 no no support kmacxof256 512 136 no no support lash160 160 40 no lash256 256 64 no lash384 384 96 no lash512 512 128 no md2 128 16 no md4 128 64 no md5 128 64 no yes md6-224 224 512 yes md6-256 256 512 yes md6-384 384 512 yes md6-512 512 512 yes rmd128 128 64 no yes rmd160 160 64 no yes rmd256 256 64 no rmd320 320 64 no sha1 160 64 yes yes sha224 224 64 yes yes sha256 256 64 yes yes sha3-224 224 144 yes yes sha3-256 256 136 yes yes sha3-384 384 104 yes yes sha3-512 512 72 yes yes sha384 384 128 yes yes sha512 512 128 yes yes sha512-224 224 128 yes, no testvectors sha512-256 256 128 yes, no testvectors shake128 4096 168 yes yes shake256 4096 136 yes yes skein1024 1024 128 yes skein224 224 32 yes skein256 256 32 yes skein384 384 64 yes skein512 512 64 yes tiger2 192 64 no whirl 512 64 yes, no testvectors References: blake224 : BLAKE homepage http://www.131002.net/blake/ blake256 : BLAKE homepage http://www.131002.net/blake/ blake384 : BLAKE homepage http://www.131002.net/blake/ blake512 : BLAKE homepage http://www.131002.net/blake/ gost : GOST R 34.11-94, the Russian equivalent of SHA. http://www.autochthonous.org/crypto/gosthash.tar.gz groestl224: GROESTL homepage http://www.groestl.info/ groestl256: GROESTL homepage http://www.groestl.info/ groestl384: GROESTL homepage http://www.groestl.info/ groestl512: GROESTL homepage http://www.groestl.info/ jh224 : JH homepage http://www3.ntu.edu.sg/home/wuhj/research/jh/ jh256 : JH homepage http://www3.ntu.edu.sg/home/wuhj/research/jh/ jh384 : JH homepage http://www3.ntu.edu.sg/home/wuhj/research/jh/ jh512 : JH homepage http://www3.ntu.edu.sg/home/wuhj/research/jh/ keccak224 : KECCAK homepage http://keccak.noekeon.org/ keccak256 : KECCAK homepage http://keccak.noekeon.org/ keccak384 : KECCAK homepage http://keccak.noekeon.org/ keccak512 : KECCAK homepage http://keccak.noekeon.org/ kmac128 : NIST SP 800-185, December 2016, https://doi.org/10.6028/NIST.SP.800-185 kmac256 : NIST SP 800-185, December 2016, https://doi.org/10.6028/NIST.SP.800-185 kmacxof128: NIST SP 800-185, December 2016, https://doi.org/10.6028/NIST.SP.800-185 kmacxof256: NIST SP 800-185, December 2016, https://doi.org/10.6028/NIST.SP.800-185 lash160 : http://csrc.nist.gov/pki/HashWorkshop/2006/Papers/SAARINEN_lash4-1_ORIG.pdf lash256 : http://csrc.nist.gov/pki/HashWorkshop/2006/Papers/SAARINEN_lash4-1_ORIG.pdf lash384 : http://csrc.nist.gov/pki/HashWorkshop/2006/Papers/SAARINEN_lash4-1_ORIG.pdf lash512 : http://csrc.nist.gov/pki/HashWorkshop/2006/Papers/SAARINEN_lash4-1_ORIG.pdf md2 : RFC1319, http://www.ietf.org/rfc/rfc1319.txt md4 : RFC1320, http://www.ietf.org/rfc/rfc1320.txt md5 : RFC1321, http://www.ietf.org/rfc/rfc1321.txt md6-224 : http://groups.csail.mit.edu/cis/md6/ md6-256 : http://groups.csail.mit.edu/cis/md6/ md6-384 : http://groups.csail.mit.edu/cis/md6/ md6-512 : http://groups.csail.mit.edu/cis/md6/ rmd128 : http://www.esat.kuleuven.ac.be/~bosselae/ripemd160.html rmd160 : http://www.esat.kuleuven.ac.be/~bosselae/ripemd160.html rmd256 : http://www.esat.kuleuven.ac.be/~bosselae/ripemd160.html rmd320 : http://www.esat.kuleuven.ac.be/~bosselae/ripemd160.html sha1 : FIPS PUB 180-4, March 2012, http://csrc.nist.gov/publications/fips/fips180-4/fips-180-4.pdf sha224 : FIPS PUB 180-4, March 2012, http://csrc.nist.gov/publications/fips/fips180-4/fips-180-4.pdf sha256 : FIPS PUB 180-4, March 2012, http://csrc.nist.gov/publications/fips/fips180-4/fips-180-4.pdf sha3-224 : FIPS PUB 202, August 2015, http://dx.doi.org/10.6028/NIST.FIPS.202 sha3-256 : FIPS PUB 202, August 2015, http://dx.doi.org/10.6028/NIST.FIPS.202 sha3-384 : FIPS PUB 202, August 2015, http://dx.doi.org/10.6028/NIST.FIPS.202 sha3-512 : FIPS PUB 202, August 2015, http://dx.doi.org/10.6028/NIST.FIPS.202 sha384 : FIPS PUB 180-4, March 2012, http://csrc.nist.gov/publications/fips/fips180-4/fips-180-4.pdf sha512 : FIPS PUB 180-4, March 2012, http://csrc.nist.gov/publications/fips/fips180-4/fips-180-4.pdf sha512-224: FIPS PUB 180-4, March 2012, http://csrc.nist.gov/publications/fips/fips180-4/fips-180-4.pdf sha512-256: FIPS PUB 180-4, March 2012, http://csrc.nist.gov/publications/fips/fips180-4/fips-180-4.pdf shake128 : FIPS PUB 202, August 2015, http://dx.doi.org/10.6028/NIST.FIPS.202 shake256 : FIPS PUB 202, August 2015, http://dx.doi.org/10.6028/NIST.FIPS.202 skein1024 : SKEIN homepage http://www.skein-hash.info/ skein224 : SKEIN homepage http://www.skein-hash.info/ skein256 : SKEIN homepage http://www.skein-hash.info/ skein384 : SKEIN homepage http://www.skein-hash.info/ skein512 : SKEIN homepage http://www.skein-hash.info/ tiger2 : http://www.cs.technion.ac.il/~biham/Reports/Tiger/ This code implements the Tiger 2 padding (like MD5) whirl : http://www.larc.usp.br/~pbarreto/WhirlpoolPage.html