// All encryption runs locally. No data is sent to any server. Uses CryptoJS — suitable for testing but use a server-side library in production. CBC mode requires a random IV for production use.
AES (Advanced Encryption Standard) is the global standard for symmetric key encryption, adopted by the US National Institute of Standards and Technology (NIST) in 2001. It is used in TLS/HTTPS, VPNs, disk encryption (BitLocker, FileVault), and virtually every secure communication system.
AES Modes of Operation
- CBC (Cipher Block Chaining): Each block is XOR'd with the previous ciphertext block before encryption. Requires an IV. Most common mode.
- ECB (Electronic Codebook): Each block is encrypted independently. Deterministic — same plaintext always produces the same ciphertext. Not recommended for most uses.
- CTR (Counter): Converts AES into a stream cipher. Does not require padding. Good for random access.
- OFB (Output Feedback): Similar to CTR, generates a keystream that is XOR'd with plaintext. Good for streaming data.
Frequently Asked Questions
What key size should I use?
AES-256 is the recommended choice for new applications. Both AES-128 and AES-256 are considered secure against brute-force attacks, but AES-256 provides a larger security margin for long-term data protection.
What is an IV (Initialization Vector)?
An IV is a random value that ensures identical plaintexts produce different ciphertexts when encrypted with the same key. CryptoJS generates a random IV automatically and prepends it to the output.