summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortb <>2021-11-29 20:13:25 +0000
committertb <>2021-11-29 20:13:25 +0000
commitb4d2bd95ef1ce1b121f8a6d456749623761976dc (patch)
treebf52c8168ed399de6c08cd5b074d982046759afb
parentbd7738409d496371bd505cd5dbdb2a5675c5665f (diff)
downloadopenbsd-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
-rw-r--r--src/lib/libcrypto/dsa/dsa.h11
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);
247int DSAparams_print_fp(FILE *fp, const DSA *x); 247int DSAparams_print_fp(FILE *fp, const DSA *x);
248int DSA_print_fp(FILE *bp, const DSA *x, int off); 248int 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