summary refs log tree commit diff
path: root/crypto/src/math/ec/custom/sec/Nat512.cs
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2014-03-03 21:11:12 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2014-03-03 21:11:12 +0700
commit2341ac87e251e4c23c6cebdba277b518d18fdd11 (patch)
tree42616bd14605c77b50df9195eabb3099ccf8651a /crypto/src/math/ec/custom/sec/Nat512.cs
parentShare single temp variable across calls in Sqrt() (diff)
downloadBouncyCastle.NET-ed25519-2341ac87e251e4c23c6cebdba277b518d18fdd11.tar.xz
Refactoring in the Nat* classes and some new method variations
Improved reduction in some fields
Diffstat (limited to 'crypto/src/math/ec/custom/sec/Nat512.cs')
-rw-r--r--crypto/src/math/ec/custom/sec/Nat512.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/src/math/ec/custom/sec/Nat512.cs b/crypto/src/math/ec/custom/sec/Nat512.cs
index 7f1475306..46e10f995 100644
--- a/crypto/src/math/ec/custom/sec/Nat512.cs
+++ b/crypto/src/math/ec/custom/sec/Nat512.cs
@@ -21,7 +21,7 @@ namespace Org.BouncyCastle.Math.EC.Custom.Sec
             Nat256.Mul(dx, dy, tt);
 
             c24 += neg ? Nat.AddTo(16, tt, 0, zz, 8) : (uint)Nat.SubFrom(16, tt, 0, zz, 8);
-            Nat.AddWordExt(16, c24, zz, 24); 
+            Nat.AddWordAt(32, c24, zz, 24); 
         }
 
         public static void Square(uint[] x, uint[] zz)
@@ -40,7 +40,7 @@ namespace Org.BouncyCastle.Math.EC.Custom.Sec
             Nat256.Square(dx, m);
 
             c24 += (uint)Nat.SubFrom(16, m, 0, zz, 8);
-            Nat.AddWordExt(16, c24, zz, 24); 
+            Nat.AddWordAt(32, c24, zz, 24); 
         }
     }
 }