3 ms·
Simple one time pad
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.
Message:loveyou
key of random characters:spgbwoz
encrypted message = message + key modulo 26
- lann 17y agoYes, as long as the random characters are really random. This seems trivial but is actually quite difficult to get right.
- ivan_ah 17y agoyou 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.