Initialize AES state properly

This commit is contained in:
Manuel Thalmann 2023-11-14 08:58:24 +01:00
parent 2be8b672cb
commit 579450af2b

View file

@ -173,8 +173,9 @@ void aes(uint8_t *in, uint8_t *out, uint8_t *skey)
t_state state;
state[0] = word(in[0], in[1], in[2], in[3]);
/* ??? */
for (uint8_t i = 0; i < 4; i++) {
state[i] = word(in[i * 4], in[i * 4 + 1], in[i * 4 + 2], in[i * 4 + 3]);
}
printf("IN: "); printstate(state);