diff options
author | tb <> | 2021-11-29 20:13:25 +0000 |
---|---|---|
committer | tb <> | 2021-11-29 20:13:25 +0000 |
commit | b4d2bd95ef1ce1b121f8a6d456749623761976dc (patch) | |
tree | bf52c8168ed399de6c08cd5b074d982046759afb /src | |
parent | bd7738409d496371bd505cd5dbdb2a5675c5665f (diff) | |
download | openbsd-b4d2bd95ef1ce1b121f8a6d456749623761976dc.tar.gz openbsd-b4d2bd95ef1ce1b121f8a6d456749623761976dc.tar.bz2 openbsd-b4d2bd95ef1ce1b121f8a6d456749623761976dc.zip |
Crank the number of rounds of Miller-Rabin from 50 to 64
for DSA key generation.
From Kurt Roeckx, OpenSSL 74ee3796
ok bcook inoguchi jsing
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/dsa/dsa.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/lib/libcrypto/dsa/dsa.h b/src/lib/libcrypto/dsa/dsa.h index 61bfc2b466..15536f63e2 100644 --- a/src/lib/libcrypto/dsa/dsa.h +++ b/src/lib/libcrypto/dsa/dsa.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: dsa.h,v 1.30 2018/03/17 15:19:12 tb Exp $ */ | 1 | /* $OpenBSD: dsa.h,v 1.31 2021/11/29 20:13:25 tb Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -247,9 +247,12 @@ int DSA_print(BIO *bp, const DSA *x, int off); | |||
247 | int DSAparams_print_fp(FILE *fp, const DSA *x); | 247 | int DSAparams_print_fp(FILE *fp, const DSA *x); |
248 | int DSA_print_fp(FILE *bp, const DSA *x, int off); | 248 | int DSA_print_fp(FILE *bp, const DSA *x, int off); |
249 | 249 | ||
250 | #define DSS_prime_checks 50 | 250 | /* |
251 | /* Primality test according to FIPS PUB 186[-1], Appendix 2.1: | 251 | * Primality test according to FIPS PUB 186-4, Appendix C.3. Set the number |
252 | * 50 rounds of Rabin-Miller */ | 252 | * to 64 rounds of Miller-Rabin, which corresponds to 128 bits of security. |
253 | * This is necessary for keys of size >= 3072. | ||
254 | */ | ||
255 | #define DSS_prime_checks 64 | ||
253 | #define DSA_is_prime(n, callback, cb_arg) \ | 256 | #define DSA_is_prime(n, callback, cb_arg) \ |
254 | BN_is_prime(n, DSS_prime_checks, callback, NULL, cb_arg) | 257 | BN_is_prime(n, DSS_prime_checks, callback, NULL, cb_arg) |
255 | 258 | ||