summary refs log tree commit diff
path: root/crypto/src/math/ec/custom/sec/SecP521R1Point.cs
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2014-03-10 19:19:52 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2014-03-10 19:19:52 +0700
commit84e8dad1309ad2d247af6cfd9038bff5ac5ce941 (patch)
treecec106af064d73325907ce8309cecbc083f8a741 /crypto/src/math/ec/custom/sec/SecP521R1Point.cs
parentAdapt performance test to exclude outliers form average (diff)
downloadBouncyCastle.NET-ed25519-84e8dad1309ad2d247af6cfd9038bff5ac5ce941.tar.xz
Optimize some of the addition/doubling internals
Diffstat (limited to '')
-rw-r--r--crypto/src/math/ec/custom/sec/SecP521R1Point.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/src/math/ec/custom/sec/SecP521R1Point.cs b/crypto/src/math/ec/custom/sec/SecP521R1Point.cs
index 2e3a7eccb..44d590f08 100644
--- a/crypto/src/math/ec/custom/sec/SecP521R1Point.cs
+++ b/crypto/src/math/ec/custom/sec/SecP521R1Point.cs
@@ -211,8 +211,8 @@ namespace Org.BouncyCastle.Math.EC.Custom.Sec
             uint[] M = t2;
             SecP521R1Field.Add(X1.x, Z1Squared, M);
             SecP521R1Field.Multiply(M, t1, M);
-            SecP521R1Field.Twice(M, t1);
-            SecP521R1Field.Add(M, t1, M);
+            Nat.AddBothTo(17, M, M, M);
+            SecP521R1Field.Reduce23(M);
 
             uint[] S = Y1Squared;
             SecP521R1Field.Multiply(Y1Squared, X1.x, S);