Stream Ciphers I

The One Time Pad Cipher (OTP):

The one time pad cipher was designed by vernam back in 1917. The OTP can be considered as the first “secure” cipher. The idea behind the OTP was that the length of the message or the message space will be same as that of the cipher text i.e. the length of n bits of binary string. Also the key space will be as long as the message space i.e. length of n bits of binary string. So in common words, the key will be a string of random bits as long as the message itself.

Now what the cipher actually does is that it simply takes message M and the key  K  and to obtain the cipher text C, it takes XOR of M and K.

i.e.         C = E(k,m) = M K
and        D(k,c) = K C



Now, to verify it, we know that cipher must return the original message M, on decrypting the cipher text C. Therefore, D(k,E(k,m)) = m must return true

We can say that, D(k,E(k,m)) = D(k,  M Ꚛ K)
Therefore, K Ꚛ (K Ꚛ M)
And by the Associative Property of XOR, we can say that (K Ꚛ K) Ꚛ M.
But K Ꚛ K is 0. Hence we have 0 Ꚛ M which is equal to M.
Hence we can say that this is a consistent cipher.

Now as we can see that OTP is a really fast cipher as all we have to do is just get the key and the message and XOR the bits of both of them and the same process to obtain back the message. But the only problem in using it in practice is that the key is as long as the message itself. Now the real problem here is for one person to send a secure message to the other, before he sends the first bit of his message, he will have to “securely” send the key which is as long as the message itself. Now if the first person had a “secure” way of sending the key, he would like to use it for sending the message itself. So the whole idea of using the cipher will be scrapped.

Now before we understand how this is a “secure Cipher", we need to understand something called the “Information Theory”. For more on Information Theory Stay Tuned on Cryptography Journal.

Comments

Popular Posts