From 89c202d973c8c0143ae5986d2c8bce0869ec541c Mon Sep 17 00:00:00 2001 From: Peter Dettman Date: Fri, 24 Jan 2014 10:40:03 +0700 Subject: Move method --- crypto/src/math/ec/Nat.cs | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'crypto/src/math/ec') 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; -- cgit 1.5.1