2015年1月26日 星期一

Cryptography and Network Security-ch7

Ch7 Advanced Encryption Standard

●3 version
1. AES 128(10 round, cipher key:128 bit)
2. AES 192(12 round, cipher key:192 bit)
3. AES 256(14 round, cipher key:256 bit)
●steps
1. Pre-round
    和key做XOR
2. Subbyte(Substation)
    
3. Shiftrow(Permutation)
  每個row做left shift 
 Row1: x
 Row2: 1 byte
 Row3: 2 byte
 Row4: 3 byte
4. Mix column 
 每個column獨立做(column乘constant matrix)
 最後一個column不做
5. Add round key
 每個column獨立做, plaintext 和 roundkey 做 XOR
6. 2, 3, 4, 5為一個round 依照不同version 做不同round
AES總流程圖
AES每個round的流程圖

● key expansion

1. AES 128:每個round需要4個word(wi, wi+1, wi+2, wi+3)
  (1). pre-round:w0, w1, w2, w3 為cipher key
  (2). 當i mod 4 = 0:
    wi = t + wi-4
    t = Sub(Rot(wi-1)) + Rcon[i/4]
  (3). 當i mod 4 ≠ 0:
    wi = wi-1 + wi-4
AES key產生圖

2. AES 192:每次產生6個word(wi, wi+1, wi+2, wi+3, wi+4, wi+5)
  和AES 128同,但4均改為6
  (wi = t + wi-6)
  ( wi = wi-1 + wi-6)
3. AES 256:每次產生8個word(wi, wi+1, wi+2, wi+3, wi+4, wi+5, wi+6, wi+7)
  (1). pre-round:w0, w1, w2, w3 為cipher key
  (2). 當i mod 8 = 0:
    wi = t + wi-8
    t = Sub(Rot(wi-1)) + Rcon
  (3). 當i mod 4 = 0, 且i mod 8 ≠ 0:
    wi = SubWord(wi-1) + wi-8
  (4). 當i mod 8 ≠ 0:
    wi = wi-1 + wi-8



1 則留言:

  1. Best Casino Site
    Lucky luckyclub Club Casino is an online casino in the UK where you can play games like roulette, blackjack, baccarat and live dealer. Read more about this website and enjoy

    回覆刪除