Julius Cæsar, as everyone knows, "encrypted" messages to his generals by shifting the letters,
i.e. A → D.
ABCDEFGHIKLMNOPQRSTVXYZ DEFGHIKLMNOPQRSTVXYZABC secret key:D Changing the secret key changes the shift, thus changing the encrypted message.
(Note. Julius had only 23 letters in his alphabet)
Let's (mis)use the symbol ⊕ (a plus inside a circle) to say how far we shift the alphabet.
Encrypting
ABBA: ABBA ⊕ D = DEED
And BOY: BOY ⊕ D = ERB
To decrypt, we reverse the operation,
So D → A, thus DEED ⊖ D = ABBA
Use the same secret key.
But reverse the operation.
When dealing with encryption, novices are confused by three very different concepts:
Let's dive into the confusion: