Commit 6f1fdd41 authored by Niels Möller's avatar Niels Möller

(test_main): Test signing with sha512.

Rev: nettle/testsuite/rsa-test.c:1.3
parent 99e8976d
......@@ -46,7 +46,17 @@ test_main(void)
"685e5a4f3e", 16);
test_rsa_sha256(&pub, &key, expected);
mpz_set_str(expected,
"06327f717f43bcf3" "5994e567e8241963" "8c22e1057a7771e7"
"a665bb7441a39cc8" "7762f6b1a459cae3" "281462ed3f6aec48"
"15c2365797a02af6" "8a603adf276c46f6" "e6afb25d07c57f47"
"c516aff84abda629" "cc83d9364eb3616d" "7d4ddf0e9a25fac5"
"7d56a252b0cb7b1f" "8266b525e9b893af" "116e7845c0969a9f"
"603e2543f3", 16);
test_rsa_sha512(&pub, &key, expected);
/* 777-bit key, generated by
*
* lsh-keygen -a rsa -l 777 -f advanced-hex
......@@ -94,15 +104,6 @@ test_main(void)
if (!rsa_public_key_prepare(&pub))
FAIL();
#if 0
mpz_set_str(key.d,
"f9bae89dacca6cca" "c21e0412b4df8355" "6fe7c5322bbae8ad"
"3f11494fd12bc076" "d4a7da3050fe109d" "2074db09cc6a93b4"
"745479522558379e" "a0ddfa74f86c9e9e" "a22c3b0e93d51447"
"0feb38105dd35395" "63b91ee32776f40c" "67b2a175690f7abb"
"25", 16);
#endif
mpz_set_str(key.p,
"0b73c990eeda0a2a" "2c26416052c85560" "0c5c0f5ce86a8326"
......@@ -164,6 +165,15 @@ test_main(void)
test_rsa_sha256(&pub, &key, expected);
mpz_set_str(expected,
"f761aae6273d6149" "06d8c208fb2897ca" "d798a46af4985b86"
"51d51e6a3e11cbe0" "84f18ba8979c0f54" "11493f7c6e770560"
"03db2146b4dbcaa6" "4aae2e02aab9ff7b" "1ddf77dc72145cf1"
"c26ebde7c708cdc1" "62e167a7ac33967b" "386a40ea4a988d17"
"47", 16);
test_rsa_sha512(&pub, &key, expected);
rsa_private_key_clear(&key);
rsa_public_key_clear(&pub);
mpz_clear(expected);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment