From: Mark Wooding Date: Wed, 10 May 2017 19:53:27 +0000 (+0100) Subject: symm/t/sha...: Add official NIST HMAC test vectors. X-Git-Tag: 2.4.0~20 X-Git-Url: https://git.distorted.org.uk/~mdw/catacomb/commitdiff_plain/0809b51f844db7d8bf532ac7f1e8c7c7a6f89fd1?ds=sidebyside symm/t/sha...: Add official NIST HMAC test vectors. I found some at last, annoyingly provided as PDF documents. Unsurprisingly, the code passed first time. Strange: the tests include two tests for the message `Sample message for keylen=blocklen', exactly one of which has the key length equal to the block length. Whatevs. --- diff --git a/symm/t/sha224 b/symm/t/sha224 index 8534f4f3..983e9c4e 100644 --- a/symm/t/sha224 +++ b/symm/t/sha224 @@ -1,10 +1,24 @@ # Test vectors for SHA-224 # --- HMAC mode --- -# -# Autogenerated, unofficial. sha224-hmac { + # NIST examples. + + "Sample message for keylen