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-03-12 15:11:46 +0400
committerPeter Dettman <peter.dettman@bouncycastle.org>2014-03-12 15:11:46 +0400
commit67de29f9e593a52552f838bf3542a85ae7d8278f (patch)
treeb928371abaad623aa31c8a06f95aeed06b4e89ed /core/src/main/java/org/bouncycastle/crypto/kems/ECIESKeyEncapsulation.java
parent0294f98205215e542647c2be0a4701e46aba1c3b (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-xcore/src/main/java/org/bouncycastle/crypto/kems/ECIESKeyEncapsulation.java7
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();
+ }
}