Making steps into the right direction with my Rijndael cipher script. Almost done now with the key expansion and the so called g-function. Last step is implementation of the round constants.
When that is done I 'only' have to put all the stuff in a proper loop. If that works I will be happy, but the journey will not end there. A lot of testing and see how to decrypt...
😃
In my 'baes' :) project I am struggling with Galois Fields and get field-exceeding values properly calculated.
I am home now and suddenly it struck me that probably the solution can be (note-to-self):
After multiplication with the irreducible polynomial, use a mask and a bitwise AND to keep only the lower 7 bits of the final result value.
I.e.:
value=0xA3F
mask=0x7F
result=$(( value & mask ))
So then the result will become: 0b00111111
Hopefully this will work...