You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice to have the /t flavor of SHA512 implemented (I specifically care about SHA512/256, but don't see much reason not to implement the generic function).
SHA512/256 is, for example, used in the salsa20 stream cipher, and for libsodium's crypto_auth primitive.
SHA512/t is roughly similar to SHA512, but the initialization is slightly different, as can be seen in the commented-out C code linked to above (the nc_sha512_init_t() function).
The sprintf (if we care about generic t's - again, I mostly care about SHA512/256) can be replaced with something like
It would be nice to have the
/t
flavor of SHA512 implemented (I specifically care about SHA512/256, but don't see much reason not to implement the generic function).SHA512/256 is, for example, used in the
salsa20
stream cipher, and forlibsodium
'scrypto_auth
primitive.See: https://en.wikipedia.org/wiki/SHA-2
The C code for this was commented out, apparently due to the use of
sprintf()
in thedefault: ..
of the switch statement, which carries a dependency onlibc
: https://github.com/mirleft/ocaml-nocrypto/blob/master/src/native/hash/sha512.c#L236SHA512/t is roughly similar to SHA512, but the initialization is slightly different, as can be seen in the commented-out C code linked to above (the
nc_sha512_init_t()
function).The
sprintf
(if we care about generict
's - again, I mostly care aboutSHA512/256
) can be replaced with something likeThe algorithm is described here: http://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf
Test vectors are available here:
The text was updated successfully, but these errors were encountered: