In the very beginning...

... well a bit later actually,

Julius Cæsar, as everyone knows, "encrypted" messages to his generals by rotating the alphabet.

ABCDEFGHIKLMNOPQRSTVXYZ HIKLMNOPQRSTVXYZABCDEFG secret key:
H

Since this method requires a secret keys, it is possible to define this as encryption, and not just an encoding.

(Note. Julius had only 23 letters in his alphabet)

Encrypt

Let's (mis)use as a "rollover addition" to mean if we roll past Z we continue on A.

Encrypting
ABBA: ABBA ⊕ H = HIIH
And BOY: BOY ⊕ H = IXF

Decrypt

To decrypt, we just reverse the operation:
HIIH ⊖ H = ABBA

Reverse the operation.
But use the same secret key.

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: