diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2019-08-02 16:52:44 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2019-08-02 16:52:44 +0700 |
commit | b033b509c53b79d564ba17c4a69de78bd917ef80 (patch) | |
tree | be14f91f7200da0b731f60fe0c53398efe83345b /crypto/src/math/raw/Nat224.cs | |
parent | Refactor Equals/GetHashCode in X509 objects (diff) | |
download | BouncyCastle.NET-ed25519-b033b509c53b79d564ba17c4a69de78bd917ef80.tar.xz |
Updates to raw math classes from bc-java
Diffstat (limited to 'crypto/src/math/raw/Nat224.cs')
-rw-r--r-- | crypto/src/math/raw/Nat224.cs | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/crypto/src/math/raw/Nat224.cs b/crypto/src/math/raw/Nat224.cs index ff1eb6306..565abcb9c 100644 --- a/crypto/src/math/raw/Nat224.cs +++ b/crypto/src/math/raw/Nat224.cs @@ -509,9 +509,10 @@ namespace Org.BouncyCastle.Math.Raw c += x_i * y_6 + zz[i + 6]; zz[i + 6] = (uint)c; c >>= 32; - c += zc + zz[i + 7]; - zz[i + 7] = (uint)c; - zc = c >> 32; + + zc += c + zz[i + 7]; + zz[i + 7] = (uint)zc; + zc >>= 32; } return (uint)zc; } @@ -551,9 +552,10 @@ namespace Org.BouncyCastle.Math.Raw c += x_i * y_6 + zz[zzOff + 6]; zz[zzOff + 6] = (uint)c; c >>= 32; - c += zc + zz[zzOff + 7]; - zz[zzOff + 7] = (uint)c; - zc = c >> 32; + + zc += c + zz[zzOff + 7]; + zz[zzOff + 7] = (uint)zc; + zc >>= 32; ++zzOff; } return (uint)zc; |