Skip to content

Commit 4127c2f

Browse files
author
gefeili
committed
Refactor in permutation
1 parent 1d372a6 commit 4127c2f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

core/src/main/java/org/bouncycastle/crypto/engines/AsconPermutationFriend.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ public void round(long C)
3232
long x0x4 = x0 ^ x4;
3333
//long x0x2c = x0 ^ x2;
3434
long x1x2c = x1 ^ x2;
35-
36-
long t0 = x3 ^ (x1 | x2) ^ x0 ^ (x1 & x0x4);
35+
long x1orx2c = x1 | x2;
36+
long t0 = x3 ^ x1orx2c ^ x0 ^ (x1 & x0x4);
3737
//long t1 = x0x4 ^ x2 ^ x3 ^ (x1x2c & (x1 ^ x3));
38-
long t1 = x0x4 ^ (x1 | x2 | x3) ^ (x1 & x2 & x3);
38+
long t1 = x0x4 ^ (x1orx2c | x3) ^ (x1 & x2 & x3);
3939
long t2 = x1x2c ^ (x4 & (~x3));//x4 ^ (x3 & x4);
4040
//long t3 = x0 ^ x1x2c ^ ((~x0) & (x3 ^ x4));
4141
long t3 = (x0 | (x3 ^ x4)) ^ x1x2c;

0 commit comments

Comments
 (0)