Add BLAKE2b and BLAKE2s hash algorithms (RFC 7693)
* cipher/blake2.c: New. * cipher/Makefile.am: Add 'blake2.c'. * cipher/md.c (digest_list, prepare_macpads): Add BLAKE2. (md_setkey): New. (_gcry_md_setkey): Call 'md_setkey' for non-HMAC md. * configure.ac: Add BLAKE2 digest. * doc/gcrypt.texi: Add BLAKE2. * src/cipher.h (_gcry_blake2_init_with_key) (_gcry_digest_spec_blake2b_512, _gcry_digest_spec_blake2b_384) (_gcry_digest_spec_blake2b_256, _gcry_digest_spec_blake2b_160) (_gcry_digest_spec_blake2s_256, _gcry_digest_spec_blake2s_224) (_gcry_digest_spec_blake2s_160, _gcry_digest_spec_blake2s_128): New. * src/gcrypt.h.in (GCRY_MD_BLAKE2B_512, GCRY_MD_BLAKE2B_384) (GCRY_MD_BLAKE2B_256, GCRY_MD_BLAKE2B_160, GCRY_MD_BLAKE2S_256) (GCRY_MD_BLAKE2S_224, GCRY_MD_BLAKE2S_160, GCRY_MD_BLAKE2S_128): New. * tests/basic.c (check_one_md): Add testing for keyed hashes. (check_digests): Add BLAKE2 test vectors; Add testing for keyed hashes. * tests/blake2b.h: New. * tests/blake2s.h: New. * tests/Makefile.am: Add 'blake2b.h' and 'blake2s.h'.
- Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>