Skip to main content
IBM 
ShopSupportDownloads
IBM HomeProductsConsultingIndustriesNewsAbout IBM
IBM : developerWorks : Security : Education - online courses
Introduction to cryptology: Pt. 1
Download tutorial zip fileView letter-sized PDF fileView A4-sized PDF fileE-mail this tutorial to a friend
Main menuSection menuGive feedback on this tutorialPrevious
Next Section
4. Cryptanalysis
  


One-time pads page 12 of 12


A "one-time pad (OTP)" is an encryption technique that provably produces unconditional security. An OTP has several distinguishing properties: (1)The key used in OTP encryption/decryption must be as long as the message encoded; (2)The key used in OTP encryption must be truly random data; (3)Each bit of an OTP key is used to encode one bit of the message, typically by XOR'ing them. Mathematically, (3) is not strictly necessary -- there are other ways to do it right -- but practically, inventing other variants just invites design mistakes. A lot of "snake-oil" cryptographers claim to avoid requirement #2. Don't trust them. Using pseudo-random data (including anything you can generate on a determinate state machine like a computer CPU) makes the encryption less than unconditionally secure. It comes down to entropy: If you can specify how to generate N bits of key using M < N bits of program code, ipso facto, the key contains less than N bits of entropy.

It is actually quite easy to see why an OTP is unconditionally secure. Suppose Mallory intercepts a cipher text C and wants to decrypt it (say, by brute-force attack). However, for any possible decryption M, Mallory can attempt to use a key K such that M = C xor K. Mallory can attempt decryption until the end of time, but he has no way, based on the known cipher text and an unknown key, to determine if he has hit upon the correct key.


Next Section
Main menuSection menuGive feedback on this tutorialPrevious
PrivacyLegalContact