fbpx
Add Your VPN Review

Privacy Canada is community-supported. We may earn a commission when make a purchase through one of our links. Learn more.

Rot13 Cipher

Ludovic Rembert
Last Updated on February 23, 2021
Rot13 Cipher icon

Cryptography can be incredibly useful and important in a lot of situations, including ones that you might not consider. For example, encryption is necessary for the corporate documentation, software like great VPNs, and government communications.

Yet it’s also important to have that encryption for day-to-day activities, such as instant messaging, emails, and a variety of other communication you do both professionally and with friends or family.

This is where Rot13 comes in and while it’s not the most secure cipher out there, if you’re dealing with something that isn’t too sensitive, it’s not too much of an issue.

How Rot13 Works


Rot13 is actually pretty simple: It’s a simple substitution cipher that replaces the 13th letter with the after itself in the alphabet. For example:

  • ☑️ A becomes N
  • ☑️ B becomes O
  • ☑️ C becomes P
  • ☑️ D becomes Q
  • ☑️ E becomes R

And so on.

Rot13 is also a 13 key Caesar cipher, so it can be solved and looked at from that perspective as well.

Deciphering Rot13


LettersSubstitution Key
ABCDEFGHIJKLMNOPQRSTUVWXYZNOPQRSTUVWXYZABCDEFGHIJKLM

Enciphering is also relatively simple, just have a sentence and then substitute the letters on the top sentences to the letters in the lower sentence. 

For example, if we want to encipher “DROP AT LOCATION”, you’d substitute the D with Q, the R with D, the O with Z, and so on until you essentially get this:

PhraseEnciphered Message
DROP AT LOCATIONQDAB NF XAPNFVAZ

As you can see, it’s straightforward enough and shouldn’t be too problematic.

Enciphering Rot13 Using Code


To save yourself some time, you can always encipher and decipher Rot13 using python with the pycipher module.To install, you can do it with “pip install pycipher” and then use this code, while exchanging the example text to the text you want to encipher or decipher.

  • ✅ from pycipher import Rot13
  • ✅ Rot13().encipher(‘defend the east wall of the castle’)
  • ✅ ‘qrsraqgurrnfgjnyybsgurpnfgyr’
  • ✅ Rot13().decipher(‘qrsraqgurrnfgjnyybsgurpnfgyr’)
  • ✅ ‘DEFENDTHEEASTWALLOFTHECASTLE’

Sourced from the pycipher documentation.

Conclusion


As you can see, Rot13 isn’t really that complicated and doesn’t offer enough protection for anything truly sensitive. Your best bet is using this in a situation where the information just needs a minimal amount of encryption.

Similarly, Rot13 will probably work best with somebody who might not necessarily be familiar with it, and therefore you get an extra bit of security by obscurity.

That being said, you’re better off using services or products that offer encryption at a professional level, such as secure browsers, or secure emails. Otherwise, check out our online privacy guide to help you with some tips & tricks to keep yourself safe and secure.

You Might Also Like:

Related guides