diff options
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.java | 2 |
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(); |