1
$\begingroup$

I'm trying to self-learn the AES128 algorithm and ran into a snag while following these slides I found online: https://kavaliro.com/wp-content/uploads/2014/03/AES.pdf

For the sixth round in the example given, during the Add Roundkey step, the third word of the matrix after MixColumns (F0) is xor'd with the third word of the 6th roundkey (B7). This apparently results in (77) which doesn't correlate with my calculation of 47. However, the process seems to proceed with this error and still gets the right ciphertext in the end(I put the ciphertext through an online decoder and got the original plaintext back).

I'm very confused as to what I am missing here?

$\endgroup$
  • 1
    $\begingroup$ Also posted on SO in this question by a different userID. $\endgroup$ – zaph May 10 '18 at 8:27
2
$\begingroup$

You are not missing anything, the calculation is wrong. The calculation of the key schedule that is.

If you postulate the round calculations are correct, the round keys must be wrong, and in fact that byte of the round key is indeed wrong. Reversing the AddRoundKey calculation from the round example, the valid round key byte resulting in 0x77 is 0x87, not 0xB7.

Therefore the slide was just wrong, the values may have been entered by hand, and 8 looks like a B, so that is very likely.

$\endgroup$
  • $\begingroup$ This are values of round key calculated by my script: 5468617473206d79204b756e67204675 e232fcf191129188b159e4e6d679a293 56082007c71ab18f76435569a03af7fa d2600de7157abc686339e901c3031efb a11202c9b468bea1d75157a01452495b b1293b3305418592d210d232c6429b69 bd3dc287b87c47156a6c9527ac2e0e4e cc96ed1674eaaa031e863f24b2a8316a 8e51ef21fabb4522e43d7a0656954b6c bfe2bf904559fab2a16480b4f7f1cbd8 28fddef86da4244accc0a4fe3b316f26 29c3505f571420f6402299b31a02d73a $\endgroup$ – Filip Franik May 14 '18 at 12:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.