In the very beginning...

... well a bit later actually,

Julius Cæsar, as everyone knows, "encrypted" messages to his generals by shifting the letters,
i.e. AD.

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)

Encrypt

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

Decrypt

To decrypt, we reverse the operation,
So DA, thus DEED ⊖ D = ABBA

Use the same secret key.
But reverse the operation.

Three topics

When dealing with encryption, novices are confused by three very different concepts:

  • Encoding vs Encryption
  • Symmetric vs Asymmetric encryption
  • Hashing vs Encryption

Let's dive into the confusion: