diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2017-02-17 17:44:25 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2017-02-17 17:44:25 +0700 |
commit | 9417631a8dec7b0b2acc3e3893b9c9c1dec07872 (patch) | |
tree | de83c51d3156576a07fb547a0947429d04a3d1b1 /crypto/src/math/ec/custom/sec/SecT163K1Point.cs | |
parent | Merge branch 'master' of bcgit@git.bouncycastle.org:bc-csharp.git (diff) | |
download | BouncyCastle.NET-ed25519-9417631a8dec7b0b2acc3e3893b9c9c1dec07872.tar.xz |
Clean up old comments in binary custom curve code
Diffstat (limited to 'crypto/src/math/ec/custom/sec/SecT163K1Point.cs')
-rw-r--r-- | crypto/src/math/ec/custom/sec/SecT163K1Point.cs | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/crypto/src/math/ec/custom/sec/SecT163K1Point.cs b/crypto/src/math/ec/custom/sec/SecT163K1Point.cs index 2e3ba57d0..8693fe1c8 100644 --- a/crypto/src/math/ec/custom/sec/SecT163K1Point.cs +++ b/crypto/src/math/ec/custom/sec/SecT163K1Point.cs @@ -131,11 +131,9 @@ namespace Org.BouncyCastle.Math.EC.Custom.Sec ECFieldElement Y2 = L2; ECFieldElement L = Y1.Add(Y2).Divide(X1); - //X3 = L.Square().Add(L).Add(X1).Add(curve.getA()); X3 = L.Square().Add(L).Add(X1).AddOne(); if (X3.IsZero) { - //return new SecT163K1Point(curve, X3, curve.B.sqrt(), IsCompressed); return new SecT163K1Point(curve, X3, curve.B, IsCompressed); } @@ -153,7 +151,6 @@ namespace Org.BouncyCastle.Math.EC.Custom.Sec X3 = AU1.Multiply(AU2); if (X3.IsZero) { - //return new SecT163K1Point(curve, X3, curve.B.sqrt(), IsCompressed); return new SecT163K1Point(curve, X3, curve.B, IsCompressed); } @@ -199,7 +196,6 @@ namespace Org.BouncyCastle.Math.EC.Custom.Sec ECFieldElement T = L1.Square().Add(L1Z1).Add(Z1Sq); if (T.IsZero) { - //return new SecT163K1Point(curve, T, curve.B.sqrt(), withCompression); return new SecT163K1Point(curve, T, curve.B, IsCompressed); } @@ -243,10 +239,7 @@ namespace Org.BouncyCastle.Math.EC.Custom.Sec ECFieldElement Z1Sq = Z1.Square(); ECFieldElement L1Z1 = L1.Multiply(Z1); - //ECFieldElement T = curve.getA().Multiply(Z1Sq).Add(L1Sq).Add(L1Z1); ECFieldElement T = Z1Sq.Add(L1Sq).Add(L1Z1); - ECFieldElement L2plus1 = L2.AddOne(); - //ECFieldElement A = curve.getA().Add(L2plus1).Multiply(Z1Sq).Add(L1Sq).MultiplyPlusProduct(T, X1Sq, Z1Sq); ECFieldElement A = L2.Multiply(Z1Sq).Add(L1Sq).MultiplyPlusProduct(T, X1Sq, Z1Sq); ECFieldElement X2Z1Sq = X2.Multiply(Z1Sq); ECFieldElement B = X2Z1Sq.Add(T).Square(); @@ -261,13 +254,12 @@ namespace Org.BouncyCastle.Math.EC.Custom.Sec if (A.IsZero) { - //return new SecT163K1Point(curve, A, curve.B.sqrt(), withCompression); return new SecT163K1Point(curve, A, curve.B, IsCompressed); } ECFieldElement X3 = A.Square().Multiply(X2Z1Sq); ECFieldElement Z3 = A.Multiply(B).Multiply(Z1Sq); - ECFieldElement L3 = A.Add(B).Square().MultiplyPlusProduct(T, L2plus1, Z3); + ECFieldElement L3 = A.Add(B).Square().MultiplyPlusProduct(T, L2.AddOne(), Z3); return new SecT163K1Point(curve, X3, L3, new ECFieldElement[] { Z3 }, IsCompressed); } |