Joachim Strömbergson joachim@secworks.se writes:
Ok here is a revised patch with defines of update functions like for sha384. This patch is in unified format.
Thanks. Seems almost ready to to apply (and I already pushed the trivial indent fix). Some additional comments:
1. For the sha512.c copyright header, should it be "Copyright (C) 2014 Joachim Strömbergson", or Secworks AB, or something else?
2. Test cases are needed. Benchmark support would also be nice, but less important than tests and documentation.
3. I think there should be _DIGEST_SIZE and _DATA_SIZE defines for the new algorithms. In particular, SHA512_256_DATA_SIZE is different from SHA256_DATA_SIZE.
4. Add corresponding -meta.c files? Defining
const struct nettle_hash nettle_sha512_224; const struct nettle_hash nettle_sha512_256;
Or, since all variants are implemented in the same sha512.c source file anyway, maybe these objects could be placed together in sha384-meta.c. With this in place, adding them to examples/nettle-benchmark.c is trivial.
Should also update nettle-meta-hashes.c and correspnding test case.
Regards, /Niels