Simple encryption proposal. Comments ?

Justin Shaw wyojustin at hotmail.com
Sun Dec 29 22:58:48 EST 2002


> I've come up with a very simple One-Time-Pad encryption scheme ...

The others have pointed out that you need a real source for true random
numbers.  You could get away with this and still have fair code.  The larger
problem is that your keys are too short.  The OTP has a key bit for each
message bit.   You yourself could probably crack your code given the correct
motivation (these puzzles are any about any newspaper minus case
sensitivety).

True one time pad:
Xor your secret message with a randomly generated key:

KEY           : 0101000110010110011011110000011011101110011101000
MESSAGE : 111000111000111000111000111000111
XOR           : 101100100001100001010111111001010

Transmit the xor-ed message.  Then xor again with the key to decrypt.
DECODE   :111000111000111000111000111000111

The key MUST be destroyed as soon as it is used.  Done correctly (with a
true random key) it is un-breakable once the keys are destroyed.

For a great read check out _Beteween_Silk_and_Cyanide_ (can't remember the
author).  It is the true story of the top code maker for England during
WWII.  Awesome book!  He manages to implement one time pads for the French
resistance on silk that could be sewn into the jacket linings and would not
be discovered during a frisk.  He argued that for many of those agents the
choice would be between silk and cyanide!

Have fun,
Justin





More information about the Python-list mailing list