summary refs log tree commit diff
path: root/crypto/src/math/raw/Nat224.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/math/raw/Nat224.cs')
-rw-r--r--crypto/src/math/raw/Nat224.cs14
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;