diff --git a/aes/aes.cpp b/aes/aes.cpp index e1379bb..ff69abf 100644 --- a/aes/aes.cpp +++ b/aes/aes.cpp @@ -162,7 +162,10 @@ void expandKey(uint8_t k[16], uint32_t ek[44]) { /* Adding expanded round key (prepared before) */ void addRoundKey(t_state s, uint32_t ek[], short round) { - /* ??? */ + s[0] ^= ek[round]; + s[1] ^= ek[round + 1]; + s[2] ^= ek[round + 2]; + s[3] ^= ek[round + 3]; } void aes(uint8_t *in, uint8_t *out, uint8_t *skey)