Advanced Encryption Standard (AES) - GeeksforGeeks (2024)

Advanced Encryption Standard (AES) is a specification for the encryption of electronic data established by the U.S National Institute of Standards and Technology (NIST) in 2001. AES is widely used today as it is a much stronger than DES and triple DES despite being harder to implement.

Points to remember

  • AES is a block cipher.
  • The key size can be 128/192/256 bits.
  • Encrypts data in blocks of 128 bits each.

That means it takes 128 bits as input and outputs 128 bits of encrypted cipher text as output. AES relies on substitution-permutation network principle which means it is performed using a series of linked operations which involves replacing and shuffling of the input data.

Working of the cipher :
AES performs operations on bytes of data rather than in bits. Since the block size is 128 bits, the cipher processes 128 bits (or 16 bytes) of the input data at a time.

The number of rounds depends on the key length as follows :

  • 128 bit key – 10 rounds
  • 192 bit key – 12 rounds
  • 256 bit key – 14 rounds

Creation of Round keys :
A Key Schedule algorithm is used to calculate all the round keys from the key. So the initial key is used to create many different round keys which will be used in the corresponding round of the encryption.

Advanced Encryption Standard (AES) - GeeksforGeeks (1)

Encryption :
AES considers each block as a 16 byte (4 byte x 4 byte = 128 ) grid in a column major arrangement.

[ b0 | b4 | b8 | b12 || b1 | b5 | b9 | b13 || b2 | b6 | b10| b14 || b3 | b7 | b11| b15 ]

Each round comprises of 4 steps :

  • SubBytes
  • ShiftRows
  • MixColumns
  • Add Round Key

The last round doesn’t have the MixColumns round.

The SubBytes does the substitution and ShiftRows and MixColumns performs the permutation in the algorithm.

SubBytes :
This step implements the substitution.

In this step each byte is substituted by another byte. Its performed using a lookup table also called the S-box. This substitution is done in a way that a byte is never substituted by itself and also not substituted by another byte which is a compliment of the current byte. The result of this step is a 16 byte (4 x 4 ) matrix like before.

The next two steps implement the permutation.

ShiftRows :
This step is just as it sounds. Each row is shifted a particular number of times.

  • The first row is not shifted
  • The second row is shifted once to the left.
  • The third row is shifted twice to the left.
  • The fourth row is shifted thrice to the left.

(A left circular shift is performed.)

[ b0 | b1 | b2 | b3 ] [ b0 | b1 | b2 | b3 ]| b4 | b5 | b6 | b7 | -> | b5 | b6 | b7 | b4 || b8 | b9 | b10 | b11 | | b10 | b11 | b8 | b9 |[ b12 | b13 | b14 | b15 ] [ b15 | b12 | b13 | b14 ]

MixColumns :
This step is basically a matrix multiplication. Each column is multiplied with a specific matrix and thus the position of each byte in the column is changed as a result.

This step is skipped in the last round.

[ c0 ] [ 2 3 1 1 ] [ b0 ]| c1 | = | 1 2 3 1 | | b1 || c2 | | 1 1 2 3 | | b2 |[ c3 ] [ 3 1 1 2 ] [ b3 ]

Add Round Keys :
Now the resultant output of the previous stage is XOR-ed with the corresponding round key. Here, the 16 bytes is not considered as a grid but just as 128 bits of data.

Advanced Encryption Standard (AES) - GeeksforGeeks (2)

After all these rounds 128 bits of encrypted data is given back as output. This process is repeated until all the data to be encrypted undergoes this process.

Decryption :
The stages in the rounds can be easily undone as these stages have an opposite to it which when performed reverts the changes.Each 128 blocks goes through the 10,12 or 14 rounds depending on the key size.

The stages of each round in decryption is as follows :

  • Add round key
  • Inverse MixColumns
  • ShiftRows
  • Inverse SubByte

The decryption process is the encryption process done in reverse so i will explain the steps with notable differences.

Inverse MixColumns :
This step is similar to the MixColumns step in encryption, but differs in the matrix used to carry out the operation.

[ b0 ] [ 14 11 13 9 ] [ c0 ]| b1 | = | 9 14 11 13 | | c1 || b2 | | 13 9 14 11 | | c2 |[ b3 ] [ 11 13 9 14 ] [ c3 ]

Inverse SubBytes :
Inverse S-box is used as a lookup table and using which the bytes are substituted during decryption.

Applications:

AES is widely used in many applications which require secure data storage and transmission. Some common use cases include:

  • Wireless security: AES is used in securing wireless networks, such as Wi-Fi networks, to ensure data confidentiality and prevent unauthorized access.
  • Database Encryption: AES can be applied to encrypt sensitive data stored in databases. This helps protect personal information, financial records, and other confidential data from unauthorized access in case of a data breach.
  • Secure communications: AES is widely used in protocols like such as internet communications, email, instant messaging, and voice/video calls.It ensures that the data remains confidential.
  • Data storage: AES is used to encrypt sensitive data stored on hard drives, USB drives, and other storage media, protecting it from unauthorized access in case of loss or theft.
  • Virtual Private Networks (VPNs): AES is commonly used in VPN protocols to secure the communication between a user’s device and a remote server. It ensures that data sent and received through the VPN remains private and cannot be deciphered by eavesdroppers.
  • Secure Storage of Passwords: AES encryption is commonly employed to store passwords securely. Instead of storing plaintext passwords, the encrypted version is stored. This adds an extra layer of security and protects user credentials in case of unauthorized access to the storage.
  • File and Disk Encryption: AES is used to encrypt files and folders on computers, external storage devices, and cloud storage. It protects sensitive data stored on devices or during data transfer to prevent unauthorized access.

Summary :
AES instruction set is now integrated into the CPU (offers throughput of several GB/s)to improve the speed and security of applications that use AES for encryption and decryption. Even though its been 20 years since its introduction we have failed to break the AES algorithm as it is infeasible even with the current technology. Till date the only vulnerability remains in the implementation of the algorithm.

Unlock the Power of Placement Preparation!
Feeling lost in OS, DBMS, CN, SQL, and DSA chaos? Our Complete Interview Preparation Course is the ultimate guide to conquer placements. Trusted by over 100,000+ geeks, this course is your roadmap to interview triumph.
Ready to dive in? Explore our Free Demo Content and join our Complete Interview Preparation course.


Last Updated : 22 May, 2023

Like Article

Save Article

Previous

AES Full Form

Next

Difference between AES and DES ciphers

As an expert in cybersecurity and encryption methodologies, I have a comprehensive understanding of the Advanced Encryption Standard (AES), a pivotal encryption specification instituted by the U.S. National Institute of Standards and Technology (NIST) in 2001. My expertise spans various facets of AES, including its underlying principles, encryption and decryption processes, key aspects, and real-world applications.

AES, a block cipher, encrypts electronic data in blocks of 128 bits each. It stands out for its robustness compared to its predecessors, DES (Data Encryption Standard) and triple DES, despite being more complex to implement. Key highlights of AES include its block size of 128 bits, offering key sizes of 128, 192, or 256 bits for encryption purposes.

The cipher operates through a substitution-permutation network principle, employing linked operations involving data replacement and shuffling. AES processes data in 16-byte blocks (128 bits) at a time, with the number of rounds varying based on the key length: 10 rounds for a 128-bit key, 12 rounds for a 192-bit key, and 14 rounds for a 256-bit key.

AES employs distinct steps within each round: SubBytes, ShiftRows, MixColumns, and Add Round Key. These steps involve byte-level operations, substitution via an S-box, row shifting, matrix multiplication, and XOR operations with round keys to generate encrypted output.

The decryption process mirrors the encryption steps in reverse, utilizing inverse operations such as Inverse MixColumns and Inverse SubBytes to revert the encryption transformations and retrieve the original plaintext.

Applications of AES span a wide spectrum, including wireless security, database encryption, secure communications (e.g., internet protocols, email, instant messaging), data storage (on hard drives, USBs, cloud storage), VPN protocols, secure password storage, file and disk encryption, among others.

Notably, AES has been integrated into CPU instruction sets to enhance speed and security for applications reliant on AES encryption and decryption. Its resilience against decryption attempts for over two decades underscores its formidable security, with vulnerabilities primarily found in the implementation rather than the algorithm itself.

AES continues to be an industry standard, demonstrating unparalleled strength in safeguarding sensitive data across diverse digital environments. Its enduring security makes it an indispensable tool in ensuring confidentiality and data integrity in an increasingly interconnected world.

Advanced Encryption Standard (AES) - GeeksforGeeks (2024)

FAQs

What is the AES Advanced Encryption Standard? ›

The Advanced Encryption Standard (AES) is an algorithm that uses the same key to encrypt and decrypt protected data. Instead of a single round of encryption, data is put through several rounds of substitution, transposition, and mixing to make it harder to compromise.

How does AES work step by step? ›

four steps used in each round of AES: (1) byte substitution, (2) shift rows, (3) mix columns, and (4) add round key. byte substitution steps in encryption and decryption. the 128 bit, 192 bit, and 256 bit AES. constructing linear approximation tables in attacks on block ciphers.

Is AES hard to crack? ›

Since it is almost impossible to crack the AES cipher using a brute-force method, the main risk to this standard is side-channel attacks.

Is AES better or RSA? ›

Securing file storage: AES is preferable due to its faster encryption and decryption speeds, making it suitable for encrypting large amounts of data.

Is AES the strongest encryption? ›

AES 256-bit encryption is the strongest and most robust encryption standard that is commercially available today. While it is theoretically true that AES 256-bit encryption is harder to crack than AES 128-bit encryption, AES 128-bit encryption has never been cracked.

What are the two most common attacks on AES? ›

Possible attacks on AES encryption include:
  • Related-key attacks: These attacks are fast and easy to execute. ...
  • Side-channel attacks: These exploit data leaks and may succeed in case of poor AES implementation.

What are the four main stages in AES operation? ›

Each round consists of four operations namely SubBytes, ShiftRows , MixColumns, Add Round key as shown in figure. Now discuss each of the four stages used in AES.

Where is AES commonly used? ›

In fact, as of 2021, AES is the world's most popular data protection method. Wi-Fi networks, Google Cloud, Facebook Messenger, Java programming, and many password managers use AES encryption to protect sensitive data.

Is AES mathematically secure? ›

Since AES puts data through multiple encryption rounds and splits a message into smaller blocks of 128 bits, it is more secure and reliable than older symmetric encryption methods. AES uses 128-, 192- or 256-bit keys to encrypt and decrypt data.

How long will it take to crack AES encryption? ›

If you ask how long will it take to crack 128-bit encryption using a brute force attack, the answer would be 1 billion years. A machine that can crack a DES key in a second would take 149 trillion years to crack a 128-bit AES key.

How long does AES take to decrypt? ›

With the right quantum computer, AES-128 would take about 2.61*10^12 years to crack, while AES-256 would take 2.29*10^32 years.

Which algorithm is better than AES? ›

Developed in 1977 by Ron Rivest, Adi Shamir, and Leonard Adleman, RSA is one of the first public-key cryptosystems and is widely used for secure data transmission. Unlike AES, RSA is an asymmetric algorithm, which means it uses a pair of keys for encryption and decryption.

Can quantum computers break AES? ›

Grover's algorithm is a quantum algorithm for unstructured data that provides a quadratic speedup in the computation over classical computing. This can result in AES-128 being feasible to crack, but AES-256 is still considered quantum resistant—at least until 2050, (as referenced throughout ETSI GR QSC 006 V1. 1.1.)

Does AES use public and private keys? ›

AES is a symmetric key algorithm, which means there is just one key, used both to encrypt and decrypt. This is different from RSA, where you have two keys - a private one and a public one, related in a specific way. AES keys are simply random bytes.

Has AES 128 been cracked? ›

A machine that can crack a DES key in a second would take 149 trillion years to crack a 128-bit AES key. Hence, it is safe to say that AES-128 encryption is safe against brute-force attacks. AES has never been cracked yet and it would take large amounts of computational power to crack this key.

Is AES a cybercrime? ›

AES stands for Advanced Encryption Standard, which is actually a cryptographic algorithm used to secure data through encryption and decryption processes. It is not a form of cybercrime but rather a method of protecting data from being compromised by unauthorized individuals.

Is AES good security? ›

AES is generally considered quite secure, and the main weaknesses would be brute-force attacks (prevented by using a strong passphrase) and security weaknesses in other aspects of WPA2.

Top Articles
PolicyGenius | Company Profile
Using Monthly Hours For Calculations - Visual Veggies
Aberration Surface Entrances
Knoxville Tennessee White Pages
Durr Burger Inflatable
Odawa Hypixel
Restored Republic January 20 2023
Tabc On The Fly Final Exam Answers
Don Wallence Auto Sales Vehicles
Exam With A Social Studies Section Crossword
Melfme
Free Robux Without Downloading Apps
Southland Goldendoodles
Anki Fsrs
Savage X Fenty Wiki
Craigslist Labor Gigs Albuquerque
The Murdoch succession drama kicks off this week. Here's everything you need to know
Premier Reward Token Rs3
Elbasha Ganash Corporation · 2521 31st Ave, Apt B21, Astoria, NY 11106
Me Cojo A Mama Borracha
Boston Gang Map
Inter-Tech IM-2 Expander/SAMA IM01 Pro
10 Fun Things to Do in Elk Grove, CA | Explore Elk Grove
Pinellas Fire Active Calls
Walgreens Alma School And Dynamite
Fsga Golf
Rs3 Eldritch Crossbow
Www.craigslist.com Savannah Ga
All Breed Database
Morse Road Bmv Hours
Tips and Walkthrough: Candy Crush Level 9795
Living Shard Calamity
How to Make Ghee - How We Flourish
Sandals Travel Agent Login
Xfinity Outage Map Lacey Wa
Southern Democrat vs. MAGA Republican: Why NC governor race is a defining contest for 2024
Amici Pizza Los Alamitos
Skyrim:Elder Knowledge - The Unofficial Elder Scrolls Pages (UESP)
Viewfinder Mangabuddy
Wsbtv Fish And Game Report
Craigslist Gigs Wichita Ks
ESA Science & Technology - The remarkable Red Rectangle: A stairway to heaven? [heic0408]
Busted Newspaper Mcpherson Kansas
Lady Nagant Funko Pop
The Horn Of Plenty Figgerits
Backpage New York | massage in New York, New York
Underground Weather Tropical
Wrentham Outlets Hours Sunday
Deshuesadero El Pulpo
De Donde Es El Area +63
28 Mm Zwart Spaanplaat Gemelamineerd (U999 ST9 Matte | RAL9005) Op Maat | Zagen Op Mm + ABS Kantenband
Cbs Scores Mlb
Latest Posts
Article information

Author: Madonna Wisozk

Last Updated:

Views: 5549

Rating: 4.8 / 5 (48 voted)

Reviews: 95% of readers found this page helpful

Author information

Name: Madonna Wisozk

Birthday: 2001-02-23

Address: 656 Gerhold Summit, Sidneyberg, FL 78179-2512

Phone: +6742282696652

Job: Customer Banking Liaison

Hobby: Flower arranging, Yo-yoing, Tai chi, Rowing, Macrame, Urban exploration, Knife making

Introduction: My name is Madonna Wisozk, I am a attractive, healthy, thoughtful, faithful, open, vivacious, zany person who loves writing and wants to share my knowledge and understanding with you.