

Simple one time pad - dublinclontarf

I've been reading quite a bit about encryption and what not and came across the one time pad. And am wondering if this is an accurate example or have I missed something.<p>Message:loveyou<p>key of random characters:spgbwoz<p>encrypted message = message + key modulo 26
======
ivan_ah
you have it right M=loveyou K=spgbwoz

C_i =letter(order(M_i)+order(K_i) mod 26)

where order() and letter() backward and forward lookup in this table: 0 - a 1
- b 2 - c ... 24 - y 25 - z

The Decryption function is similar to the encryption function but you subtract
the key from the cyphertext to get back the message.

Claude Shannon proved that the one-time pad is unconditionally secure using
the concept of entropy H(). Very simple argument which you could try to
lookup.

------
lann
Yes, as long as the random characters are really random. This seems trivial
but is actually quite difficult to get right.

~~~
lann
Also you technically leak a little information by not padding your plaintext
to a larger block size, but its not really an issue in this particular
example.

