Skip to content

Commit

Permalink
Kasumi cipher fixed round reduction
Browse files Browse the repository at this point in the history
  • Loading branch information
Bender250 committed Apr 13, 2018
1 parent 3a8f2be commit caca7f9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions streams/block/ciphers/kasumi/kasumi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,12 +208,12 @@
R = FI(R ^ K[4], K[5]) ^ L;
L = FI(L ^ K[6], K[7]) ^ R;

if (j +1 == rounds)
break;

R = B2 ^= R;
L = B3 ^= L;

if (j + 1 == rounds)
break;

R = FI(R ^ K[10], K[11]) ^ L;
L = FI(L ^ K[12], K[13]) ^ R;
R = FI(R ^ K[14], K[15]) ^ L;
Expand Down Expand Up @@ -257,12 +257,12 @@
L ^= (rotl<1>(R) & K[8]);
R ^= (rotl<1>(L) | K[9]);

if (j + 1 == rounds)
break;

R = B0 ^= R;
L = B1 ^= L;

if (j + 1 == rounds)
break;

L ^= (rotl<1>(R) & K[0]);
R ^= (rotl<1>(L) | K[1]);

Expand Down

0 comments on commit caca7f9

Please sign in to comment.