On Sat, Jun 12, 2021 at 04:07:15PM +0100, Samuel Henrique wrote: > Hello all, > > > The bug is trivial to fix, that's actually less work than all the > > workarounds. > > I can't see how that's trivial so I would appreciate it if you could > send a patch or describe what you're thinking of. I had tried a few > approaches but none of them worked out.
My reading of the code is that it was intended to be - t = set_byte(t, (j-1)%4, sbox[get_byte(k,j)]); + t = set_byte(t, (j-1+4)%4, sbox[get_byte(k,j)]); > Cheers, cu Adrian