summary refs log tree commit diff
path: root/crypto/src/math/ec/custom/sec/SecT571Field.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/math/ec/custom/sec/SecT571Field.cs')
-rw-r--r--crypto/src/math/ec/custom/sec/SecT571Field.cs18
1 files changed, 5 insertions, 13 deletions
diff --git a/crypto/src/math/ec/custom/sec/SecT571Field.cs b/crypto/src/math/ec/custom/sec/SecT571Field.cs
index 1b8bb763e..4d3f715fa 100644
--- a/crypto/src/math/ec/custom/sec/SecT571Field.cs
+++ b/crypto/src/math/ec/custom/sec/SecT571Field.cs
@@ -231,19 +231,11 @@ namespace Org.BouncyCastle.Math.EC.Custom.Sec
         {
             ulong[] evn = Nat576.Create64(), odd = Nat576.Create64();
 
-            int pos = 0;
-            for (int i = 0; i < 4; ++i)
-            {
-                ulong u0 = Interleave.Unshuffle(x[pos++]);
-                ulong u1 = Interleave.Unshuffle(x[pos++]);
-                evn[i] = (u0 & 0x00000000FFFFFFFFUL) | (u1 << 32);
-                odd[i] = (u0 >> 32) | (u1 & 0xFFFFFFFF00000000UL);
-            }
-            {
-                ulong u0 = Interleave.Unshuffle(x[pos]);
-                evn[4] = (u0 & 0x00000000FFFFFFFFUL);
-                odd[4] = (u0 >> 32);
-            }
+            odd[0] = Interleave.Unshuffle(x[0], x[1], out evn[0]);
+            odd[1] = Interleave.Unshuffle(x[2], x[3], out evn[1]);
+            odd[2] = Interleave.Unshuffle(x[4], x[5], out evn[2]);
+            odd[3] = Interleave.Unshuffle(x[6], x[7], out evn[3]);
+            odd[4] = Interleave.Unshuffle(x[8]      , out evn[4]);
 
             Multiply(odd, ROOT_Z, z);
             Add(z, evn, z);