[Libre-soc-isa] [Bug 968] document shift-and-add instruction
bugzilla-daemon at libre-soc.org
bugzilla-daemon at libre-soc.org
Sun Oct 23 12:14:04 BST 2022
https://bugs.libre-soc.org/show_bug.cgi?id=968
--- Comment #2 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
part of the justification for this instruction does come from twofish
(as well as LD-ST-address-calculate-with-a-shift)
#define ENCRYPT_RND( A,B,C,D, T0, T1, xkey, r ) \
T0 = g0(A,xkey); T1 = g1(B,xkey);\
C ^= T0+T1+xkey->K[8+2*(r)]; C = ROR32(C,1);\
D = ROL32(D,1); D ^= T0+2*T1+xkey->K[8+2*(r)+1]
and there is additional shifting occuring in creation of a q-table:
ae = i>>4; be = i&0xf;
ao = ae ^ be; bo = ae ^ ROR4BY1(be) ^ ((ae<<3)&8);
ae = t[0][ao]; be = t[1][bo];
ao = ae ^ be; bo = ae ^ ROR4BY1(be) ^ ((ae<<3)&8);
ae = t[2][ao]; be = t[3][bo];
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Libre-SOC-ISA
mailing list