Take the 2-minute tour ×
Information Security Stack Exchange is a question and answer site for Information security professionals. It's 100% free, no registration required.

I am trying to go through all of the the steps in the Rijndael Encryption Algorithm using pencil and paper. I have been using http://www.formaestudio.com/rijndaelinspector/archivos/Rijndael_Animation_v4_eng.swf as an example. The mix columns step has a lot involved in it. To further explain it, I have been following http://www.angelfire.com/biz7/atleast/mix_columns.pdf . That is really nice because it uses the same numbers as in the first link. My problem is that when I get to the part that looks says this:

Now another thing to remember, there is a rule established in the multiplication of the values as 
written in the book, Cryptography and Network Security[2], that multiplication of a value by x (ie. 
by 02) can be implemented as a 1-bit left shift followed by a conditional bitwise XOR with (0001 
1011) if the leftmost bit of the original value (before the shift) is 1. We can implement this rule in 
our calculation. 
{d4}.{02} = 1101 0100 << 1 (<< is left shift, 1 is the number of shift done, pad on with 0's)
     = 1010 1000 XOR 0001 1011 (because the leftmost is a 1 before shift)
     = 1011 0011 (ans)
    Calculation:
    1010 1000
    0001 1011 (XOR)
    ---------
    1011 0011

My questions is, where do they get the 0001 1011 from? They are supposed to XOR 1010 1000 by 02. Do I use this number every time, even for the next step which is {03} . {bf}? It looks like they use 0101 1101 for the XOR calculation.

It really helps to look at the pictures from the first link to follow along here.

share|improve this question
    
"They are supposed to XOR 1010 1000 by 02" Where did you get this impression? –  deed02392 May 7 at 9:09

1 Answer 1

For the time being, what I can say is that 0001 1011 is a value given and used in the book Cryptography and Network Security to quicken the calculation of the value (which is most likely been used in most of the computation) How do they derive the number? Well, I am not really the expert but I believe this greatly involves Finite Field Theory GF(2^m). If I could get good example, I will probably explain it (if I can get the theory right).

While saying this, please be reminded that while using this method of bit shift and XOR, note that you should only XOR 0001 1011 when, and ONLY when, the first bit of the value is 1 before the shift. Therefore, in the example, 1101 0100 has its first bit as 1, so when doing a multiplication, it will need do an XOR 0001 1011. Addition to this criteria, this is only used when you are multiplying with multiplier of 2. Thus, in the second example in the document, {03} is broken down to {02} XOR {01} which is also suggested by the book and multiply respectively. I believe it is shown in the document.

PS. The calculation is up for reading, do let me know if you are feeling unclear: http://kwof.blogspot.sg/2014/05/aes-mix-columns-calculation-some-more.html

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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