AES

You should know First

Polynomial calculation

1.Overview 

DES is unsecure because of short length of key.3-DES is secure with 3*56-bit key, but too slow.

AES is considered good security with 128-bit block size, 128, 192, 256-bit key coordinating with 10,12,14 rounds encryption respectively.


Overview structure of AES

1.Key addition at start.

2.Enter rounds of encryption. Each rounds include Byte Substitution Layer, Confusion Layer( Shift Row and Mix Column) and Key Addition Layer. We should be careful that there is no Mix Column Layer in last round.

3.get ciphertext by overall 10 rounds of step 2 .

2.Block structure    

AES uses substitution-permutation network(rather than Feistel Network) and arranges plaintext block with 4×4 matrix filling it downwards and then right. Each elements is 8-bit string.So we can conclude that the block size is 4×4×8=128 bit.

4*4 matrix 

3.Detailed description for one round 


1.Byte Substitution

Each byte in the current 4×4 state matrix is used as an index to the S-box, obtaining a new byte for that position.

S-box

For example, the input byte is 10010100 which is 94 in hex. We can find the result 22  from the S table according to the coordinate.

We also can illustrate the Substitution in terms of polynomial calculation. The substitution operation for a byte B is defined as follows.

1.First compute the multiplicative inverse (known to have good non-linearity properties) of B  in the AES field(GF(2^8)) , to obtain B'=[x7,...,x0]. In this step, the zero element is mapped to [0,...,0].

2.Then compute a new bit vector B''=[y7,...,y0] with the following transformation in F2(observe that the vector addition is the same as an xor \oplus ):


This transformation avoid any fixed points(input and output is different,so is a derangement),also any opposite fixed point (

)

The result of substitution is B''.

Significance: Operating on every single byte independently. This gives the non-linearity  and confusion in AES.


2.Shift Rows

Shift Rows perform cyclic shift on the state matrix just as the figure below.

Significance: This is a kind of Byte permutation(the elements for operation is Byte), which provide diffusion for AES. In this way, each column of the output state of the ShiftRows step is composed of bytes from each column of the input state. The importance of this step is to avoid the columns being encrypted independently, in which case AES degenerates into four independent block ciphers.


3.Mix Column

Mixing each column separately.This operation is achieved by multiplying with matrix.

Significance: The MixColumns function takes four bytes as input and outputs four bytes, where each input byte affects all four output bytes. Together with ShiftRows, MixColumns provides diffusion in the cipher.


4.Key addition

The key is 128 bits. And we compute 10× 128-bit subkeys for each round. Those keys can also be represented as 4×4 matrix because of the same size(128-bit) as  plaintext blocks.

Just simple xor \oplus  with state matrix.

5.Overall



4 Rijndael's Key schedule

Derive round keys K i as follows. Split K into four words W0 , W1 , W2 and W3 of 32 bits each.

SubBytes is an application of the AES S-box to each of the four bytes of the word.

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • rljs by sennchi Timeline of History Part One The Cognitiv...
    sennchi阅读 7,449评论 0 10
  • 本质:感情的欲望/愿望/希望/梦想/幻想 看牌感觉,圣杯王子手里拿着两样东西,一个是圣杯里面的蛇,一个是莲花,圣杯...
    星野8阅读 823评论 0 0
  • 第一章 “头,好痛 我这是在哪儿”倒在一条街道的巷子中的少年喃喃低语道 正说着慢慢走出这条巷子 来到主街...
    奕出尘阅读 421评论 0 1
  • 今天,放学的时候,我的眼睛不舒服,就把眼镜摘下来,揉了揉。这时尹一斐抬起头,天真地说:“老师,我想看你没带眼镜...
    武林大会阅读 365评论 0 7
  • 我在门口站着 一只鸟儿飞过 眼里盛满五月的油桐花 它把目光丢在窗台上 我用手指梳理长发 掉了一地昨夜的眠 吟哦几首...
    王紅林阅读 153评论 3 2