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".

  1. H: The 13th letter after H is U.

  2. E: The 13th letter after E is R.

  3. L: The 13th letter after L is Y.

  4. L: The 13th letter after L is Y.

  5. 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".

  1. U: The 13th letter after U is H.

  2. R: The 13th letter after R is E.

  3. Y: The 13th letter after Y is L.

  4. Y: The 13th letter after Y is L.

  5. 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 , یاسر رحمتی

🌐 Personal Website 📄 Resume 🎥 Video Archive 💼 Finance Blog 🔐 Network & Security Notebook 🎬 Aparat Channel

Last updated