From 61c5b4a35cbf6c9f8c86d16d6bc3d095504d0397 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Tue, 29 Dec 2015 19:16:31 +0100 Subject: [PATCH] argon2i test: remove tv3 for now; it's too much for web browsers Proper test vectors will be reintroduced later --- test/default/pwhash_argon2i.c | 34 ---------------------------------- 1 file changed, 34 deletions(-) diff --git a/test/default/pwhash_argon2i.c b/test/default/pwhash_argon2i.c index 45c95faa..1e80e0ac 100644 --- a/test/default/pwhash_argon2i.c +++ b/test/default/pwhash_argon2i.c @@ -164,39 +164,6 @@ static void tv2(void) } while (++i < (sizeof tests) / (sizeof tests[0])); } -static void tv3(void) -{ - static struct { - const char *passwd; - const char *out; - } tests[] = { - { "^T5H$JYt39n%K*j:W]!1s?vg!:jGi]Ax?..l7[p0v:1jHTpla9;]bUN;?bWyCbtqg " - "nrDFal+Jxl3,2`#^tFSu%v_+7iYse8-cCkNf!tD=KrW)", - "$argon2i$m=22528,t=10,p=1$i2sXExTHR4py06Nh+P+Kwg$OvfhlngWzaXLI1LnHcQczduSg9u/pk6hhJwKhHEp/dk" }, - { "K3S=KyH#)36_?]LxeR8QNKw6X=gFb'ai$C%29V* " - "tyh^Wo$TN-#Q4qkmtTCf0LLb.^E$0uykkP", - "$argon2i$m=23552,t=3,p=1$CIyn4RfRAlEctS1WNr/cWg$yAevM0sQq95wZsvA2LGnGqBNSNOCHmqC2uWTgNw+c5U" } - }; - char *out; - char *passwd; - size_t i = 0U; - - do { - out = (char *) sodium_malloc(strlen(tests[i].out) + 1U); - assert(out != NULL); - memcpy(out, tests[i].out, strlen(tests[i].out) + 1U); - passwd = (char *) sodium_malloc(strlen(tests[i].passwd) + 1U); - assert(passwd != NULL); - memcpy(passwd, tests[i].passwd, strlen(tests[i].passwd) + 1U); - if (crypto_pwhash_argon2i_str_verify - (out, passwd, strlen(passwd)) != 0) { - printf("pwhash_str failure: [%u]\n", (unsigned int)i); - } - sodium_free(out); - sodium_free(passwd); - } while (++i < (sizeof tests) / (sizeof tests[0])); -} - int main(void) { char *str_out; @@ -206,7 +173,6 @@ int main(void) tv(); tv2(); - tv3(); salt = (char *) sodium_malloc(crypto_pwhash_argon2i_SALTBYTES); str_out = (char *) sodium_malloc(crypto_pwhash_argon2i_STRBYTES); str_out2 = (char *) sodium_malloc(crypto_pwhash_argon2i_STRBYTES);