diff options
author | Never <[email protected]> | 2017-02-13 14:04:44 +0100 |
---|---|---|
committer | Never <[email protected]> | 2017-02-13 14:04:44 +0100 |
commit | 31a360b4335d23b0e83aba23033d556b2188d013 (patch) | |
tree | e3bf230798314351f2be1dd4e5af54b852899f00 /src | |
parent | 78d8fb3d77cc0054229f951324f77610b91e0e9a (diff) |
increase miller-rabin iterations for RSA strong check_key. We call is_prime with prob=128 during sampling and we should check with the same prob
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/pubkey/rsa/rsa.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/pubkey/rsa/rsa.cpp b/src/lib/pubkey/rsa/rsa.cpp index 46192c558..1a287473a 100644 --- a/src/lib/pubkey/rsa/rsa.cpp +++ b/src/lib/pubkey/rsa/rsa.cpp @@ -167,7 +167,7 @@ bool RSA_PrivateKey::check_key(RandomNumberGenerator& rng, bool strong) const if(m_d1 != m_d % (m_p - 1) || m_d2 != m_d % (m_q - 1) || m_c != inverse_mod(m_q, m_p)) return false; - const size_t prob = (strong) ? 56 : 12; + const size_t prob = (strong) ? 128 : 12; if(!is_prime(m_p, rng, prob) || !is_prime(m_q, rng, prob)) return false; |