Cryptorium

Your Gateway to Cryptographic Mastery

Encrypt


Decrypt


History

AES Cipher

History

The Advanced Encryption Standard (AES) was established as the encryption standard by the National Institute of Standards and Technology (NIST) in 2001. AES was developed to replace the aging Data Encryption Standard (DES), which was becoming vulnerable to brute-force attacks due to its relatively short key length.

In 1997, NIST initiated a public competition to find a suitable replacement for DES. This process, known as the AES competition, attracted submissions from cryptographers worldwide. The Rijndael cipher, developed by Belgian cryptographers Vincent Rijmen and Joan Daemen, was selected due to its security, efficiency, and flexibility.

AES supports key sizes of 128, 192, or 256 bits and operates on blocks of 128 bits of plaintext. It quickly became the standard for encrypting sensitive but unclassified information in the United States and globally.

Working

AES is a symmetric-key block cipher that encrypts data in fixed-size blocks (128 bits) using the same key for both encryption and decryption. The algorithm operates on a block of plaintext and performs a series of transformations on the data.

Key Concepts

  • Block Cipher: AES processes data in blocks of 128 bits and supports key sizes of 128, 192, or 256 bits.
  • Rounds: The number of rounds varies with the key size (10 rounds for 128-bit keys, 12 rounds for 192-bit keys, and 14 rounds for 256-bit keys).

Algorithm

  • Key Expansion: The original key is expanded into multiple round keys using the Rijndael key schedule.
  • Initial Round: Apply AddRoundKey (XOR the block with the first round key).
  • Main Rounds:
    • Apply SubBytes (Substitute each byte using the S-box).
    • Apply ShiftRows (Shift rows of the block to the left).
    • Apply MixColumns (Mix columns to provide diffusion).
    • Apply AddRoundKey (XOR the block with the round key).
  • Final Round: Similar to the main rounds, but without MixColumns.
    • Apply SubBytes (Substitute each byte using the S-box).
    • Apply ShiftRows (Shift rows of the block).
    • Apply AddRoundKey (XOR the block with the final round key).

Example of AES Algorithm:

  • Encryption:
    • Key Expansion: Generate round keys from the original key.
    • Initial Round: Apply AddRoundKey.
    • Main Rounds: Apply SubBytes, ShiftRows, MixColumns, and AddRoundKey.
    • Final Round: Apply SubBytes, ShiftRows, and AddRoundKey.
    • Result: The transformed block is the encrypted ciphertext.
  • Decryption:
    • Key Expansion: Generate round keys as in encryption.
    • Initial Round (reverse steps of encryption): Apply AddRoundKey.
    • Main Rounds (reverse steps): Apply InvShiftRows, InvSubBytes, AddRoundKey, and InvMixColumns.
    • Final Round (reverse steps): Apply InvShiftRows, InvSubBytes, and AddRoundKey.
    • Result: The final output block is the decrypted plaintext.