Search code examples
aes

AES round key generation


I was reading an article regarding AES algorithm. For Round 0 key generation, one of the steps is to add the round constant to the output from s-box. ex: Byte Substitution (S-Box): (B7; 5A; 9D; 85)  Adding round constant (01; 00; 00; 00) gives: g(w[3]) = (B6; 5A; 9D; 85)

Could someone explain how B6 is arrived at?


Solution

  • It's a simple XOR:

    B XOR 0 = B and 7 XOR 1 = 0111 XOR 0001 = 6