diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2014-03-12 15:11:46 +0400 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2014-03-12 15:11:46 +0400 |
commit | 67de29f9e593a52552f838bf3542a85ae7d8278f (patch) | |
tree | b928371abaad623aa31c8a06f95aeed06b4e89ed /core/src/main/java/org/bouncycastle/crypto/kems/ECIESKeyEncapsulation.java | |
parent | 0294f98205215e542647c2be0a4701e46aba1c3b (diff) |
Allow subclasses to override the ECMultiplier used for base-point
multiplication
Diffstat (limited to 'core/src/main/java/org/bouncycastle/crypto/kems/ECIESKeyEncapsulation.java')
-rwxr-xr-x | core/src/main/java/org/bouncycastle/crypto/kems/ECIESKeyEncapsulation.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/core/src/main/java/org/bouncycastle/crypto/kems/ECIESKeyEncapsulation.java b/core/src/main/java/org/bouncycastle/crypto/kems/ECIESKeyEncapsulation.java index 746d26ca..517acfb1 100755 --- a/core/src/main/java/org/bouncycastle/crypto/kems/ECIESKeyEncapsulation.java +++ b/core/src/main/java/org/bouncycastle/crypto/kems/ECIESKeyEncapsulation.java @@ -123,7 +123,7 @@ public class ECIESKeyEncapsulation // Compute the static-ephemeral key agreement BigInteger rPrime = CofactorMode ? r.multiply(h).mod(n) : r; - ECMultiplier basePointMultiplier = new FixedPointCombMultiplier(); + ECMultiplier basePointMultiplier = createBasePointMultiplier(); ECPoint[] ghTilde = new ECPoint[]{ basePointMultiplier.multiply(ecParams.getG(), r), @@ -236,4 +236,9 @@ public class ECIESKeyEncapsulation { return decrypt(in, 0, in.length, keyLen); } + + protected ECMultiplier createBasePointMultiplier() + { + return new FixedPointCombMultiplier(); + } } |