SlideShare a Scribd company logo
Information and Network Security:26
AES Decryption and Implementation Issues
Prof Neeraj Bhargava
Vaibhav Khanna
Department of Computer Science
School of Engineering and Systems Sciences
Maharshi Dayanand Saraswati University Ajmer
Add Round Key
XOR state with 128-bits of the round key
again processed by column (though effectively a series of byte
operations)
inverse for decryption identical
since XOR own inverse, with reversed keys
designed to be as simple as possible
a form of Vernam cipher on expanded key
requires other stages for complexity / security
AES Round Key State Manipulation
AES Key Expansion
takes 128-bit (16-byte) key and expands into array of 44/52/60 32-bit
words
start by copying key into first 4 words
then loop creating words that depend on values in previous & 4
places back
in 3 of 4 cases just XOR these together
1st word in 4 has rotate + S-box + XOR round constant on previous, before XOR
4th back
• The AES key expansion algorithm takes as input a 4-word (16-byte)
key and produces a linear array of words, providing a 4-word round
key for the initial AddRoundKey stage and each of the 10/12/14
rounds of the cipher.
• It involves copying the key into the first group of 4 words, and then
constructing subsequent groups of 4 based on the values of the
previous & 4th back words.
• The first word in each group of 4 gets “special treatment” with rotate
+ S-box + XOR constant on the previous word before XOR’ing the one
from 4 back. In the 256-bit key/14 round version, there’s also an extra
step on the middle word.
AES Key Expansion
Key Expansion Rationale
• designed to resist known attacks
• design criteria included
• knowing part key insufficient to find many more
• invertible transformation
• fast on wide range of CPU’s
• use round constants to break symmetry
• diffuse key bits into round keys
• enough non-linearity to hinder analysis
• simplicity of description
• The Rijndael developers designed the expansion key algorithm to be
resistant to known cryptanalytic attacks.
• It is designed to be simple to implement, but by using round
constants break symmetries, and make it much harder to deduce
other key bits if just some are known (but once have as many
consecutive bits as are in key, can then easily recreate the full
expansion).
• The design criteria used are listed above.
AES Decryption
• AES decryption is not identical to encryption since steps done in
reverse
• but can define an equivalent inverse cipher with steps as for
encryption
• but using inverses of each step
• with a different key schedule
• works since result is unchanged when
• swap byte substitution & shift rows
• swap mix columns & add (tweaked) round key
• The AES decryption cipher is not identical to the encryption cipher
• The sequence of transformations for decryption differs from that for
encryption, although the form of the key schedules for encryption and
decryption is the same.
• This has the disadvantage that two separate software or firmware
modules are needed for applications that require both encryption and
decryption.
• There is, however, an equivalent version of the decryption algorithm that
has the same structure as the encryption algorithm, with the same
sequence of transformations as the encryption algorithm (with
transformations replaced by their inverses).
• To achieve this equivalence, a change in key schedule is needed.
• By constructing an equivalent inverse cipher with steps in same order
as for encryption, we can derive a more efficient implementation.
• Clearly swapping the byte substitutions and shift rows has no effect,
since work just on bytes.
• Swapping the mix columns and add round key steps requires the
inverse mix columns step be applied to the round keys first – this
makes the decryption key schedule a little more complex with this
construction, but allows the use of same h/w or s/w for the data
en/decrypt computation.
AES Decryption
Implementation Aspects
• can efficiently implement on 8-bit CPU
• byte substitution works on bytes using a table of 256 entries
• shift rows is simple byte shift
• add round key works on byte XOR’s
• mix columns requires matrix multiply in GF(28) which works on byte values,
can be simplified to use table lookups & byte XOR’s
• The Rijndael proposal [DAEM99] provides some suggestions for efficient
implementation on 8- bit processors, typical for current smart cards, and
on 32-bit processors, typical for PCs.
• AES can be implemented very efficiently on an 8-bit processor.
• AddRoundKey is a bytewise XOR operation.
• ShiftRows is a simple byte shifting operation.
• SubBytes operates at the byte level and only requires a lookup of a 256
byte table S.
• MixColumns (matrix multiply) can be implemented as byte XOR’s & table
lookups with a 2nd 256 byte table X2, using the formulae shown in Stallings
equation 5.9.
Implementation Aspects
can efficiently implement on 32-bit CPU
redefine steps to use 32-bit words
can precompute 4 tables of 256-words
then each column in each round can be computed using 4 table lookups + 4
XORs
at a cost of 4Kb to store tables
designers believe this very efficient implementation was a key factor
in its selection as the AES cipher
• AES can also be very efficiently implemented on an 32-bit processor,
by rewriting the stage transformation to use 4 table lookups & 4
XOR’s per column of state.
• These tables can be computed in advance using the formulae shown
in the text, and need 4Kb to store.
• The developers of Rijndael believe that this compact, efficient
implementation was probably one of the most important factors in
the selection of Rijndael for AES.
Assignment
• Explain the AES Key Expansion
• Explain the AES Decryption

More Related Content

What's hot (6)

PDF
CNIT 127 Ch 6: The Wild World of Windows
Sam Bowne
 
PPTX
Practical Malware Analysis: Ch 4 A Crash Course in x86 Disassembly
Sam Bowne
 
PDF
CNIT 126 Ch 7: Analyzing Malicious Windows Programs
Sam Bowne
 
PPTX
Practical Malware Analysis: Ch 5: IDA Pro
Sam Bowne
 
PDF
CNIT 126 6: Recognizing C Code Constructs in Assembly
Sam Bowne
 
PPTX
Exciting Features for SQL Devs in SQL 2012
Brij Mishra
 
CNIT 127 Ch 6: The Wild World of Windows
Sam Bowne
 
Practical Malware Analysis: Ch 4 A Crash Course in x86 Disassembly
Sam Bowne
 
CNIT 126 Ch 7: Analyzing Malicious Windows Programs
Sam Bowne
 
Practical Malware Analysis: Ch 5: IDA Pro
Sam Bowne
 
CNIT 126 6: Recognizing C Code Constructs in Assembly
Sam Bowne
 
Exciting Features for SQL Devs in SQL 2012
Brij Mishra
 

Similar to Information and network security 26 aes decryption and implementational issues (20)

PPTX
Cryptography
Mannat Gill
 
PPT
CR 05 - Advanced Encryption Standard.ppt
ssuseraaf866
 
PPT
AES.ppt
ssuser6602e0
 
PPTX
694 lecture1aes
Ankur Human
 
PPT
advance encryption standard chapter 5.ppt
roueida mohammed
 
PPT
Unit -2.ppt
DHANABALSUBRAMANIAN
 
PPT
AES.ppt
BincySam2
 
PPT
Advanced Encryption System - Network and Security.ppt
VimalAadhithan
 
PPT
Advanced Encryption Standard presentation slide
ssr978534
 
PPT
Cryptography and network security AES ALG
skcbcaa10uca068
 
PPTX
Information and data security advanced encryption standard (aes)
Mazin Alwaaly
 
PDF
A Cryptographic Hardware Revolution in Communication Systems using Verilog HDL
idescitation
 
PDF
FPGA Implementation of an Area Optimized Architecture for 128 bit AES Algorithm
IJERA Editor
 
PPT
Chapter 5 module 3
daneshwarihatti
 
PDF
AES effecitve software implementation
Roman Oliynykov
 
PPT
Minor Project- AES Implementation in Verilog
Hardik Manocha
 
PDF
Hardware implementation of aes encryption and decryption for low area & power...
eSAT Publishing House
 
PDF
G04701051058
ijceronline
 
Cryptography
Mannat Gill
 
CR 05 - Advanced Encryption Standard.ppt
ssuseraaf866
 
AES.ppt
ssuser6602e0
 
694 lecture1aes
Ankur Human
 
advance encryption standard chapter 5.ppt
roueida mohammed
 
Unit -2.ppt
DHANABALSUBRAMANIAN
 
AES.ppt
BincySam2
 
Advanced Encryption System - Network and Security.ppt
VimalAadhithan
 
Advanced Encryption Standard presentation slide
ssr978534
 
Cryptography and network security AES ALG
skcbcaa10uca068
 
Information and data security advanced encryption standard (aes)
Mazin Alwaaly
 
A Cryptographic Hardware Revolution in Communication Systems using Verilog HDL
idescitation
 
FPGA Implementation of an Area Optimized Architecture for 128 bit AES Algorithm
IJERA Editor
 
Chapter 5 module 3
daneshwarihatti
 
AES effecitve software implementation
Roman Oliynykov
 
Minor Project- AES Implementation in Verilog
Hardik Manocha
 
Hardware implementation of aes encryption and decryption for low area & power...
eSAT Publishing House
 
G04701051058
ijceronline
 
Ad

More from Vaibhav Khanna (20)

PPTX
Information and network security 47 authentication applications
Vaibhav Khanna
 
PPTX
Information and network security 46 digital signature algorithm
Vaibhav Khanna
 
PPTX
Information and network security 45 digital signature standard
Vaibhav Khanna
 
PPTX
Information and network security 44 direct digital signatures
Vaibhav Khanna
 
PPTX
Information and network security 43 digital signatures
Vaibhav Khanna
 
PPTX
Information and network security 42 security of message authentication code
Vaibhav Khanna
 
PPTX
Information and network security 41 message authentication code
Vaibhav Khanna
 
PPTX
Information and network security 40 sha3 secure hash algorithm
Vaibhav Khanna
 
PPTX
Information and network security 39 secure hash algorithm
Vaibhav Khanna
 
PPTX
Information and network security 38 birthday attacks and security of hash fun...
Vaibhav Khanna
 
PPTX
Information and network security 37 hash functions and message authentication
Vaibhav Khanna
 
PPTX
Information and network security 35 the chinese remainder theorem
Vaibhav Khanna
 
PPTX
Information and network security 34 primality
Vaibhav Khanna
 
PPTX
Information and network security 33 rsa algorithm
Vaibhav Khanna
 
PPTX
Information and network security 32 principles of public key cryptosystems
Vaibhav Khanna
 
PPTX
Information and network security 31 public key cryptography
Vaibhav Khanna
 
PPTX
Information and network security 30 random numbers
Vaibhav Khanna
 
PPTX
Information and network security 29 international data encryption algorithm
Vaibhav Khanna
 
PPTX
Information and network security 28 blowfish
Vaibhav Khanna
 
PPTX
Information and network security 27 triple des
Vaibhav Khanna
 
Information and network security 47 authentication applications
Vaibhav Khanna
 
Information and network security 46 digital signature algorithm
Vaibhav Khanna
 
Information and network security 45 digital signature standard
Vaibhav Khanna
 
Information and network security 44 direct digital signatures
Vaibhav Khanna
 
Information and network security 43 digital signatures
Vaibhav Khanna
 
Information and network security 42 security of message authentication code
Vaibhav Khanna
 
Information and network security 41 message authentication code
Vaibhav Khanna
 
Information and network security 40 sha3 secure hash algorithm
Vaibhav Khanna
 
Information and network security 39 secure hash algorithm
Vaibhav Khanna
 
Information and network security 38 birthday attacks and security of hash fun...
Vaibhav Khanna
 
Information and network security 37 hash functions and message authentication
Vaibhav Khanna
 
Information and network security 35 the chinese remainder theorem
Vaibhav Khanna
 
Information and network security 34 primality
Vaibhav Khanna
 
Information and network security 33 rsa algorithm
Vaibhav Khanna
 
Information and network security 32 principles of public key cryptosystems
Vaibhav Khanna
 
Information and network security 31 public key cryptography
Vaibhav Khanna
 
Information and network security 30 random numbers
Vaibhav Khanna
 
Information and network security 29 international data encryption algorithm
Vaibhav Khanna
 
Information and network security 28 blowfish
Vaibhav Khanna
 
Information and network security 27 triple des
Vaibhav Khanna
 
Ad

Recently uploaded (20)

PPTX
UI5con_2025_Accessibility_Ever_Evolving_
gerganakremenska1
 
PDF
NPD Software -Omnex systems
omnex systems
 
PPTX
Agentic Automation: Build & Deploy Your First UiPath Agent
klpathrudu
 
PDF
Salesforce Experience Cloud Consultant.pdf
VALiNTRY360
 
PPTX
Build a Custom Agent for Agentic Testing.pptx
klpathrudu
 
PDF
[Solution] Why Choose the VeryPDF DRM Protector Custom-Built Solution for You...
Lingwen1998
 
PDF
Download Canva Pro 2025 PC Crack Full Latest Version
bashirkhan333g
 
PPTX
Library_Management_System_PPT111111.pptx
nmtnissancrm
 
PPTX
Transforming Insights: How Generative AI is Revolutionizing Data Analytics
LetsAI Solutions
 
PPTX
Function & Procedure: Function Vs Procedure in PL/SQL
Shani Tiwari
 
PDF
Simplify React app login with asgardeo-sdk
vaibhav289687
 
PPTX
From spreadsheets and delays to real-time control
SatishKumar2651
 
PPTX
Get Started with Maestro: Agent, Robot, and Human in Action – Session 5 of 5
klpathrudu
 
PDF
Generic or Specific? Making sensible software design decisions
Bert Jan Schrijver
 
PDF
ERP Consulting Services and Solutions by Contetra Pvt Ltd
jayjani123
 
PDF
Why is partnering with a SaaS development company crucial for enterprise succ...
Nextbrain Technologies
 
PDF
SAP Firmaya İade ABAB Kodları - ABAB ile yazılmıl hazır kod örneği
Salih Küçük
 
PPTX
AEM User Group: India Chapter Kickoff Meeting
jennaf3
 
PPTX
Foundations of Marketo Engage - Powering Campaigns with Marketo Personalization
bbedford2
 
PDF
intro_to_cpp_namespace_robotics_corner.pdf
MohamedSaied877003
 
UI5con_2025_Accessibility_Ever_Evolving_
gerganakremenska1
 
NPD Software -Omnex systems
omnex systems
 
Agentic Automation: Build & Deploy Your First UiPath Agent
klpathrudu
 
Salesforce Experience Cloud Consultant.pdf
VALiNTRY360
 
Build a Custom Agent for Agentic Testing.pptx
klpathrudu
 
[Solution] Why Choose the VeryPDF DRM Protector Custom-Built Solution for You...
Lingwen1998
 
Download Canva Pro 2025 PC Crack Full Latest Version
bashirkhan333g
 
Library_Management_System_PPT111111.pptx
nmtnissancrm
 
Transforming Insights: How Generative AI is Revolutionizing Data Analytics
LetsAI Solutions
 
Function & Procedure: Function Vs Procedure in PL/SQL
Shani Tiwari
 
Simplify React app login with asgardeo-sdk
vaibhav289687
 
From spreadsheets and delays to real-time control
SatishKumar2651
 
Get Started with Maestro: Agent, Robot, and Human in Action – Session 5 of 5
klpathrudu
 
Generic or Specific? Making sensible software design decisions
Bert Jan Schrijver
 
ERP Consulting Services and Solutions by Contetra Pvt Ltd
jayjani123
 
Why is partnering with a SaaS development company crucial for enterprise succ...
Nextbrain Technologies
 
SAP Firmaya İade ABAB Kodları - ABAB ile yazılmıl hazır kod örneği
Salih Küçük
 
AEM User Group: India Chapter Kickoff Meeting
jennaf3
 
Foundations of Marketo Engage - Powering Campaigns with Marketo Personalization
bbedford2
 
intro_to_cpp_namespace_robotics_corner.pdf
MohamedSaied877003
 

Information and network security 26 aes decryption and implementational issues

  • 1. Information and Network Security:26 AES Decryption and Implementation Issues Prof Neeraj Bhargava Vaibhav Khanna Department of Computer Science School of Engineering and Systems Sciences Maharshi Dayanand Saraswati University Ajmer
  • 2. Add Round Key XOR state with 128-bits of the round key again processed by column (though effectively a series of byte operations) inverse for decryption identical since XOR own inverse, with reversed keys designed to be as simple as possible a form of Vernam cipher on expanded key requires other stages for complexity / security
  • 3. AES Round Key State Manipulation
  • 4. AES Key Expansion takes 128-bit (16-byte) key and expands into array of 44/52/60 32-bit words start by copying key into first 4 words then loop creating words that depend on values in previous & 4 places back in 3 of 4 cases just XOR these together 1st word in 4 has rotate + S-box + XOR round constant on previous, before XOR 4th back
  • 5. • The AES key expansion algorithm takes as input a 4-word (16-byte) key and produces a linear array of words, providing a 4-word round key for the initial AddRoundKey stage and each of the 10/12/14 rounds of the cipher. • It involves copying the key into the first group of 4 words, and then constructing subsequent groups of 4 based on the values of the previous & 4th back words. • The first word in each group of 4 gets “special treatment” with rotate + S-box + XOR constant on the previous word before XOR’ing the one from 4 back. In the 256-bit key/14 round version, there’s also an extra step on the middle word.
  • 7. Key Expansion Rationale • designed to resist known attacks • design criteria included • knowing part key insufficient to find many more • invertible transformation • fast on wide range of CPU’s • use round constants to break symmetry • diffuse key bits into round keys • enough non-linearity to hinder analysis • simplicity of description
  • 8. • The Rijndael developers designed the expansion key algorithm to be resistant to known cryptanalytic attacks. • It is designed to be simple to implement, but by using round constants break symmetries, and make it much harder to deduce other key bits if just some are known (but once have as many consecutive bits as are in key, can then easily recreate the full expansion). • The design criteria used are listed above.
  • 9. AES Decryption • AES decryption is not identical to encryption since steps done in reverse • but can define an equivalent inverse cipher with steps as for encryption • but using inverses of each step • with a different key schedule • works since result is unchanged when • swap byte substitution & shift rows • swap mix columns & add (tweaked) round key
  • 10. • The AES decryption cipher is not identical to the encryption cipher • The sequence of transformations for decryption differs from that for encryption, although the form of the key schedules for encryption and decryption is the same. • This has the disadvantage that two separate software or firmware modules are needed for applications that require both encryption and decryption. • There is, however, an equivalent version of the decryption algorithm that has the same structure as the encryption algorithm, with the same sequence of transformations as the encryption algorithm (with transformations replaced by their inverses). • To achieve this equivalence, a change in key schedule is needed.
  • 11. • By constructing an equivalent inverse cipher with steps in same order as for encryption, we can derive a more efficient implementation. • Clearly swapping the byte substitutions and shift rows has no effect, since work just on bytes. • Swapping the mix columns and add round key steps requires the inverse mix columns step be applied to the round keys first – this makes the decryption key schedule a little more complex with this construction, but allows the use of same h/w or s/w for the data en/decrypt computation.
  • 13. Implementation Aspects • can efficiently implement on 8-bit CPU • byte substitution works on bytes using a table of 256 entries • shift rows is simple byte shift • add round key works on byte XOR’s • mix columns requires matrix multiply in GF(28) which works on byte values, can be simplified to use table lookups & byte XOR’s
  • 14. • The Rijndael proposal [DAEM99] provides some suggestions for efficient implementation on 8- bit processors, typical for current smart cards, and on 32-bit processors, typical for PCs. • AES can be implemented very efficiently on an 8-bit processor. • AddRoundKey is a bytewise XOR operation. • ShiftRows is a simple byte shifting operation. • SubBytes operates at the byte level and only requires a lookup of a 256 byte table S. • MixColumns (matrix multiply) can be implemented as byte XOR’s & table lookups with a 2nd 256 byte table X2, using the formulae shown in Stallings equation 5.9.
  • 15. Implementation Aspects can efficiently implement on 32-bit CPU redefine steps to use 32-bit words can precompute 4 tables of 256-words then each column in each round can be computed using 4 table lookups + 4 XORs at a cost of 4Kb to store tables designers believe this very efficient implementation was a key factor in its selection as the AES cipher
  • 16. • AES can also be very efficiently implemented on an 32-bit processor, by rewriting the stage transformation to use 4 table lookups & 4 XOR’s per column of state. • These tables can be computed in advance using the formulae shown in the text, and need 4Kb to store. • The developers of Rijndael believe that this compact, efficient implementation was probably one of the most important factors in the selection of Rijndael for AES.
  • 17. Assignment • Explain the AES Key Expansion • Explain the AES Decryption