diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-07-18 14:04:40 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-07-18 14:04:40 +0700 |
commit | 2a27035daa92bb2fc1c89914481db58e9336d35e (patch) | |
tree | 84737dbc459344c32878722e1787fe097e766f62 /crypto/src/math/ec/custom/sec/SecT113Field.cs | |
parent | LongArray cleanup and refactoring (diff) | |
download | BouncyCastle.NET-ed25519-2a27035daa92bb2fc1c89914481db58e9336d35e.tar.xz |
Factor out Unshuffle methods
Diffstat (limited to 'crypto/src/math/ec/custom/sec/SecT113Field.cs')
-rw-r--r-- | crypto/src/math/ec/custom/sec/SecT113Field.cs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/crypto/src/math/ec/custom/sec/SecT113Field.cs b/crypto/src/math/ec/custom/sec/SecT113Field.cs index 56738a219..c41d9f7d7 100644 --- a/crypto/src/math/ec/custom/sec/SecT113Field.cs +++ b/crypto/src/math/ec/custom/sec/SecT113Field.cs @@ -123,9 +123,7 @@ namespace Org.BouncyCastle.Math.EC.Custom.Sec public static void Sqrt(ulong[] x, ulong[] z) { - ulong u0 = Interleave.Unshuffle(x[0]), u1 = Interleave.Unshuffle(x[1]); - ulong e0 = (u0 & 0x00000000FFFFFFFFUL) | (u1 << 32); - ulong c0 = (u0 >> 32) | (u1 & 0xFFFFFFFF00000000UL); + ulong c0 = Interleave.Unshuffle(x[0], x[1], out ulong e0); z[0] = e0 ^ (c0 << 57) ^ (c0 << 5); z[1] = (c0 >> 7) ^ (c0 >> 59); |