Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/quite/humla-spongycastle.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2014-04-11 07:05:21 +0400
committerPeter Dettman <peter.dettman@bouncycastle.org>2014-04-11 07:05:21 +0400
commitb352297b10de180b9f70099ee8b88fac41b3ef23 (patch)
treebc29cee1580ff6401d34953d2ace64476c655eb0 /core/src/main/java/org
parentcb871e449009f50de3574c18d8f8534c9ffdfdd8 (diff)
Tiny optimization
Diffstat (limited to 'core/src/main/java/org')
-rw-r--r--core/src/main/java/org/bouncycastle/crypto/generators/RSAKeyPairGenerator.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/src/main/java/org/bouncycastle/crypto/generators/RSAKeyPairGenerator.java b/core/src/main/java/org/bouncycastle/crypto/generators/RSAKeyPairGenerator.java
index ad87dc27..928c6a6e 100644
--- a/core/src/main/java/org/bouncycastle/crypto/generators/RSAKeyPairGenerator.java
+++ b/core/src/main/java/org/bouncycastle/crypto/generators/RSAKeyPairGenerator.java
@@ -33,8 +33,8 @@ public class RSAKeyPairGenerator
// p and q values should have a length of half the strength in bits
//
int strength = param.getStrength();
- int pBitlength = (strength + 1) >>> 1;
- int qBitlength = strength - pBitlength;
+ int qBitlength = strength >>> 1;
+ int pBitlength = strength - qBitlength;
int mindiffbits = strength / 3;
int minWeight = strength >>> 2;