Online AES Encryption Tool

Update time:
Tags: Encryption

Tool Introduction:

This online AES encryption tool supports AES encryption modes including ECB, CBC, CFB, OFB, CTR, and GCM modes. It supports key types aes-128, aes-192, and aes-256, with lengths of 128bits/16bytes, 192bits/24bytes, and 256bits/32bytes. Padding methods include PKCS#5, PKCS#7, Zeros, ISO10126, ANSI X.923, ISO/IEC 7816-4, and No Padding. Input parameters support visible UTF8 character format, Base64, and hexadecimal string format. Output ciphertext supports both Base64 and hexadecimal string formats, with case switching for hexadecimal output. For GCM mode (Galois/Counter Mode), the nonce length uses the standard 12 bytes, while authentication tag length can be selected from 12 to 16 bytes. Encryption results can be output with ciphertext and authentication tag either combined or separate. Enter the original string in the text box below, select the encryption mode, input the key and IV parameters, and click the "AES Encrypt" button to get the AES ciphertext of the string.

View Examples

About AES Encryption Algorithm:

AES Logo

AES (Advanced Encryption Standard) is a block cipher encryption standard adopted by the U.S. federal government. This standard was designed to replace the older DES and has been widely analyzed and used worldwide. After a five-year selection process, the Advanced Encryption Standard was published by the National Institute of Standards and Technology (NIST) on November 26, 2001, in FIPS PUB 197 and became effective on May 26, 2002. Today, AES has become one of the most popular algorithms for symmetric key encryption.

  • 1、Is AES a symmetric or asymmetric encryption algorithm?

    AES is a symmetric key algorithm, meaning that the same key is used for both encryption and decryption. This algorithm is highly efficient and can provide fast encryption and decryption operations when processing large amounts of data.

  • 2、Is AES a block cipher algorithm? How large is the data block in AES?

    AES is a block cipher algorithm that processes data in fixed-size blocks. Each data block is 128 bits (16 bytes) in size.

  • 3、How long is the AES encryption key?

    AES supports different key lengths, including 128-bit, 192-bit, and 256-bit. The longer the key length, the theoretically harder it is to break, but it also increases the computational complexity of encryption and decryption.

  • 4、What encryption algorithm does AES replace?

    AES replaced the earlier Data Encryption Standard (DES) because DES had a relatively short key length and was vulnerable to brute force attacks. AES provides higher security and stronger encryption capabilities.

  • 5、What is the encryption process of the AES algorithm?

    The AES encryption process operates on a 4×4 byte matrix called the 'state', with its initial value being a plaintext block (each element in the matrix is one byte of the plaintext block). During encryption, each round of AES encryption (except the last round) includes 4 steps:

    • AddRoundKey—Each byte in the matrix is XORed with the round key; each subkey is generated by the key schedule. AES AddRoundKey
    • SubBytes—A non-linear substitution function that replaces each byte with a corresponding byte using a lookup table. AES SubBytes
    • ShiftRows—Cyclically shifts each row in the matrix. AES ShiftRows
    • MixColumns—A linear transformation that mixes the columns of the state to ensure thorough mixing. This step is omitted in the final encryption round and replaced with another AddRoundKey. AES MixColumns

  • 6、How secure and reliable is the AES encryption algorithm?

    The AES algorithm has been extensively researched and evaluated, and is considered a secure and reliable encryption algorithm. It has been widely adopted and has become the encryption standard for many countries and organizations.

AES Encryption Modes:

As early as 1981, after the DES algorithm was published, NIST announced 4 operational modes in the standard document FIPS 81:
  • Electronic Code Book Mode (ECB)
  • Cipher Block Chaining Mode (CBC)
  • Cipher Feedback Mode (CFB)
  • Output Feedback Mode (OFB)
Later, some additional operational modes were added:
  • Counter Mode (CTR)
  • Propagating Cipher Block Chaining Mode (PCBC)
ECB mode and CBC mode are the two most commonly used modes; the other modes only require a basic understanding. AES encryption modes requiring block alignment (padding): ECB, CBC, PCBC; other modes do not require block alignment. AES encryption modes requiring initialization vectors: all modes except ECB require initialization vectors.
  • 1. ECB Mode (Electronic Code Book Mode)

    ECB mode is the earliest and simplest mode. It divides the data to be encrypted into several groups, with each group being the same size as the encryption key length, and then encrypts each group using the same key.

    Advantages: Facilita il calcolo parallelo; gli errori non si accumulano (nessuna interferenza tra i blocchi).

    Disadvantages: Vulnerabile agli attacchi attivi sul testo in chiaro.

    AES ECB encryption AES ECB decryption
  • 2. CBC Mode (Cipher Block Chaining Mode)

    In CBC mode, each cipher block to be encrypted is first XORed with the ciphertext of the previous block before being encrypted (the circle-cross symbol in the diagram represents the XOR operation). The first plaintext block is XORed with a data block called the initialization vector. Both the encryption and decryption parties must know the key and initialization vector to perform encryption and decryption.

    Advantages: Higher security than ECB mode; it is the SSL standard.

    Disadvantages: Encryption between data blocks has dependencies, so parallel computation is not possible.

    AES CBC encryption AES CBC decryption
  • 3. CFB Mode (Cipher Feedback Mode)

    CFB mode uses block algorithms to implement stream algorithms; plaintext data does not need to be aligned according to block size.

    Advantages: Plaintext data does not need to be aligned by block size, i.e., no padding required.

    Disadvantages: Same as CBC mode, parallel computation is not possible.

    AES CFB encryption AES CFB decryption
  • 4. OFB Mode (Output Feedback Mode)

    The OFB mode process is similar to CBC mode, but plaintext data does not need to be aligned according to block size.

    Advantages: Plaintext data does not need to be aligned by block size, i.e., no padding required.

    Disadvantages: Same as CBC mode, parallel computation is not possible.

    AES OFB encryption AES OFB decryption
  • 5. CTR Mode (Counter Mode)

    CTR mode is based on ECB mode but introduces Nonce random numbers and Counter. The Nonce and Counter together can be viewed as a counter. For each segment of plaintext being encrypted, the counter increments by one, and this counter will perform operations such as concatenation, addition, and XOR with the initial IV, then be encrypted using the encryptor, and finally XORed with the plaintext to obtain the segmented ciphertext.

    Advantages: Plaintext data does not need to be aligned by block size, i.e., no padding required.

    Disadvantages: Both encryption and decryption parties need to maintain the initial IV, Nonce, and Counter simultaneously.

    AES CTR encryption AES CTR decryption
  • 6. PCBC Mode (Propagating Cipher Block Chaining Mode)

    PCBC mode is an improved version of CBC mode. The difference between PCBC and CBC is that in CBC mode, the vector required for encrypting the latter part of plaintext is the ciphertext of the previous part, while in PCBC mode, the vector required for encrypting the latter part of plaintext is the XOR value of the previous plaintext and ciphertext.

    Advantages: Same as CBC mode.

    Disadvantages: Same as CBC mode.

    AES PCBC encryption AES PCBC decryption