ROT13

 

INTRODUCTION:


ROT13(rotate by 13 places) is a shift cipher, it takes the letter from the plain text and shifts the letter by 13th letter in alphabetical order. This algorithm is a special case of caesar cipher or it is also known as a substitution cipher. ROT13 does not include numbers or special characters but only alphabets.

In terms of securing information ROT13 offers no security and it could be broken easily. ROT13 is inverse of its own which means the same algorithm is used to encode and decode the plaintext and ciphertext respectively.

Practically this application is not applicable in real-world security but mostly used in puzzles and ctf's.

DECRYPTION:


A <----->N
B <----->O
C <----->P
D <----->Q
E <----->R
F <----->S
G <----->T
H <----->U
I <----->V
J <----->W
K <----->X
L <----->Y
M <----> Z

This algorithm is for both small letters and capital letters. For example, ‘A’ can be written as ‘N’ or vice-versa.

ROT13 ENCRYPTION & DECRYPTION IN LINUX:


1. In the following example the plain text hello is converted to ROT13 ciphertext using the terminal. the command is 

    echo "hello" | tr "n-za-mN-ZA-M" 'a-zA-Z' 


2. To decode the ciphertext back to plain text type the following command

    echo "uryyb" | tr "n-za-mN-ZA-M" 'a-zA-Z'

Comments