9. AddRoundKey

round

The last transformation of a round is called AddRoundKey, and at this point you probably have an idea of what it is. And you're also probably right, it is just a XOR between the values in the state, and the values of your round key.

Once you are done with the AddRoundKey() function, make sure that all of the round functions you have implemented until now, properly work together. You can use the diagram in this page to do that.

Next