Apex › Cryptography

The padding-oracle attack

How a server that only says "valid padding" or "invalid padding" leaks the entire plaintext of a CBC-encrypted message — without the key. Because CBC decryption XORs the previous block, an attacker forges it byte by byte and watches the padding check to recover each byte. Type a secret, step through the attack, and watch the plaintext fall.

More in Cryptography