#12 Rotation Cipher (part 3)

2.1K 10 5
                                        

#Cryptography

LECTURE #12: ROTATION CIPHER (Part 3) — CAESAR CIPHER

The Caesar cipher (also known as Caesar shift) is one of the earliest known and simplest ciphers. It was invented by the Roman Emperor Julius Caesar to send secret messages to his officers in the field. Caesar cipher is a substitution cipher that involves replacing each letter of the secret message with a different letter of the alphabet which is a fixed number of positions further in the alphabet.

The widely known “ROT-13” encryption is simply a Caesar cipher with an offset of 13 (or 13 rotations/shifts).

[ENCRYPTION and DECRYPTION]
To pass an encrypted message, it is necessary of both parties (the sender and receiver) have the “key” (or desired number of shifts) for the cipher.

For example:

1 shift (ROT-1)
AVEFELLOWWELLMET → BWFGFMMPXXFMMNFU

2 shifts (ROT-2)
AVEFELLOWWELLMET → CXGHGNNQYYGNNOGV

3 shifts (ROT-3)
AVEFELLOWWELLMET → DYHIHOORZZHOOPHW

4 shifts (ROT-4)
AVEFELLOWWELLMET → EZIJIPPSAAIPPQIX

10 shifts (ROT-10)
AVEFELLOWWELLMET → KFOPOVVYGGOVVWOD

13 shifts (ROT-13)
AVEFELLOWWELLMET → NIRSRYYBJJRYYZRG

20 shifts (ROT-20)
AVEFELLOWWELLMET → UPYZYFFIQQYFFGYN

25 shifts (ROT-25)
AVEFELLOWWELLMET → ZUDEDKKNVVDKKLDS

To decipher a message, you just need to offset the key shifted up in the plaintext on each letter of the alphabet.

[MATHEMATICAL DESCRIPTION]
The Caesar cipher can also be expressed in a more mathematical form:

E(x)= (x±k) mod 26

where:
k= the key/shift applied to each letter
x= the character (letter) encrypting/decrypting

First, we must assume that the plaintext alphabet has the corresponding integer in the range 0 to m−1 [thus, A=0, B=1, C=2… Z=25 (see attached photo)]. Then we can now represent to the encryption function (see the formula above).

Example:
[1] Encryption: “HI” → 7|8
Shifts: 3

Solution
E(x)= (x+k) mod 26
E(x)= (3+7) mod 26
E(x)= 10 mod 26
E(x)= 10=K

E(x)= (x+k) mod 26
E(x)= (3+8) mod 26
E(x)= 11 mod 26
E(x)= 11=L

The word “HI” will be encrypted as “KL” (3 caesar shifts)

[2] Decryption: “KL” → 10|11
Shifts: 3

Solution
E(x)= (x−k) mod 26
E(x)= (3−10) mod 26
E(x)= 7 mod 26
E(x)= 7=H

E(x)= (x−k) mod 26
E(x)= (3−11) mod 26
E(x)= 8 mod 26
E(x)= 8=I

[GAME]
So, what's the challenge? Try to decrypt all of this:
1. FTQRUHQADMZSQBUB
2. JLJBNRMNWCRCH
3. DVFDQGDOLQERKHPLD
4. ZNKXKJNKGJKJRKGMAK

Clue: News & Clock.

PM Swordcane for answers! 😉

###
— LMJC 🎩 —

###— LMJC 🎩 —

Oops! Ang larawang ito ay hindi sumusunod sa aming mga alituntunin sa nilalaman. Upang magpatuloy sa pag-publish, subukan itong alisin o mag-upload ng bago.

Oops! Ang larawang ito ay hindi sumusunod sa aming mga alituntunin sa nilalaman. Upang magpatuloy sa pag-publish, subukan itong alisin o mag-upload ng bago.
Codes And CiphersTahanan ng mga kuwento. Tumuklas ngayon