summary refs log tree commit diff
path: root/crypto
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2014-03-10 11:11:23 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2014-03-10 11:11:23 +0700
commit83dda1aa6cab2d97e807853ca8b69e4bb59235df (patch)
treefca0f6bb84d3058fdccf3b6f6dbf9713b3c02c18 /crypto
parentChange version to beta.3 after release of beta.2 (diff)
downloadBouncyCastle.NET-ed25519-83dda1aa6cab2d97e807853ca8b69e4bb59235df.tar.xz
Use more specific Nat methods
Diffstat (limited to 'crypto')
-rw-r--r--crypto/src/math/ec/custom/sec/SecP521R1Field.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/src/math/ec/custom/sec/SecP521R1Field.cs b/crypto/src/math/ec/custom/sec/SecP521R1Field.cs
index 3896e09d1..3568156d8 100644
--- a/crypto/src/math/ec/custom/sec/SecP521R1Field.cs
+++ b/crypto/src/math/ec/custom/sec/SecP521R1Field.cs
@@ -74,7 +74,7 @@ namespace Org.BouncyCastle.Math.EC.Custom.Sec
             uint xx32 = xx[32];
             uint c = Nat.ShiftDownBits(16, xx, 16, 9, xx32, z, 0) >> 23;
             c += xx32 >> 9;
-            c += Nat.Add(16, z, xx, z);
+            c += Nat.AddTo(16, xx, z);
             if (c > P16 || (c == P16 && Nat.Eq(16, z, P)))
             {
                 c += Nat.Inc(16, z);
@@ -86,7 +86,7 @@ namespace Org.BouncyCastle.Math.EC.Custom.Sec
         public static void Reduce23(uint[] z)
         {
             uint z16 = z[16];
-            uint c = Nat.AddWordAt(16, z16 >> 9, z, 0) + (z16 & P16);
+            uint c = Nat.AddWordTo(16, z16 >> 9, z) + (z16 & P16);
             if (c > P16 || (c == P16 && Nat.Eq(16, z, P)))
             {
                 c += Nat.Inc(16, z);