]> git.codecow.com Git - Monocypher.git/commitdiff
Added tests vectors for Blake2b
authorLoup Vaillant <loup@loup-vaillant.fr>
Wed, 31 Mar 2021 19:42:13 +0000 (21:42 +0200)
committerLoup Vaillant <loup@loup-vaillant.fr>
Wed, 31 Mar 2021 19:42:13 +0000 (21:42 +0200)
- We tested with no key, and an empty message.
- We tested with no key, and a non-empty message.
- We tested with a key, and a non-empty message.
- We did *not* test with a key and an empty message.

Well, now we do. Libsodium seems to agree with us. Phew.

tests/gen/blake2b.c

index 1c8510cde93b427434d0d1fa2f0737eac0d941fa..6685f4cd77f2b67245e849769a68fd83a9a2585b 100644 (file)
@@ -70,6 +70,7 @@ int main(void)
 {
     SODIUM_INIT;
     FOR(size     , 0, 256) { test(size, 0       , 64       ); }
+    FOR(key_size , 0,  64) { test(  0 , key_size, 64       ); }
     FOR(key_size , 0,  64) { test(128 , key_size, 64       ); }
     FOR(hash_size, 1,  64) { test(128 , 0       , hash_size); }
     return 0;