You are on page 1of 16

AES ENCRYPTION

STEPS:
STEPS IN EACH ROUND
• 1)Substitute bytes
• 2)Shift rows
• 3)Mix columns
• 4)Add round key
SUBSTITUTE BYTES
• S-BOX:
• Fill a 16x16 matrix with integers from 0 to 256
• Replace each element with its multiplicative inverse modulo the
polynomial(x8+x4+x3+x+1) over the GF (28) field
• Apply the affine transformation
SHIFT ROWS
• The first row is not shifted
• The second row is circularly shifted to the left by one byte
• The third row is circularly shifter to the left by 2 bytes
• The fourth row is circularly shifted to the left by 3 bytes
MIX COLUMNS
KEY EXPANSION
• G(w(i-1):
• Perform a one byte left circular rotation on w(i-1)
• Perform byte substitution using the s-box
• XOR with a fixed round constant for each i
• RC(i)={'01','02','04','08','10','20','40','80','1B','36'}
• Round_constant={RC(i),0,0,0}
DECRYPTION STEPS:
• Inverse shift rows
• Inverse substitution
• Add round key
• Inverse mix columns
INVERSE SHIFT ROWS:
• The first row is not shifted
• The second row is circularly shifted to the right by one byte
• The third row is circularly shifter to the right by 2 bytes
• The fourth row is circularly shifted to the right by 3 bytes
INVERSE MIX COLUMNS
INVERSE SUBSTITUTION:
• In this step, each byte is substituted by an element of an inverse S-
box. The inverse S-box is constructed as follows:
• Take inverse affine transformation on all elements of s-box
• Take multiplicative inverse of each element
INFERENCE
• All operations in AES are byte-oriented whereas operations in DES are bit-
oriented. Hence AES provides faster performance in both hardware and software
• The time taken to break the cipher using brute-force attack would be 2128 for 128-
bit cipher which is a theoretical time as it is very large. Hence AES is almost
secure from brute-force attacks
• The “Substitution” step ensures that there is no correlation between the plain
text and the cipher text
• The “shift rows” and “mix columns” steps scramble the byte order effectively
• The key expansion algorithm takes care such that if a single byte of the key is
changed, many corresponding rounds are affected.
• In DES there are some weak keys where the key is the same for all the rounds. In
AES this problem will not arise .
RESULTS
The key used:
keyh =
Columns 1 through 15
'00' '01' '02' '03' '04' '05' '06' '07' '08' '09' '0a' '0b' '0c' '0d' '0e'
Column 16
'0f’
The plain text:
plaintext_hex =
Columns 1 through 15
'00' '11' '22' '33' '44' '55' '66' '77' '88' '99' 'aa' 'bb' 'cc' 'dd' 'ee'
Column 16
'ff’
This is the ciphertext after applying the AES algorithm:
state_out =
105 106 216 112
196 123 205 180
224 4 183 197
216 48 128 90
THANK YOU

You might also like