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:
Diffstat (limited to 'core/src/main/java/org/bouncycastle/math/ec/tools/DiscoverEndomorphisms.java')
-rw-r--r--core/src/main/java/org/bouncycastle/math/ec/tools/DiscoverEndomorphisms.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/src/main/java/org/bouncycastle/math/ec/tools/DiscoverEndomorphisms.java b/core/src/main/java/org/bouncycastle/math/ec/tools/DiscoverEndomorphisms.java
index bf2bca23..4292da31 100644
--- a/core/src/main/java/org/bouncycastle/math/ec/tools/DiscoverEndomorphisms.java
+++ b/core/src/main/java/org/bouncycastle/math/ec/tools/DiscoverEndomorphisms.java
@@ -163,7 +163,7 @@ public class DiscoverEndomorphisms
*/
BigInteger d = (v1[0].multiply(v2[1])).subtract(v1[1].multiply(v2[0]));
- int bits = n.bitLength() + 2;
+ int bits = n.bitLength() + 16 - (n.bitLength() & 7);
BigInteger g1 = roundQuotient(v2[1].shiftLeft(bits), d);
BigInteger g2 = roundQuotient(v1[1].shiftLeft(bits), d).negate();