AES (Advanced Encryption Standard) By- Sharmistha Roy M.Tech, CSE 1 st semester NIT, Agartala.

Slides:



Advertisements
Similar presentations
Computer Science Lecture 7 Rijndael – Advanced Encryption Algorithm Professor Wayne Patterson Howard University Fall 2009.
Advertisements

A Clear Text Explanation of the AES Cipher Does a Rijndael By Any Other Name Still Smell As Sweet? October 9 th, Houston Perl Mongers Robert Stone.
AES Sub-Key Generation By Muhammad Naseem. Rotate Word 09CF4F3C.
Origins  clear a replacement for DES was needed Key size is too small Key size is too small The variants are just patches The variants are just patches.
Chap. 5: Advanced Encryption Standard (AES) Jen-Chang Liu, 2005 Adapted from lecture slides by Lawrie Brown.
Formal Verification of Hardware Support For Advanced Encryption Standard Anna Slobodová Centaur Technology This work was done while at Intel.
Cryptography and Network Security Chapter 5 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
Cryptography and Network Security Chapter 5
The Advanced Encryption Standard (AES) Simplified.
Advanced Encryption Standard
Cryptography and Network Security
Algorithm Scheme. AddRoundKey Each round uses four different words from the expanded key array. Each column in the state matrix is XORed with a different.
This Lecture: AES Key Expansion Equivalent Inverse Cipher Rijndael performance summary.
AES clear a replacement for DES was needed
Advanced Encryption Standard. This Lecture Why AES? NIST Criteria for potential candidates The AES Cipher AES Functions and Inverse Functions AES Key.
Cryptography and Network Security (AES) Dr. Monther Aldwairi New York Institute of Technology- Amman Campus 10/18/2009 INCS 741: Cryptography 10/18/20091Dr.
RIJNDAEL Arta Doci University Of Colorado.
The Design of Improved Dynamic AES and Hardware Implementation Using FPGA 游精允.
Introduction to Modern Cryptography Lecture 3 (1) Finite Groups, Rings and Fields (2) AES - Advanced Encryption Standard.
Cryptography and Network Security Chapter 5. Chapter 5 –Advanced Encryption Standard "It seems very simple." "It is very simple. But if you don't know.
Cryptography and Network Security Chapter 5 Fourth Edition by William Stallings.
ICS 454 Principles of Cryptography Advanced Encryption Standard (AES) (AES) Sultan Almuhammadi.
Dr. Lo’ai Tawalbeh 2007 Chapter 5: Advanced Encryption Standard (AES) Dr. Lo’ai Tawalbeh New York Institute of Technology (NYIT) Jordan’s Campus.
ECE454/CS594 Computer and Network Security Dr. Jinyuan (Stella) Sun Dept. of Electrical Engineering and Computer Science University of Tennessee Fall 2011.
Chapter 5 Advanced Encryption Standard. Origins clear a replacement for DES was needed –have theoretical attacks that can break it –have demonstrated.
Cryptography and Network Security
1 University of Palestine Information Security Principles ITGD 2202 Ms. Eman Alajrami 2 nd Semester
Number Theory and Advanced Cryptography 1. Finite Fields and AES
Cryptography and Network Security
Chapter 5 –Advanced Encryption Standard "It seems very simple." "It is very simple. But if you don't know what the key is it's virtually indecipherable."
9/17/15UB Fall 2015 CSE565: S. Upadhyaya Lec 6.1 CSE565: Computer Security Lecture 6 Advanced Encryption Standard Shambhu Upadhyaya Computer Science &
Advance Encryption Standard. Topics  Origin of AES  Basic AES  Inside Algorithm  Final Notes.
AES Background and Mathematics CSCI 5857: Encoding and Encryption.
Information Security Lab. Dept. of Computer Engineering 122/151 PART I Symmetric Ciphers CHAPTER 5 Advanced Encryption Standard 5.1 Evaluation Criteria.
Rijndael Advanced Encryption Standard. Overview Definitions Definitions Who created Rijndael and the reason behind it Who created Rijndael and the reason.
CSCE 715: Network Systems Security Chin-Tser Huang University of South Carolina.
AES Advanced Encryption Standard. Requirements for AES AES had to be a private key algorithm. It had to use a shared secret key. It had to support the.
 Cryptography is the science of using mathematics to encrypt and decrypt data.  Cryptography enables you to store sensitive.
CS555Spring 2012/Topic 101 Cryptography CS 555 Topic 10: Block Cipher Security & AES.
AES: Rijndael 林志信 王偉全. Outline Introduction Mathematical background Specification Motivation for design choice Conclusion Discussion.
Advanced Encryption Standard. Origins NIST issued a new version of DES in 1999 (FIPS PUB 46-3) DES should only be used in legacy systems 3DES will be.
Cryptography Lecture 17: Advanced Encryption Standard (AES) Piotr Faliszewski.
Fifth Edition by William Stallings
Chapter 2 (C) –Advanced Encryption Standard. Origins clearly a replacement for DES was needed –have theoretical attacks that can break it –have demonstrated.
Advanced Encryption Standard Dr. Shengli Liu Tel: (O) Cryptography and Information Security Lab. Dept. of Computer.
AES Encryption FIPS 197, November 26, Bit Block Encryption Key Lengths 128, 192, 256 Number of Rounds Key Length Rounds Block.
DATA & COMPUTER SECURITY (CSNB414) MODULE 3 MODERN SYMMETRIC ENCRYPTION.
Computer Science and Engineering Computer System Security CSE 5339/7339 Lecture 8 September 14, 2004.
Computer Science and Engineering Computer System Security CSE 5339/7339 Lecture 10 September 21, 2004.
Lecture 4 Overview. Data Encryption Standard Combination of substitution and transposition – Repeated for 16 cycles – Provides confusion and diffusion.
Computer Science and Engineering Computer System Security CSE 5339/7339 Lecture 7 September 9, 2004.
Data Security and Encryption (CSE348) 1. Lecture # 9 2.
The Advanced Encryption Standard Part 1: Overview
Le Trong Ngoc Security Fundamentals (2) Encryption mechanisms 4/2011.
Secret Key Systems (block encoding) Encrypting a small block of text (say 64 bits) General considerations for cipher design:
CS480 Cryptography and Information Security
Triple DES.
School of Computer Science and Engineering Pusan National University
Secret Key Systems (block encoding)
Combinations COURSE 3 LESSON 11-3
The Advanced Encryption Standard: Rijndael
Data Security and Encryption (CSE348)
AES Objectives ❏ To review a short history of AES
Advanced Encryption Standard (Symmetric key Algorithm)
Rotors and Secret-Key Encryption
Advanced Encryption Standard
Advanced Encryption Standard
Cryptography and Network Security Chapter 5
Cryptography and Network Security Chapter 5 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
Advanced Encryption Standard (AES)
Presentation transcript:

AES (Advanced Encryption Standard) By- Sharmistha Roy M.Tech, CSE 1 st semester NIT, Agartala

Introduction:  After DES, the need for coming up with a new algorithm was actually because of the perceived weakness in DES. The 56-bit keys of DES were no longer considered safe against attacks based on exhaustive key searches and the 64-bit blocks were also considered as weak.  AES was to be based on 128-bit blocks, with 128-bit keys or 192-bit or 256-bit keys.  In general, two versions of AES are used: 128-bit plain text block combined with 128-bit key block and 128-bit plain text block combined with 256-bit key block.  Many proposals of AES were submitted and after a lot of debate, an algorithm called as Rijndael was accepted. It was developed by Joan Daemen and Vincent Rijmen.

 According to its designers, the main features of AES are: a.Symmetric and parallel structure: This gives the implementers of the algorithm a lot of flexibility. It also stands up well against cryptanalysis attacks. b.Adapted to modern processors: The algorithm works well with modern processors (Pentium, RISC, parallel) c.Suited to smart cards: The algorithm can work well with smart cards.  Since 128-bits give a possible key range of 2^128 or 3*10^38 keys, so AES is very much secure and faster than Triple-DES.  Rijndael has a variable number of rounds. i.10 if both the block and the key are 128 bits long. ii.12 if either the block or the key is 192 bits long, and neither of them is longer than that. iii.14 if either the block or the key is 256 bits long.  One key differentiator between DES and Rijndael is that all the Rijndael operation involve entire byte and not individual bits of a byte. Introduction:

Operation of each round STATE Sub bytes STATE Shiftrows Mixcolumns AddRoundKey STATE One AddRoundKey is applied before the first round. The Mix column is missing at last round. Structure of each round

AES Process:  Block: A block in AES is a group of 128 bits which is represented as a row matrix of 16 bytes.  State: The data block in AES are treated as State. For example Let us take a text block “AES USES A MATRIX”. To make it 16 bytes add Z at the end. Now assign values to the characters from 0 to 25. Form state matrix with their equivalent two hexadecimal digits.

State Processing: Text: Hex : Step-1: Hence the resulting State Matrix is as follows: 00120C (4 X 4) matrix Step-2: Pre-round operation Here in this step the state matrix is added with the cipher key i.e. (the key matrix containing W[0] to W[3]). Addition means performing XOR operation. AESUSESAMATRIXZZ C AES Encryption Procedure

Pre-round Operation: Hence the resulting State Matrix after pre-round is as follows: Step-3: Sub-byte Transformation Next step is the sub-byte transformation, which requires S-box. Byte by byte substitution is done to replace the contents of the state array with the respective entries in the S-box. 6A6D736A A6D C Cipher KeyState matrix  6A7F E6A D

AES S-Box Lookup Table A B C D E F C 77 7B F2 6B 6F C B FE D7 AB 76 1 CA 82 C9 7D FA F0 AD D4 A2 AF 9C A4 72 C0 2 B7 FD F F7 CC 34 A5 E5 F1 71 D C7 23 C A E2 EB 27 B C 1A 1B 6E 5A A0 52 3B D6 B3 29 E3 2F D1 00 ED 20 FC B1 5B 6A CB BE 39 4A 4C 58 CF 6 D0 EF AA FB 43 4D F9 02 7F 50 3C 9F A A3 40 8F 92 9D 38 F5 BC B6 DA FF F3 D2 8 CD 0C 13 EC 5F C4 A7 7E 3D 64 5D F DC 22 2A EE B8 14 DE 5E 0B DB A E0 32 3A 0A C C2 D3 AC E4 79 B E7 C8 37 6D 8D D5 4E A9 6C 56 F4 EA 65 7A AE 08 C BA E 1C A6 B4 C6 E8 DD 74 1F 4B BD 8B 8A D 70 3E B F6 0E B9 86 C1 1D 9E E E1 F D9 8E 94 9B 1E 87 E9 CE DF F 8C A1 89 0D BF E D 0F B0 54 BB 16

Sub-byte: The sub-byte transformation of the above example is: 02D2D2AA A3EF92B1 EFBCF302 D09D923C Shift rows Transformation: Row 0 : 0 byte Lshift Row 1 : 1 byte Lshift Row 2: 2 byte Lshift Row 3: 3 byte Lshift

Shift row Transformation: Step-4: Shift-row Transformation Shift-row transformation involves byte-wise left shift. The shift- row transformation of the above example is: Mix- column Transformation: D2 AA EF92B1A3 F302EFBC 3CD09D92 Step-5: Mix-column Transformation The mix column transformation operates at the column level. It transform each column of the state to a new column. This transformation is actually a matrix multiplication of state column by a constant square matrix. The constant matrix is as:

Mix column overview = X state constant Mix column state

Mix column overview B1=(b1*2)  (b2*3)  (b3*1)  (b4*1) B2=(b1*1)  (b2*2)  (b3*3)  (b4*1) B3=(b1*1)  (b2*1)  (b3*2)  (b4*3) B4=(b1*3)  (b2*1)  (b3*1)  (b4*2) B5=(b5*2)  (b6*3)  (b7*1)  (b8*1) B6=(b5*1)  (b6*2)  (b7*3)  (b8*1) B7=(b5*1)  (b6*1)  (b7*2)  (b8*3) B8=(b5*3)  (b6*1)  (b7*1)  (b8*2) b1b5b9b13 b2 b6b10b14 b3 b7b11b15 b4 b8b12b16 B1B5B9B13 B2 B6B10B14 B3 B7B11B15 B4 B8B12b16 Constant matrix 16 byte state array Mix-column array

In this example mix-column operation is as: B1=02*2  EF*3  F3*1  3C*1 02*2=( )( ) =(x)(x) = x^2 = EF*3=( )( ) = (x^7 + x^6 + x^5 + x^3+x^2+x+1)(x+1) =x^8+x^7+x^6+x^4+x^3+x^2+x+x^7+x^6+x^5+x^3+x^2+x+1 = x^8+x^5+x^4+1 (mod x^8+x^4+x^3+x+1) = x^5+x^3+x = F3*1=F3= C*1=3C= Mix column operation: 02 EF F3 3C X

B1=    = = E1 This matrix multiplication can be done with the help of another method known as Galois Field Multiplication, which involves the use of L-Table & E-table. All numbers being multiplied using the Mix Column function converted to HEX will form a maximum of 2 digit Hex number. We use the first digit in the number on the vertical index and the second number on the horizontal index. If the value being multiplied is composed of only one digit we use 0 on the vertical index. Multiplication in GF(2 8 ) consists of multiplying two polynomials modulo an irreducible polynomial of degree 8. –AES uses the following irreducible polynomial Mix column operation: m(x) = x 8 + x 4 + x 3 + x + 1

L-Table A B C D E F A C6 4B C7 1B EE DF E0 0E 34 8D 81 EF 4C C8 F8 69 1C C1 2 7D C2 1D B5 F9 B9 27 6A 4D E4 A6 72 9A C F 8A F E F DA 8E F DB BD 36 D0 CE C D2 F DD FD 30 BF 06 8B 62 B3 25 E E 6E 48 C3 A3 B6 1E 42 3A 6B FA 85 3D BA 7 2B 79 0A 15 9B 9F 5E CA 4E D4 AC E5 F3 73 A AF 58 A8 50 F4 EA D6 74 4F AE E9 D5 E7 E6 AD E8 9 2C D7 75 7A EB 16 0B F5 59 CB 5F B0 9C A9 51 A0 A 7F 0C F6 6F 17 C4 49 EC D8 43 1F 2D A4 76 7B B7 B CC BB 3E 5A FB 60 B1 86 3B 52 A1 6C AA D C 97 B BE DC FC BC 95 CF CD 37 3F 5B D1 D C 41 A2 6D A 9E 5D 56 F2 D3 AB E D E 89 B4 7C B E3 A5 F 67 4A ED DE C5 31 FE 18 0D 63 8C 80 C0 F

A B C D E F F FF 1A 2E A1 F F E D A4 F A 1E AA 2 E5 34 5C E EB 26 6A BE D AB E F5 04 0C 14 3C 44 CC 4F D1 68 B8 D3 6E B2 CD 4 4C D4 67 A9 E0 3B 4D D7 62 A6 F E B9 D0 6B BD DC 7F B3 CE 49 DB 76 9A 6 B5 C4 57 F F0 0B 1D BB D6 61 A3 7 FE 19 2B 7D AD EC 2F AE E A0 8 FB 16 3A 4E D2 6D B7 C2 5D E FA 15 3F 41 9 C3 5E E2 3D 47 C9 40 C0 5B ED 2C 74 9C BF DA 75 A 9F BA D5 64 AC EF 2A 7E 82 9D BC DF 7A 8E B 9B B6 C1 58 E AF EA 25 6F B1 C8 43 C5 54 C FC 1F A5 F B 2D B0 CB 46 CA D 45 CF 4A DE 79 8B A8 E3 3E 42 C6 51 F3 0E E A EE 29 7B 8D 8C 8F 8A A7 F2 0D 17 F 39 4B DD 7C A2 FD 1C 24 6C B4 C7 52 F6 01 E-Table

Galois Field Operation For example if the two Hex values being multiplied are AF * 8 we first lookup L (AF) index which returns B7 and then lookup L (08) which returns 4B. Once the L table lookup is complete we can then simply add the numbers together. The only trick being that if the addition result is greater then FF we subtract FF from the addition result. For example AF+B7= 166. Because 166 > FF, we perform: 166-FF which gives us 67. The last step is to look up the addition result on the E table. Again we take the first digit to look up the vertical index and the second digit to look up the horizontal index. For example E (67)=F0. There fore the result of multiplying AF * 8 over a Galois Field is F0 Note: In the last round i.e. round 10 we omit the mix-column operation

Key Adding Step-6: Add round Key The most important transformation is to include cipher key. If cipher is not added with the state at each round it is very easy to find the plain text from cipher text. The cipher key is only secret between sender and receiver. Each round key is 128 bits long and its form 4X4 matrix for each step. Add round key also proceeds one column at a time. Add round key adds a round key with each state column matrix. The operation in add round key is matrix addition. (addition means XOR operation) So in 1 st round the add round key uses the round key from w[4] to w[7] and in the last i.e. 10 th round the add round key uses the round key from w[40] to w[43].

Key Processing:  To create round key for each round AES uses a key expansion processes.  The first round key is used for pre-round transformation i.e. (W0 to W3).  The remaining round keys are used for Add round Key i.e. the last transformation of each round.  Key expansion routine creates keys word by word where a word is an array of 4 bytes. RoundWords Pre-roundW0 W1 W2 W3 1W4 W5 W6 W7 2W8 W9 W10 W11 10W40 W41 W42 W43

Key Expansion:  The first words ( w0,w1,w2,w3 ) are made from the cipher key. The cipher key is thought of as an array of 16 (k0…k15) bytes. The first four bytes (k0..k3) become w0, next 4 bytes become w1 and so on.  The rest of the words w4 to w43 are made as follows: a) if (i mod 4) ≠0 wi=w(i-1) w(i-4) b) if (i mod 4) = =0 wi=t w(i-4) where t is a temporary word, result of applying two routines subword and rotword on wi-1 and X-ORing the result with a round constant t = subword(rotword(w(i-1))) constant [i /4]

Rotword: similar to shiftrows Subword: similar to subbyte operation in earlier cases Roundconstant: The round constant matrix is as: Key Expansion: B36 round Const

Key Processing Let us take one key matrix 6A6D736A A6D W[0] W[1] W[2] W[3] Next we have to find out W[4], W[5], W[6], W[7] For W[4], since i mod 4 =0 so, W[4]= t XOR W[i-4] = t XOR W[0] Here t= subword(rotword(w[i-1])) XOR constant [i /4] = subword(rotword(W[3])) XOR constant [0] For W[5], since I mod 4 = 0 so, W[5] = W[i-1] XOR W[i-4] = W[4] XOR W[1] In this way keys are created from W[4] to W[43]. F69BE882 FA9FEB9E E18BE W[4] W[5] W[6] W[7]

Finding W[4]: W[3]= 6A Rotword W[3]= A Subword(Rotword W[3])= subword( A)= 9D 8F Subword(Rotword W[3]) XOR constant [0] = 9D 8F XOR = 9C 8F Therefore W[4]= t XOR W[0] = 9C 8F XOR 6A = F6 FA E1 76 Finding W[5]: W[5]= W[4] XOR W[1] = F6 FA E1 76 XOR 6D 65 6A 75 = 9B 9F 8B 03 Key Processing

 Decryption algorithm uses the expanded key in reverse order.  All functions are easily reversible and their inverse form is used in decryption.  Decryption algorithm is not identical to the encryption algorithm.  In the beginning there is a pre-round operation using the cipher text as the state matrix and the last round key as the key matrix(i.e. W[40] to W[43]).  Again, final round consists of only three stages. Mix- column operation is omitted here. AES Decryption Procedure

Conclusion of AES