summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2018-06-04 23:34:03 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2018-06-04 23:34:03 +0000
commitd7f22d0818f86016a9ece24bec7b677cf1a271e2 (patch)
tree2446dc5923cb60182ada970b62b788fdc4789235
parentebf50b6ec1ab2e6a6927f9590b63429ecc5dd0f8 (diff)
parentd85535cda74516745d17a179648f67f97fba378a (diff)
downloadbouncycastle-oreo-m4-s8-release.tar.gz
Merge cherrypicks of [4255363, 4255364, 4254607, 4254608, 4254909, 4254910, 4254911, 4255904, 4255905, 4255906, 4255907, 4254912, 4254624, 4255365, 4254609, 4254610, 4254611, 4254612, 4254613, 4254614, 4254615, 4254691, 4254692, 4254693, 4254694, 4254695, 4254696, 4254697, 4254698, 4254699, 4254700, 4255981, 4254913, 4255282, 4255283, 4255284, 4255366, 4256001, 4256002, 4254616, 4255367, 4256003, 4254957, 4254958, 4255403, 4255404, 4255405, 4255406, 4255407, 4255408, 4255409, 4255410, 4255411, 4255412, 4255413, 4255414, 4255415, 4255416, 4253350, 4256013, 4254991, 4256014, 4254959, 4254960, 4254992, 4254993, 4254994] into sparse-4732991-L15500000179240506android-8.1.0_r38oreo-m4-s8-release
Change-Id: I925eea22fce5fa55e0fe09849cb58a598dce037a
-rw-r--r--bcprov/src/main/java/org/bouncycastle/crypto/generators/RSAKeyPairGenerator.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/bcprov/src/main/java/org/bouncycastle/crypto/generators/RSAKeyPairGenerator.java b/bcprov/src/main/java/org/bouncycastle/crypto/generators/RSAKeyPairGenerator.java
index f23f654b..beb1aee2 100644
--- a/bcprov/src/main/java/org/bouncycastle/crypto/generators/RSAKeyPairGenerator.java
+++ b/bcprov/src/main/java/org/bouncycastle/crypto/generators/RSAKeyPairGenerator.java
@@ -20,12 +20,10 @@ public class RSAKeyPairGenerator
private static final BigInteger ONE = BigInteger.valueOf(1);
private RSAKeyGenerationParameters param;
- private int iterations;
public void init(KeyGenerationParameters param)
{
this.param = (RSAKeyGenerationParameters)param;
- this.iterations = getNumberOfIterations(this.param.getStrength(), this.param.getCertainty());
}
public AsymmetricCipherKeyPair generateKeyPair()
@@ -191,6 +189,8 @@ public class RSAKeyPairGenerator
protected boolean isProbablePrime(BigInteger x)
{
+ int iterations = getNumberOfIterations(x.bitLength(), param.getCertainty());
+
/*
* Primes class for FIPS 186-4 C.3 primality checking
*/