summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorKurt Roeckx <kurt@roeckx.be>2019-10-23 22:10:54 +0200
committerKurt Roeckx <kurt@roeckx.be>2019-11-09 16:01:54 +0100
commitfd4a6e7d1e51ad53f70ae75317da36418cae6458 (patch)
treef46f15a916a7927f74355c6fde558d8e7fb4bdd6 /include
parentdb5cf86535b305378308c58c52596994e1ece1e6 (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 'include')
-rw-r--r--include/crypto/bn.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/crypto/bn.h b/include/crypto/bn.h
index 91c6cd5dcc..f2cb30de0a 100644
--- a/include/crypto/bn.h
+++ b/include/crypto/bn.h
@@ -111,4 +111,7 @@ int bn_rsa_fips186_4_derive_prime(BIGNUM *Y, BIGNUM *X, const BIGNUM *Xin,
const BIGNUM *e, BN_CTX *ctx, BN_GENCB *cb);
OPENSSL_CTX *bn_get_lib_ctx(BN_CTX *ctx);
+
+extern const BIGNUM bn_inv_sqrt_2;
+
#endif