From 84e8dad1309ad2d247af6cfd9038bff5ac5ce941 Mon Sep 17 00:00:00 2001 From: Peter Dettman Date: Mon, 10 Mar 2014 19:19:52 +0700 Subject: Optimize some of the addition/doubling internals --- crypto/src/math/ec/custom/sec/SecP521R1Point.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crypto/src/math/ec/custom/sec/SecP521R1Point.cs') 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); -- cgit 1.4.1