ROT13
Yaser Rahmati | یاسر رحمتی
What is ROT13?
ROT13 ("rotate by 13 places") is a simple substitution cipher that replaces a letter with the letter 13 letters after it in the alphabet. It is a specific case of the Caesar cipher, which shifts letters by a fixed number of places.
Step-by-Step Guide to ROT13
Step 1: Understand the ROT13 Alphabet
The alphabet is shifted by 13 positions:
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
The letters wrap around at the end of the alphabet, so after Z, it starts again from A.
Step 2: Applying ROT13 to Each Letter
To encrypt a message using ROT13, replace each letter in the message with the letter 13 positions after it in the alphabet. If the result goes past 'Z', wrap around to the beginning of the alphabet.
Example 1: Encrypting a Message
Let's encrypt the word "HELLO".
H: The 13th letter after H is U.
E: The 13th letter after E is R.
L: The 13th letter after L is Y.
L: The 13th letter after L is Y.
O: The 13th letter after O is B.
So, "HELLO" becomes "URYYB".
Example 2: Decrypting a Message
Let's decrypt the ROT13 encrypted message "URYYB".
U: The 13th letter after U is H.
R: The 13th letter after R is E.
Y: The 13th letter after Y is L.
Y: The 13th letter after Y is L.
B: The 13th letter after B is O.
So, "URYYB" becomes "HELLO".
Since ROT13 is symmetric (applying it twice will get you back to the original text), encryption and decryption are done the same way.
Step 3: Practice with More Examples
Message: "ROT13"
Encrypted: "EBG13"
Message: "GUR DHVPX OEBJA SBK WHZCF BIRE GUR YNML QBT"
Decrypted: "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
Keywords
ROT13
, cipher
, Caesar cipher
, substitution
, encryption
, decryption
, symmetric
, alphabet
, shift, rotate
, 13 positions
, wrap-around
, plaintext
, ciphertext
, encode
, decode
, simple
, monoalphabetic
, text transformation
, cryptography
, Yaser Rahmati
, یاسر رحمتی
External Links
🌐 Personal Website 📄 Resume 🎥 Video Archive 💼 Finance Blog 🔐 Network & Security Notebook 🎬 Aparat Channel
Last updated