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/SecT131Field.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/SecT131Field.cs')
-rw-r--r-- | crypto/src/math/ec/custom/sec/SecT131Field.cs | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/crypto/src/math/ec/custom/sec/SecT131Field.cs b/crypto/src/math/ec/custom/sec/SecT131Field.cs index adf4f0448..4ff5999a4 100644 --- a/crypto/src/math/ec/custom/sec/SecT131Field.cs +++ b/crypto/src/math/ec/custom/sec/SecT131Field.cs @@ -135,14 +135,8 @@ namespace Org.BouncyCastle.Math.EC.Custom.Sec { ulong[] odd = Nat192.Create64(); - ulong u0, u1; - u0 = Interleave.Unshuffle(x[0]); u1 = Interleave.Unshuffle(x[1]); - ulong e0 = (u0 & 0x00000000FFFFFFFFUL) | (u1 << 32); - odd[0] = (u0 >> 32) | (u1 & 0xFFFFFFFF00000000UL); - - u0 = Interleave.Unshuffle(x[2]); - ulong e1 = (u0 & 0x00000000FFFFFFFFUL); - odd[1] = (u0 >> 32); + odd[0] = Interleave.Unshuffle(x[0], x[1], out ulong e0); + odd[1] = Interleave.Unshuffle(x[2] , out ulong e1); Multiply(odd, ROOT_Z, z); |