diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2014-01-26 17:47:21 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2014-01-26 17:47:21 +0700 |
commit | 6291f2a807dd1c371969dacddfa773cf674ff042 (patch) | |
tree | 7deb1ca60a9bb1364f9709fb7ee569708fef25d2 /crypto/src | |
parent | Port custom curve for secp256k1 from Java (diff) | |
download | BouncyCastle.NET-ed25519-6291f2a807dd1c371969dacddfa773cf674ff042.tar.xz |
Tidy up comments
Diffstat (limited to 'crypto/src')
-rw-r--r-- | crypto/src/math/ec/custom/sec/SecP256K1FieldElement.cs | 4 | ||||
-rw-r--r-- | crypto/src/math/ec/custom/sec/SecP256K1Point.cs | 4 |
2 files changed, 2 insertions, 6 deletions
diff --git a/crypto/src/math/ec/custom/sec/SecP256K1FieldElement.cs b/crypto/src/math/ec/custom/sec/SecP256K1FieldElement.cs index 4da1013d1..11cf6ff6a 100644 --- a/crypto/src/math/ec/custom/sec/SecP256K1FieldElement.cs +++ b/crypto/src/math/ec/custom/sec/SecP256K1FieldElement.cs @@ -90,7 +90,7 @@ namespace Org.BouncyCastle.Math.EC.Custom.Sec public override ECFieldElement Divide(ECFieldElement b) { - // return Multiply(b.Invert()); + //return Multiply(b.Invert()); uint[] z = Nat256.Create(); Mod.Invert(SecP256K1Field.P, ((SecP256K1FieldElement)b).x, z); SecP256K1Field.Multiply(z, x, z); @@ -113,7 +113,7 @@ namespace Org.BouncyCastle.Math.EC.Custom.Sec public override ECFieldElement Invert() { - // return new SecP256K1FieldElement(ToBigInteger().ModInverse(Q)); + //return new SecP256K1FieldElement(ToBigInteger().ModInverse(Q)); uint[] z = Nat256.Create(); Mod.Invert(SecP256K1Field.P, x, z); return new SecP256K1FieldElement(z); diff --git a/crypto/src/math/ec/custom/sec/SecP256K1Point.cs b/crypto/src/math/ec/custom/sec/SecP256K1Point.cs index e2a22fbe7..548db535c 100644 --- a/crypto/src/math/ec/custom/sec/SecP256K1Point.cs +++ b/crypto/src/math/ec/custom/sec/SecP256K1Point.cs @@ -55,7 +55,6 @@ namespace Org.BouncyCastle.Math.EC.Custom.Sec get { return this.AffineYCoord.TestBitZero(); } } - // B.3 pg 62 public override ECPoint Add(ECPoint b) { if (this.IsInfinity) @@ -173,7 +172,6 @@ namespace Org.BouncyCastle.Math.EC.Custom.Sec return new SecP256K1Point(curve, X3, Y3, zs, IsCompressed); } - // B.3 pg 62 public override ECPoint Twice() { if (this.IsInfinity) @@ -254,13 +252,11 @@ namespace Org.BouncyCastle.Math.EC.Custom.Sec return Twice().Add(this); } - // D.3.2 pg 102 (see Note:) public override ECPoint Subtract(ECPoint b) { if (b.IsInfinity) return this; - // Add -b return Add(b.Negate()); } |