summary refs log tree commit diff
path: root/crypto/src/math/ec/custom/sec/Nat384.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/Nat384.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/Nat384.cs')
-rw-r--r--crypto/src/math/ec/custom/sec/Nat384.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/src/math/ec/custom/sec/Nat384.cs b/crypto/src/math/ec/custom/sec/Nat384.cs
index 273ee2d65..dd93e68b6 100644
--- a/crypto/src/math/ec/custom/sec/Nat384.cs
+++ b/crypto/src/math/ec/custom/sec/Nat384.cs
@@ -21,7 +21,7 @@ namespace Org.BouncyCastle.Math.EC.Custom.Sec
             Nat192.Mul(dx, dy, tt);
 
             c18 += neg ? Nat.AddTo(12, tt, 0, zz, 6) : (uint)Nat.SubFrom(12, tt, 0, zz, 6);
-            Nat.AddWordExt(12, c18, zz, 18);
+            Nat.AddWordAt(24, c18, zz, 18);
         }
 
         public static void Square(uint[] x, uint[] zz)
@@ -40,7 +40,7 @@ namespace Org.BouncyCastle.Math.EC.Custom.Sec
             Nat192.Square(dx, m);
 
             c18 += (uint)Nat.SubFrom(12, m, 0, zz, 6);
-            Nat.AddWordExt(12, c18, zz, 18);
+            Nat.AddWordAt(24, c18, zz, 18);
         }
     }
 }