diff options
Diffstat (limited to 'crypto/src')
-rw-r--r-- | crypto/src/math/ec/Nat.cs | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/crypto/src/math/ec/Nat.cs b/crypto/src/math/ec/Nat.cs index cc8996dfc..9819b9e73 100644 --- a/crypto/src/math/ec/Nat.cs +++ b/crypto/src/math/ec/Nat.cs @@ -224,7 +224,7 @@ namespace Org.BouncyCastle.Math.EC return true; } - public static bool isZeroExt(int len, uint[] xx) + public static bool IsZeroExt(int len, uint[] xx) { if (xx[0] != 0) { @@ -267,21 +267,6 @@ namespace Org.BouncyCastle.Math.EC return (uint)c; } - public static uint SquareWordAddExt(int len, uint[] x, int xPos, uint[] zz) - { - // assert xPos > 0 && xPos < len; - ulong c = 0, xVal = (ulong)x[xPos]; - int i = 0; - do - { - c += xVal * x[i] + zz[xPos + i]; - zz[xPos + i] = (uint)c; - c >>= 32; - } - while (++i < xPos); - return (uint)c; - } - public static uint MulWordDwordAdd(int len, uint x, ulong y, uint[] z, int zOff) { // assert zOff < (len - 3); @@ -408,6 +393,21 @@ namespace Org.BouncyCastle.Math.EC ShiftUpBit(zz, extLen, x[0] << 31); } + public static uint SquareWordAddExt(int len, uint[] x, int xPos, uint[] zz) + { + // assert xPos > 0 && xPos < len; + ulong c = 0, xVal = (ulong)x[xPos]; + int i = 0; + do + { + c += xVal * x[i] + zz[xPos + i]; + zz[xPos + i] = (uint)c; + c >>= 32; + } + while (++i < xPos); + return (uint)c; + } + public static int Sub(int len, uint[] x, uint[] y, uint[] z) { long c = 0; |