AES-CBC Demonstration

⚠️ EDUCATIONAL DEMONSTRATION - Do not use AES-CBC for new applications. This tool demonstrates how AES-CBC (Cipher Block Chaining) works and why AES-GCM (authenticated encryption) is preferred. CBC mode provides confidentiality but NOT authentication - it is vulnerable to padding oracle attacks and ciphertext tampering. Use AES-GCM for production encryption.

Privacy: this tool processes your data entirely in your browser. Nothing you paste or type is sent to the server.

Result

Enter your values and press Calculate — the result appears here.

Worked examples

Encrypt with CBC

  • plaintext = Hello, World!

Result: Ciphertext and IV. ⚠️ No authentication tag - ciphertext can be tampered with undetected.

Frequently asked questions

Why is CBC not recommended?

AES-CBC is vulnerable to: (1) Padding oracle attacks - an attacker can decrypt ciphertext by observing decryption errors. (2) Ciphertext malleability - an attacker can modify ciphertext without detection. (3) No authentication - tampering is undetected. Use AES-GCM instead.

What is the difference between CBC and GCM?

CBC provides only confidentiality (encryption). GCM provides both confidentiality AND integrity (authentication). GCM generates an authentication tag that detects any tampering. CBC does not - this is why CBC is vulnerable to padding oracle attacks.

Should I use this in production?

No. This is an educational demonstration. For production encryption, use AES-GCM (authenticated encryption). If you must use CBC, add HMAC-SHA256 for authentication (Encrypt-then-MAC).

Copied!