We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

Perfect Security

The One Time Pad has perfect security because an attacker who has access to only the ciphertext can infer absolutely nothing of interest about the plaintext.

Interactive example available with JavaScript enabled.

Ciphers Used in Production Are Usually Not Perfectly Secure

Most production ciphers are not perfectly secure, but are "close enough". In short, trade-offs are made that add to the practical security of the system while sacrificing the perfect theoretical security of the cipher itself.

The big problem with the One Time Pad is that the key needs to be the same length as the message. That means to encrypt a 128 GB hard drive, I'd need a 128 GB key!! That's just not practical.

Some Ciphers Are Just Crap

The Caesar cipher is a great example of a cipher that is NOT perfectly secure OR practically secure. As we demonstrated earlier, when given access to the ciphertext of a Caesar cipher, an attacker can see the positions and patterns of characters in the plaintext.