One-Time Pad Algorithm


Aim :

  Implementation of one time pad algorithm to ensure perfect secracy.

Theory :

  Vernam proposed a bit-wise exclusive or of the message stream with a truely random zero-one stream which was shared by sender   and receipient.This cipher is unbreakable in a very strong sense.
  The intuition is that any message can be transformed into any cipher (of the same length) by a pad, and all transformations are   equally likely. Given a two letter message, there is a pad which adds to the message to give OK, and another pad which adds to the   message to give NO.
  Since either of these pads are equally likely, the message is equally likely to be OK or NO.
  This perfect secrecy comes at a cost, however.The main drawback of the one-time pad cryptosystem, and why it is not actually used   in practice, is that the secret key must have at least the same length as the message being sent, and cannot be reused from one   message to another.