diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2014-07-22 16:23:34 +0400 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2014-07-22 16:23:34 +0400 |
commit | 5cb2f0578e6ec8f0d67e59d05d8c4704d8e05f83 (patch) | |
tree | 2919232d66bfd07dec563ecc315c7a7161abfdd6 /core/src/main/java/org/bouncycastle/math/ec/custom/djb/Curve25519Point.java | |
parent | 8bfd438251442bfe6e0cdaabe054a3ffc88d794e (diff) |
Add automatic EC point validation for decoded points and for multiplier outputs.
Diffstat (limited to 'core/src/main/java/org/bouncycastle/math/ec/custom/djb/Curve25519Point.java')
-rw-r--r-- | core/src/main/java/org/bouncycastle/math/ec/custom/djb/Curve25519Point.java | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/core/src/main/java/org/bouncycastle/math/ec/custom/djb/Curve25519Point.java b/core/src/main/java/org/bouncycastle/math/ec/custom/djb/Curve25519Point.java index 2a558a61..b2700e30 100644 --- a/core/src/main/java/org/bouncycastle/math/ec/custom/djb/Curve25519Point.java +++ b/core/src/main/java/org/bouncycastle/math/ec/custom/djb/Curve25519Point.java @@ -5,7 +5,7 @@ import org.bouncycastle.math.ec.ECFieldElement; import org.bouncycastle.math.ec.ECPoint; import org.bouncycastle.math.raw.Nat256; -public class Curve25519Point extends ECPoint +public class Curve25519Point extends ECPoint.AbstractFp { /** * Create a point which encodes with point compression. @@ -55,11 +55,6 @@ public class Curve25519Point extends ECPoint return new Curve25519Point(null, getAffineXCoord(), getAffineYCoord()); } - protected boolean getCompressionYTilde() - { - return this.getAffineYCoord().testBitZero(); - } - public ECFieldElement getZCoord(int index) { if (index == 1) @@ -257,16 +252,6 @@ public class Curve25519Point extends ECPoint return twiceJacobianModified(false).add(this); } - public ECPoint subtract(ECPoint b) - { - if (b.isInfinity()) - { - return this; - } - - return add(b.negate()); - } - public ECPoint negate() { if (this.isInfinity()) |