plaintext CHICKEN 2 7 8 2 10 4 13
key MOOFAZA 12 14 14 5 0 25 0
sum 14 21 22 7 10 29 13
Then we translate the numbers back into letters. On the alphabet clock, 29 and 3 are both D.
14 21 22 7 10 29 13
O V W H K D N
We send the ciphertext OVWHKDN.
To decrypt the message, we need to know the ciphertext and the key. Since we added the key to get the ciphertext, we have to subtract the key to get the plaintext. Translate the ciphertext and key into numbers, and take the difference between each pair of numbers:
ciphertext OVWHKDN 14 21 22 7 10 29 13
key MOOFAZA 12 14 14 5 0 25 0
difference 2 7 8 2 10 4 13
Finally we translate those numbers back into letters:
2 7 8 2 10 4 13
C H I C K E N
If the key is totally random and as long as the message, we have what's called a one-time pad. In one sense, this is the best cryptography there is: if you don't know the key, you can't figure out the message. I don't care how good your computer is - it can tell all the possible messages, but it can't tell which was the real one.
In another sense, this is horribly impractical. You have to get a gigantic list of completely random letters to your buddy, without anyone else seeing them, and you and your buddy have to always be at the same place in the gigantic list of letters. What a mess!
No comments:
Post a Comment