]> git.codecow.com Git - Monocypher.git/commitdiff
More robust Argon2i test vectors generation
authorLoup Vaillant <loup@loup-vaillant.fr>
Fri, 13 Oct 2017 09:26:27 +0000 (11:26 +0200)
committerLoup Vaillant <loup@loup-vaillant.fr>
Fri, 13 Oct 2017 09:26:27 +0000 (11:26 +0200)
The default algorithm in libsodium has changed, presumably from
Argon2i to Argon2id.  We now specify Argon2i explicitly.

tests/gen/argon2i.c

index 0c7b06faf8c7639708b668c37cfaaa7cfb0f6863..aee87b71a65f38b45ac4b4eeaf1b8dab965551bd 100644 (file)
@@ -9,7 +9,7 @@ void test(size_t nb_blocks, size_t hash_size, size_t nb_iterations)
 
     if (crypto_pwhash(hash, hash_size, (char*)password, 16, salt,
                       nb_iterations, nb_blocks * 1024,
-                      crypto_pwhash_ALG_DEFAULT)) {
+                      crypto_pwhash_ALG_ARGON2I13)) {
         fprintf(stderr, "Argon2i failed.  "
                 "nb_blocks = %lu, "
                 "hash_size = %lu "