AES column mixing

according to here
http://www.angelfire.com/biz7/atleast/mix_columns.pdf

in page 3, it is stated that

Now, we can add them together. As they are in binary form, addition will be using XOR.
r0 = {02.d4} + {03.bf} + {01.5d} + {01.30}
= 1011 0011 XOR 1101 1010 XOR 0101 1101 XOR 0011 0000
= 0000 0100
= 04 (in Hex)


When I add them manually, the result is 10 0001 1010, which is different from what I get when I xor them. It seems that the xor does not take any carries into account.

Since it is addition according to matrix multiplication, why is xor used instead?
When computers must add two numbers, the rule that: x xor y = (x + y) mod 2 for any two bits x and y allows for very fast calculation, as well.
taken from http://en.wikipedia.org/wiki/Binary_numeral_system
but the xor does not take carries into account leading to a different result from that when I add the 2 numbers manually and taking the carry into account
Last edited on
That's correct, hence the y = (x + y) mod 2 and not y = (x + y).
Last edited on
That's correct, hence the y = (x + y) mod 2 and not y = (x + y).


ahh so that means in the mix columns step of the official AES specification, the calculation should be implemented as y = (x + y) mod 2 and NOT y = (x + y)?
Last edited on
Dunno. But XOR's used here too: http://en.wikipedia.org/wiki/Rijndael_mix_columns
Topic archived. No new replies allowed.