diff options
Diffstat (limited to 'core/src/main/java/org/bouncycastle/crypto/generators/ECKeyPairGenerator.java')
-rw-r--r-- | core/src/main/java/org/bouncycastle/crypto/generators/ECKeyPairGenerator.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/core/src/main/java/org/bouncycastle/crypto/generators/ECKeyPairGenerator.java b/core/src/main/java/org/bouncycastle/crypto/generators/ECKeyPairGenerator.java index 38807a4c..1bae4638 100644 --- a/core/src/main/java/org/bouncycastle/crypto/generators/ECKeyPairGenerator.java +++ b/core/src/main/java/org/bouncycastle/crypto/generators/ECKeyPairGenerator.java @@ -11,6 +11,7 @@ import org.bouncycastle.crypto.params.ECKeyGenerationParameters; import org.bouncycastle.crypto.params.ECPrivateKeyParameters; import org.bouncycastle.crypto.params.ECPublicKeyParameters; import org.bouncycastle.math.ec.ECConstants; +import org.bouncycastle.math.ec.ECMultiplier; import org.bouncycastle.math.ec.ECPoint; import org.bouncycastle.math.ec.FixedPointCombMultiplier; @@ -50,10 +51,15 @@ public class ECKeyPairGenerator } while (d.equals(ZERO) || (d.compareTo(n) >= 0)); - ECPoint Q = new FixedPointCombMultiplier().multiply(params.getG(), d); + ECPoint Q = createBasePointMultiplier().multiply(params.getG(), d); return new AsymmetricCipherKeyPair( new ECPublicKeyParameters(Q, params), new ECPrivateKeyParameters(d, params)); } + + protected ECMultiplier createBasePointMultiplier() + { + return new FixedPointCombMultiplier(); + } } |