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.

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末横腿,一起剝皮案震驚了整個濱河市申钩,隨后出現(xiàn)的幾起案子胀糜,更是在濱河造成了極大的恐慌嵌器,老刑警劉巖隧哮,帶你破解...
    沈念sama閱讀 217,826評論 6 506
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件攀甚,死亡現(xiàn)場離奇詭異,居然都是意外死亡,警方通過查閱死者的電腦和手機廓块,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 92,968評論 3 395
  • 文/潘曉璐 我一進店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來契沫,“玉大人剿骨,你說我怎么就攤上這事〔和剩” “怎么了?”我有些...
    開封第一講書人閱讀 164,234評論 0 354
  • 文/不壞的土叔 我叫張陵挤庇,是天一觀的道長钞速。 經(jīng)常有香客問我,道長嫡秕,這世上最難降的妖魔是什么渴语? 我笑而不...
    開封第一講書人閱讀 58,562評論 1 293
  • 正文 為了忘掉前任,我火速辦了婚禮昆咽,結(jié)果婚禮上驾凶,老公的妹妹穿的比我還像新娘。我一直安慰自己掷酗,他們只是感情好调违,可當我...
    茶點故事閱讀 67,611評論 6 392
  • 文/花漫 我一把揭開白布。 她就那樣靜靜地躺著泻轰,像睡著了一般技肩。 火紅的嫁衣襯著肌膚如雪。 梳的紋絲不亂的頭發(fā)上浮声,一...
    開封第一講書人閱讀 51,482評論 1 302
  • 那天虚婿,我揣著相機與錄音,去河邊找鬼泳挥。 笑死然痊,一個胖子當著我的面吹牛,可吹牛的內(nèi)容都是我干的屉符。 我是一名探鬼主播剧浸,決...
    沈念sama閱讀 40,271評論 3 418
  • 文/蒼蘭香墨 我猛地睜開眼,長吁一口氣:“原來是場噩夢啊……” “哼矗钟!你這毒婦竟也來了辛蚊?” 一聲冷哼從身側(cè)響起,我...
    開封第一講書人閱讀 39,166評論 0 276
  • 序言:老撾萬榮一對情侶失蹤真仲,失蹤者是張志新(化名)和其女友劉穎袋马,沒想到半個月后,有當?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體秸应,經(jīng)...
    沈念sama閱讀 45,608評論 1 314
  • 正文 獨居荒郊野嶺守林人離奇死亡虑凛,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點故事閱讀 37,814評論 3 336
  • 正文 我和宋清朗相戀三年碑宴,在試婚紗的時候發(fā)現(xiàn)自己被綠了。 大學時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片桑谍。...
    茶點故事閱讀 39,926評論 1 348
  • 序言:一個原本活蹦亂跳的男人離奇死亡延柠,死狀恐怖,靈堂內(nèi)的尸體忽然破棺而出锣披,到底是詐尸還是另有隱情贞间,我是刑警寧澤,帶...
    沈念sama閱讀 35,644評論 5 346
  • 正文 年R本政府宣布雹仿,位于F島的核電站增热,受9級特大地震影響,放射性物質(zhì)發(fā)生泄漏胧辽。R本人自食惡果不足惜峻仇,卻給世界環(huán)境...
    茶點故事閱讀 41,249評論 3 329
  • 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望邑商。 院中可真熱鬧摄咆,春花似錦、人聲如沸人断。這莊子的主人今日做“春日...
    開封第一講書人閱讀 31,866評論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽恶迈。三九已至影锈,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間蝉绷,已是汗流浹背鸭廷。 一陣腳步聲響...
    開封第一講書人閱讀 32,991評論 1 269
  • 我被黑心中介騙來泰國打工, 沒想到剛下飛機就差點兒被人妖公主榨干…… 1. 我叫王不留熔吗,地道東北人辆床。 一個月前我還...
    沈念sama閱讀 48,063評論 3 370
  • 正文 我出身青樓,卻偏偏與公主長得像桅狠,于是被迫代替她去往敵國和親讼载。 傳聞我的和親對象是個殘疾皇子,可洞房花燭夜當晚...
    茶點故事閱讀 44,871評論 2 354

推薦閱讀更多精彩內(nèi)容

  • rljs by sennchi Timeline of History Part One The Cognitiv...
    sennchi閱讀 7,331評論 0 10
  • 本質(zhì):感情的欲望/愿望/希望/夢想/幻想 看牌感覺中跌,圣杯王子手里拿著兩樣東西咨堤,一個是圣杯里面的蛇,一個是蓮花漩符,圣杯...
    星野8閱讀 795評論 0 0
  • 第一章 “頭一喘,好痛 我這是在哪兒”倒在一條街道的巷子中的少年喃喃低語道 正說著慢慢走出這條巷子 來到主街...
    奕出塵閱讀 406評論 0 1
  • 今天,放學的時候,我的眼睛不舒服凸克,就把眼鏡摘下來议蟆,揉了揉。這時尹一斐抬起頭萎战,天真地說:“老師咐容,我想看你沒帶眼鏡...
    武林大會閱讀 363評論 0 7
  • 我在門口站著 一只鳥兒飛過 眼里盛滿五月的油桐花 它把目光丟在窗臺上 我用手指梳理長發(fā) 掉了一地昨夜的眠 吟哦幾首...
    王紅林閱讀 145評論 3 2