Can someone explain this to me? For example how M chanes to 0c?

Changing plaintext to state:

enter image description here

  • $\begingroup$ that is a terrible example, "M" is not represented by 0x0c in any standard encoding $\endgroup$ Nov 2 '14 at 10:04
  • $\begingroup$ that's what i'm saying! I took this picture from a pdf that explains AES alghorithm. $\endgroup$
    – hamedb71
    Nov 2 '14 at 10:08
  • $\begingroup$ If this is not right so in general how text changes to state? $\endgroup$
    – hamedb71
    Nov 2 '14 at 10:09
  • $\begingroup$ that is only good at showing where in the state the plaintext bytes are placed, it treats the input as a stream that is placed in the columns top to bottom, left to right $\endgroup$ Nov 2 '14 at 10:56

This question has nothing to do with AES; instead, it has to do with an encoding that someone picked for this example (and the fact that you have questions about it indicates that it wasn't a great choice by whoever came up with the example).

The encoding is simple; we translate the letters 'A' through 'Z' to the integers 0 to 25, which is in hexidecimal the values 00 through 1A.

M is the 12th letter after A, and hence it is translated into the integer 12, which is 0C in hex.

  • $\begingroup$ Thanks it was so helpful. One more question:Is this method (translate letters to integers as you mentioned) apply in all encryption algorithms? $\endgroup$
    – hamedb71
    Nov 2 '14 at 13:06
  • $\begingroup$ @hamedb71: just about all modern encryption systems handle strings of bytes (or, more generally, a string of bits); whoever uses it is expected to translate his message (in whatever format it is in) into a string of bytes. This translation from 'A'-'Z' -> 0-25 is one possible translation, however it is not the most common. The most common would be to take the ASCII (or Unicode) values, and reinterpret those as a string of bytes. $\endgroup$
    – poncho
    Nov 2 '14 at 18: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.