AES Encryption / Decryption
AES encrypt/decrypt with CBC, CFB, CTR, OFB, ECB modes, Pkcs7/ZeroPadding/NoPadding, 128/192/256-bit keys, Base64 output, auto-detect key/IV format
What is AES encryption?
AES (Advanced Encryption Standard) is a symmetric encryption algorithm widely used to secure data. It operates on 128-bit blocks and supports key sizes of 128, 192, and 256 bits. AES is the most widely adopted encryption standard worldwide.
What are the encryption modes?
CBC (Cipher Block Chaining) chains blocks together for better security. CFB (Cipher FeedBack) turns AES into a self-synchronizing stream cipher. CTR (Counter) uses a counter for parallelizable encryption. OFB (Output FeedBack) creates a keystream for stream encryption. ECB (Electronic Code Book) encrypts each block independently — least secure, not recommended for large data.
What is padding?
Padding adds extra bytes to align data to block boundaries. Pkcs7 is the most common and recommended padding. Iso97971 adds a byte before Pkcs7 padding. AnsiX923 fills with zeros and a length byte. Iso10126 uses random bytes with a length byte. ZeroPadding fills with zero bytes. NoPadding requires input to be exactly block-aligned.
What is the output format?
Encryption output uses Base64 encoding by default, which is the most common and compact format. Key and IV inputs support auto-detection of Hex, Base64, or UTF-8 format — simply paste your key or IV and the tool will automatically recognize the format.
Security recommendations for AES encryption?
Use strong random keys (use the generate button). Prefer CBC or CTR mode over ECB. Use AES-256 for maximum security. Always use a unique IV for each encryption in CBC, CFB, CTR, and OFB modes. Never reuse the same key-IV combination.
Is my data sent to a server?
No, all encryption and decryption is performed locally in your browser using the CryptoJS library. Your data, keys, and IVs never leave your device.
What key sizes are supported?
AES supports three key sizes: 128 bits (16 bytes), 192 bits (24 bytes), and 256 bits (32 bytes). AES-128 is sufficient for most uses, AES-192 provides extra security margin, and AES-256 offers the highest security level recommended for classified data.
What is the difference between AES-128, AES-192, and AES-256?
The difference lies in key length and the number of encryption rounds: AES-128 uses 10 rounds, AES-192 uses 12 rounds, and AES-256 uses 14 rounds. AES-256 provides the strongest security but is slightly slower. For most applications, AES-128 is already considered unbreakable with current technology.
What is the history of AES and where is it used?
AES was selected by NIST in 1997 to replace DES, and became an official standard in 2001. It is now used worldwide by governments, militaries, and financial institutions. AES secures HTTPS connections, WiFi networks, disk encryption, and archive files. It is considered one of the most secure encryption algorithms ever created.
Why is ECB mode not recommended?
ECB mode encrypts identical plaintext blocks into identical ciphertext blocks, which reveals patterns in the data. For example, encrypting an image with ECB will still show the image outline. This makes ECB vulnerable to pattern analysis attacks. Always use CBC, CTR, CFB, or OFB mode with a random IV instead.
What are real-world applications of AES?
AES is used in HTTPS/SSL for secure web browsing, WPA2/WPA3 for WiFi security, VPN connections, Bluetooth encryption, encrypted messaging apps, disk encryption (BitLocker, FileVault), compressed archives (ZIP, RAR), and government classified document protection.
What is the difference between Hex and Base64 output?
Hex (hexadecimal) represents binary data using 16 characters (0-9, A-F), resulting in longer strings. Base64 uses 64 characters (A-Z, a-z, 0-9, +, /) and is about 33% shorter than Hex for the same data. Both are common formats for representing binary data as text. Choose based on your system requirements.