SlideShare a Scribd company logo
1 of 28
 AES : Advanced encryption algorithm
 AES was to be based on 128 bit block with 128 bit
keys
 Steps are:
 One time initialization process:
 Expand the 16 byte key to get the actual key block
to be used.
 Do one time initialization of the 16 byte plain text
block(state)
 XOR the state with the key block
 For each round do the following:
 Apply S-box to each of the plain text bytes.
 Rotate row k of the plain text block by k bytes
 Perform a mix column operation
 XOR the state with the key block.
 One time initialization process:
 Expand the 16 byte key to get the actual key block
to be used:
 Inputs to the algo are the key and the plain text
 The key size is 16 bytes this step expands this 16
byte key into 11 arrays .each array contains 4 rows
and 4 columns
 In other words , the original 16 byte key array is
expanded into a key containing 11*4*4=176 bytes
 One of these 11 arrays is used in the initialization
process and other 10 arrays are used in the 10
rounds , one array per round.
 In the context of AES a word uses 4 bytes.
Therefore in the current context our 16 byte initial
key will be expanded into 176 byte key
i.e. 44 words
 firstly , the original 16 byte key is copied into the first
4 words of the expanded key
 The remaining 10 arrays are depends on the
immediately preceding block and the block 4 position
earlier to it
 That is every added word w[i] depends on w[i-1] and
w[i-4]
 This fills four words at a time.
 For filling these four words at a time the following
logic is used.
 A if the word in the W array is a multiple of four
(w[4],w[8],w[12] and so on) than we perform three
function Titled Substitution , Rotate ,Constant
 B if the current word in the output key block is not a
multiple of four we simply perform XOR operation
of the previous word and the word four places
earlier and store it as the output word
 For example for w[5] we perform XOR between
w[4] and w[1] and store there output as w[5]
 For example: for this we need to take one byte at a
time
 Suppose our first byte is 0d.looking it up in the s
box with x=0 and y=D produces D7
 In the function constant , the output of the above
step is XORed with a constant. This constant is a
word ,consting of 4 bytes
 The value of the constant is depends on the round
number
 The last three bytes of a constant word always
contain 0
 These constant values are:
round
number 1 2 3 4 5 6 7 8 9 10
CON
ST.
01 02 04 08 10 20 40 80 1B 36
 lets take an example
 Suppose that our original unexpanded 4 word key
is as shown:
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
in the first four round , the original 4 word input key would be copied
into the first 4- word output key, as per our algo
To populate w[4] the following algo is used:
For(i=4;i<44;i++)
{
Tmp=w[i-1];
If ( i mod 4==0)
Tmp=substitute(rotate(tmp)) XOR constant[i/4];
W[i]=w[i-4] XOR tmp;
}
Based on this ,we will have the following
Tmp=w[i-1]=w[4-1]=w[3]= 0C 0D 0E 0F
Since i=4 , I mod 4 is 0 . Therefore , we will now have the following
step;
 Tmp=substitute(rotate(tmp)) XOR constant[i/4];
 Rotate (temp) =rotate(0C 0D 0E 0F)
 =0D 0E 0F 0C
 now we do substitution(Rotate (temp) )
 For this we will take one byte at a time and look up in S
box for substitution.
 For example our first byte is 0D
 We will see in s box where x=0 and y=D and produces
D7
 Thus at the end of substitution(Rotate (temp) ) we will
get D7 AB 76 FE.
 We now XOR this value with constant[i/4]
 i.e. constant[1] which is 01(as per our table of constant)
 Now D7 AB 76 FE
 XOR 01 00 00 00
 thus our new temp value is D6 AB 76 FE
 Finally we XOR this temp value with w[i-4] i.e. w[4-
4] =w[0]
 D6 AB 76 FE
 XOR 00 01 02 03
 = D6 AA 74 FD
 thus w[4]= D6 AA 74 FD
 We will use the same logic to derive the remaining
expanded key blocks w[5] to w[44].
 Do one time initialization of the 16 byte plain text
block(state)
 the 16 byte plain text block is copied into a two
dimensional 4 * 4 array called as state.
 The order of the copying is in the column order.
 XOR the state with the key block:
 Now the first 16 bytes of the expanded
key(w[0],w[1],w[2],w[3]) are XORed into the 16-byte
state array.
 Thus every byte in the state array is replaced by
the xor of itself and the corresponding byte in the
expanded key.
 at this stage , the initialization is complete and we
are ready for rounds.
 Process in each rounds:
 The following steps are executed 10 times , one per
round
 A ) apply S-box to each of the plain text bytes:
 The content of the state array are looked up into the
s box .
7.18
7.2.1 Continue
Figure 7.6 SubBytes transformation
7.19
7.2.1 Continue
7.20
7.2.1 Continue
7.21
7.2.1 Continue
Example 7.2
Figure 7.7 shows how a state is transformed using the SubBytes
transformation. The figure also shows that the InvSubBytes
transformation creates the original one. Note that if the two bytes
have the same values, their transformation is also the same.
Figure 7.7 SubBytes transformation for Example 7.2
 B) rotate row k of the plain text block by k bytes:
 Each of the four rows of the state array are rotated
to the left. Row 0 is rotated 0 bytes , row 1 is
rotated by 1 byte ,
 Row 2 is rotated by 2 byte and row 3 is rotated by
3 byte
 Example:
7.23
7.2.2 Permutation
Figure 7.9 ShiftRows transformation
7.24
7.2.2 Continue
Example 7.4
Figure 7.10 shows how a state is transformed using ShiftRows
transformation. The figure also shows that InvShiftRows
transformation creates the original state.
Figure 7.10 ShiftRows transformation in Example 7.4
 C) perform a mix column operation:
 Output of this step is the matrix multiplication of
the old value and a constant matrix.
7.26
7.2.3 Continue
Figure 7.13 MixColumns transformation
 XOR the state with the key block:
 This step XORes the key for this round into the
state array
Aes(Advance Encryption Algorithm)

More Related Content

Similar to Aes(Advance Encryption Algorithm)

“Optimized AES Algorithm Core Using FeedBack Architecture”
“Optimized AES Algorithm Core Using FeedBack Architecture” “Optimized AES Algorithm Core Using FeedBack Architecture”
“Optimized AES Algorithm Core Using FeedBack Architecture”
Nirav Desai
 

Similar to Aes(Advance Encryption Algorithm) (20)

Block Encryption Algorithm Project.docx
Block Encryption Algorithm Project.docxBlock Encryption Algorithm Project.docx
Block Encryption Algorithm Project.docx
 
Modern Block Cipher- Modern Symmetric-Key Cipher
Modern Block Cipher- Modern Symmetric-Key CipherModern Block Cipher- Modern Symmetric-Key Cipher
Modern Block Cipher- Modern Symmetric-Key Cipher
 
AES.pptx
AES.pptxAES.pptx
AES.pptx
 
CMS lecture 7
CMS lecture 7CMS lecture 7
CMS lecture 7
 
advance encryption standard chapter 5.ppt
advance encryption standard chapter 5.pptadvance encryption standard chapter 5.ppt
advance encryption standard chapter 5.ppt
 
Mathematical Statistics Assignment Help
Mathematical Statistics Assignment HelpMathematical Statistics Assignment Help
Mathematical Statistics Assignment Help
 
AES.ppt
AES.pptAES.ppt
AES.ppt
 
“Optimized AES Algorithm Core Using FeedBack Architecture”
“Optimized AES Algorithm Core Using FeedBack Architecture” “Optimized AES Algorithm Core Using FeedBack Architecture”
“Optimized AES Algorithm Core Using FeedBack Architecture”
 
Implementation of Various Cryptosystem Using Chaos
Implementation of Various Cryptosystem Using ChaosImplementation of Various Cryptosystem Using Chaos
Implementation of Various Cryptosystem Using Chaos
 
Space Complexity in Data Structure.docx
Space Complexity in Data Structure.docxSpace Complexity in Data Structure.docx
Space Complexity in Data Structure.docx
 
Aes algorithm notes
Aes algorithm notesAes algorithm notes
Aes algorithm notes
 
Chapter 3: Simplification of Boolean Function
Chapter 3: Simplification of Boolean FunctionChapter 3: Simplification of Boolean Function
Chapter 3: Simplification of Boolean Function
 
Number system by ammar nawab
Number system by ammar nawabNumber system by ammar nawab
Number system by ammar nawab
 
Paper on Optimized AES Algorithm Core Using FeedBack Architecture
Paper on Optimized AES Algorithm Core Using  FeedBack Architecture Paper on Optimized AES Algorithm Core Using  FeedBack Architecture
Paper on Optimized AES Algorithm Core Using FeedBack Architecture
 
Slide 1
Slide 1Slide 1
Slide 1
 
Acm aleppo cpc training second session
Acm aleppo cpc training second sessionAcm aleppo cpc training second session
Acm aleppo cpc training second session
 
L06
L06L06
L06
 
FPGA Implementation of an Area Optimized Architecture for 128 bit AES Algorithm
FPGA Implementation of an Area Optimized Architecture for 128 bit AES AlgorithmFPGA Implementation of an Area Optimized Architecture for 128 bit AES Algorithm
FPGA Implementation of an Area Optimized Architecture for 128 bit AES Algorithm
 
U1 - Code Conversion.pptx
U1 - Code Conversion.pptxU1 - Code Conversion.pptx
U1 - Code Conversion.pptx
 
Data Encryption Standards (1).pptx
Data Encryption Standards (1).pptxData Encryption Standards (1).pptx
Data Encryption Standards (1).pptx
 

More from MuskanSony (7)

TEMPLATES IN JAVA
TEMPLATES IN JAVATEMPLATES IN JAVA
TEMPLATES IN JAVA
 
Css properties list
Css properties listCss properties list
Css properties list
 
java packages and its types with example
java packages and its types with examplejava packages and its types with example
java packages and its types with example
 
Cocomo model (muskan soni)
Cocomo model (muskan soni)Cocomo model (muskan soni)
Cocomo model (muskan soni)
 
Bca 5th sem seminar(software measurements)
Bca 5th sem seminar(software measurements)Bca 5th sem seminar(software measurements)
Bca 5th sem seminar(software measurements)
 
topology types
topology typestopology types
topology types
 
network attacks
network attacks network attacks
network attacks
 

Recently uploaded

Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
negromaestrong
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
AnaAcapella
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 

Recently uploaded (20)

Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 

Aes(Advance Encryption Algorithm)

  • 1.  AES : Advanced encryption algorithm  AES was to be based on 128 bit block with 128 bit keys  Steps are:
  • 2.  One time initialization process:  Expand the 16 byte key to get the actual key block to be used.  Do one time initialization of the 16 byte plain text block(state)  XOR the state with the key block  For each round do the following:  Apply S-box to each of the plain text bytes.  Rotate row k of the plain text block by k bytes  Perform a mix column operation  XOR the state with the key block.
  • 3.  One time initialization process:  Expand the 16 byte key to get the actual key block to be used:  Inputs to the algo are the key and the plain text  The key size is 16 bytes this step expands this 16 byte key into 11 arrays .each array contains 4 rows and 4 columns
  • 4.  In other words , the original 16 byte key array is expanded into a key containing 11*4*4=176 bytes  One of these 11 arrays is used in the initialization process and other 10 arrays are used in the 10 rounds , one array per round.  In the context of AES a word uses 4 bytes. Therefore in the current context our 16 byte initial key will be expanded into 176 byte key i.e. 44 words
  • 5.  firstly , the original 16 byte key is copied into the first 4 words of the expanded key  The remaining 10 arrays are depends on the immediately preceding block and the block 4 position earlier to it  That is every added word w[i] depends on w[i-1] and w[i-4]  This fills four words at a time.
  • 6.  For filling these four words at a time the following logic is used.  A if the word in the W array is a multiple of four (w[4],w[8],w[12] and so on) than we perform three function Titled Substitution , Rotate ,Constant  B if the current word in the output key block is not a multiple of four we simply perform XOR operation of the previous word and the word four places earlier and store it as the output word  For example for w[5] we perform XOR between w[4] and w[1] and store there output as w[5]
  • 7.
  • 8.  For example: for this we need to take one byte at a time  Suppose our first byte is 0d.looking it up in the s box with x=0 and y=D produces D7  In the function constant , the output of the above step is XORed with a constant. This constant is a word ,consting of 4 bytes  The value of the constant is depends on the round number  The last three bytes of a constant word always contain 0
  • 9.  These constant values are: round number 1 2 3 4 5 6 7 8 9 10 CON ST. 01 02 04 08 10 20 40 80 1B 36
  • 10.  lets take an example  Suppose that our original unexpanded 4 word key is as shown: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
  • 11. in the first four round , the original 4 word input key would be copied into the first 4- word output key, as per our algo To populate w[4] the following algo is used: For(i=4;i<44;i++) { Tmp=w[i-1]; If ( i mod 4==0) Tmp=substitute(rotate(tmp)) XOR constant[i/4]; W[i]=w[i-4] XOR tmp; } Based on this ,we will have the following Tmp=w[i-1]=w[4-1]=w[3]= 0C 0D 0E 0F Since i=4 , I mod 4 is 0 . Therefore , we will now have the following step;
  • 12.  Tmp=substitute(rotate(tmp)) XOR constant[i/4];  Rotate (temp) =rotate(0C 0D 0E 0F)  =0D 0E 0F 0C  now we do substitution(Rotate (temp) )  For this we will take one byte at a time and look up in S box for substitution.  For example our first byte is 0D  We will see in s box where x=0 and y=D and produces D7  Thus at the end of substitution(Rotate (temp) ) we will get D7 AB 76 FE.  We now XOR this value with constant[i/4]  i.e. constant[1] which is 01(as per our table of constant)
  • 13.  Now D7 AB 76 FE  XOR 01 00 00 00  thus our new temp value is D6 AB 76 FE  Finally we XOR this temp value with w[i-4] i.e. w[4- 4] =w[0]  D6 AB 76 FE  XOR 00 01 02 03  = D6 AA 74 FD  thus w[4]= D6 AA 74 FD  We will use the same logic to derive the remaining expanded key blocks w[5] to w[44].
  • 14.  Do one time initialization of the 16 byte plain text block(state)  the 16 byte plain text block is copied into a two dimensional 4 * 4 array called as state.  The order of the copying is in the column order.
  • 15.
  • 16.  XOR the state with the key block:  Now the first 16 bytes of the expanded key(w[0],w[1],w[2],w[3]) are XORed into the 16-byte state array.  Thus every byte in the state array is replaced by the xor of itself and the corresponding byte in the expanded key.  at this stage , the initialization is complete and we are ready for rounds.
  • 17.  Process in each rounds:  The following steps are executed 10 times , one per round  A ) apply S-box to each of the plain text bytes:  The content of the state array are looked up into the s box .
  • 18. 7.18 7.2.1 Continue Figure 7.6 SubBytes transformation
  • 21. 7.21 7.2.1 Continue Example 7.2 Figure 7.7 shows how a state is transformed using the SubBytes transformation. The figure also shows that the InvSubBytes transformation creates the original one. Note that if the two bytes have the same values, their transformation is also the same. Figure 7.7 SubBytes transformation for Example 7.2
  • 22.  B) rotate row k of the plain text block by k bytes:  Each of the four rows of the state array are rotated to the left. Row 0 is rotated 0 bytes , row 1 is rotated by 1 byte ,  Row 2 is rotated by 2 byte and row 3 is rotated by 3 byte  Example:
  • 23. 7.23 7.2.2 Permutation Figure 7.9 ShiftRows transformation
  • 24. 7.24 7.2.2 Continue Example 7.4 Figure 7.10 shows how a state is transformed using ShiftRows transformation. The figure also shows that InvShiftRows transformation creates the original state. Figure 7.10 ShiftRows transformation in Example 7.4
  • 25.  C) perform a mix column operation:  Output of this step is the matrix multiplication of the old value and a constant matrix.
  • 26. 7.26 7.2.3 Continue Figure 7.13 MixColumns transformation
  • 27.  XOR the state with the key block:  This step XORes the key for this round into the state array