From dd0bbdeac04a18398af1cbc3be276e241c878636 Mon Sep 17 00:00:00 2001 From: Steffen Jaeckel Date: Mon, 9 Oct 2017 17:58:47 +0200 Subject: [PATCH] increase default value of Miller-Rabin rounds to 40 --- src/headers/tomcrypt_math.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/headers/tomcrypt_math.h b/src/headers/tomcrypt_math.h index 45c3a13..d8e7e36 100644 --- a/src/headers/tomcrypt_math.h +++ b/src/headers/tomcrypt_math.h @@ -26,8 +26,9 @@ #ifndef LTC_MILLER_RABIN_REPS /* Number of rounds of the Miller-Rabin test - * "Reasonable values of reps are between 15 and 50." c.f. gmp doc of mpz_probab_prime_p() */ - #define LTC_MILLER_RABIN_REPS 35 + * "Reasonable values of reps are between 15 and 50." c.f. gmp doc of mpz_probab_prime_p() + * As of https://security.stackexchange.com/a/4546 we should use 40 rounds */ + #define LTC_MILLER_RABIN_REPS 40 #endif int radix_to_bin(const void *in, int radix, void *out, unsigned long *len);