diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2014-07-23 15:17:12 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2014-07-23 15:17:12 +0700 |
commit | 6e306046568f9a4d13639b913f0ff6d5879fa165 (patch) | |
tree | 994b8711674bb146ff578c1f0dff649282962acb /crypto/src/math/ec/custom/sec/SecP256K1Point.cs | |
parent | Update encrypt_then_mac entry (diff) | |
download | BouncyCastle.NET-ed25519-6e306046568f9a4d13639b913f0ff6d5879fa165.tar.xz |
Add automatic EC point validation for decoded points and for multiplier outputs
Diffstat (limited to 'crypto/src/math/ec/custom/sec/SecP256K1Point.cs')
-rw-r--r-- | crypto/src/math/ec/custom/sec/SecP256K1Point.cs | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/crypto/src/math/ec/custom/sec/SecP256K1Point.cs b/crypto/src/math/ec/custom/sec/SecP256K1Point.cs index b12eadb72..3165682fa 100644 --- a/crypto/src/math/ec/custom/sec/SecP256K1Point.cs +++ b/crypto/src/math/ec/custom/sec/SecP256K1Point.cs @@ -3,7 +3,7 @@ namespace Org.BouncyCastle.Math.EC.Custom.Sec { internal class SecP256K1Point - : ECPointBase + : AbstractFpPoint { /** * Create a point which encodes with point compression. @@ -55,11 +55,6 @@ namespace Org.BouncyCastle.Math.EC.Custom.Sec return new SecP256K1Point(null, AffineXCoord, AffineYCoord); } - protected internal override bool CompressionYTilde - { - get { return this.AffineYCoord.TestBitZero(); } - } - public override ECPoint Add(ECPoint b) { if (this.IsInfinity) @@ -259,14 +254,6 @@ namespace Org.BouncyCastle.Math.EC.Custom.Sec return Twice().Add(this); } - public override ECPoint Subtract(ECPoint b) - { - if (b.IsInfinity) - return this; - - return Add(b.Negate()); - } - public override ECPoint Negate() { if (IsInfinity) |