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/endo/GLVTypeBEndomorphism.java')
-rw-r--r--core/src/main/java/org/bouncycastle/math/ec/endo/GLVTypeBEndomorphism.java11
1 files changed, 7 insertions, 4 deletions
diff --git a/core/src/main/java/org/bouncycastle/math/ec/endo/GLVTypeBEndomorphism.java b/core/src/main/java/org/bouncycastle/math/ec/endo/GLVTypeBEndomorphism.java
index 45b21722..f690e918 100644
--- a/core/src/main/java/org/bouncycastle/math/ec/endo/GLVTypeBEndomorphism.java
+++ b/core/src/main/java/org/bouncycastle/math/ec/endo/GLVTypeBEndomorphism.java
@@ -3,19 +3,22 @@ package org.bouncycastle.math.ec.endo;
import java.math.BigInteger;
import org.bouncycastle.math.ec.ECConstants;
+import org.bouncycastle.math.ec.ECCurve;
import org.bouncycastle.math.ec.ECPointMap;
import org.bouncycastle.math.ec.GLVEndomorphism;
import org.bouncycastle.math.ec.ScaleXPointMap;
public class GLVTypeBEndomorphism implements GLVEndomorphism
{
- private final GLVTypeBParameters parameters;
- private final ECPointMap pointMap;
+ protected final ECCurve curve;
+ protected final GLVTypeBParameters parameters;
+ protected final ECPointMap pointMap;
- public GLVTypeBEndomorphism(GLVTypeBParameters parameters)
+ public GLVTypeBEndomorphism(ECCurve curve, GLVTypeBParameters parameters)
{
+ this.curve = curve;
this.parameters = parameters;
- this.pointMap = new ScaleXPointMap(parameters.getBeta());
+ this.pointMap = new ScaleXPointMap(curve.fromBigInteger(parameters.getBeta()));
}
public BigInteger[] decomposeScalar(BigInteger k)