diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2014-01-24 10:40:03 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2014-01-24 10:40:03 +0700 |
commit | 89c202d973c8c0143ae5986d2c8bce0869ec541c (patch) | |
tree | 99ed0a58dd57555647a26279b74fde248418c607 /crypto/src/math | |
parent | Port of several interrelated things from Java build: (diff) | |
download | BouncyCastle.NET-ed25519-89c202d973c8c0143ae5986d2c8bce0869ec541c.tar.xz |
Move method
Diffstat (limited to 'crypto/src/math')
-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; |