diff options
author | Kurt Roeckx <kurt@roeckx.be> | 2019-10-23 22:10:54 +0200 |
---|---|---|
committer | Kurt Roeckx <kurt@roeckx.be> | 2019-11-09 16:01:54 +0100 |
commit | fd4a6e7d1e51ad53f70ae75317da36418cae6458 (patch) | |
tree | f46f15a916a7927f74355c6fde558d8e7fb4bdd6 /test | |
parent | db5cf86535b305378308c58c52596994e1ece1e6 (diff) |
RSA generation: Use more bits of 1/sqrt(2)
The old version always sets the top 2 bits, so the most significate byte
of the primes was always >= 0xC0. We now use 256 bits to represent
1/sqrt(2) = 0x0.B504F333F9DE64845...
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Richard Levitte <levitte@openssl.org>
GH: #10246
Diffstat (limited to 'test')
-rw-r--r-- | test/rsa_sp800_56b_test.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/rsa_sp800_56b_test.c b/test/rsa_sp800_56b_test.c index 1e6ea8d0b6..b928655794 100644 --- a/test/rsa_sp800_56b_test.c +++ b/test/rsa_sp800_56b_test.c @@ -223,6 +223,8 @@ static int test_check_prime_factor_range(void) && TEST_true(BN_set_word(p, 0x10)) && TEST_false(rsa_check_prime_factor_range(p, 8, ctx)) && TEST_true(BN_set_word(p, 0xB)) + && TEST_false(rsa_check_prime_factor_range(p, 8, ctx)) + && TEST_true(BN_set_word(p, 0xC)) && TEST_true(rsa_check_prime_factor_range(p, 8, ctx)) && TEST_true(BN_set_word(p, 0xF)) && TEST_true(rsa_check_prime_factor_range(p, 8, ctx)) |