ROT13 ("rotate by 13 places", usually hyphenated ROT-13) is a simple Caesar cipher used for obscuring text by replacing each letter with the letter thirteen places down the alphabet.
What it is is a simple substitution cipher (in fact, it's worse than that because, as described below, it's a Caesar Cipher in which the offset for each character is the same and fixed!) To execute ROT13 you take a letter and shift it along 13 places (and if you go over the end past 'Z', you wrap around again to 'A').
Python3. Analysis: The ROT13 cipher is not very secure as it is just a special case of the Caesar cipher. The Caesar cipher can be broken by either frequency analysis or by just trying out all 25 keys whereas the ROT13 cipher can be broken by just shifting the letters 13 places. Therefore it has no practical use.
Rot-13 is in fact a Caesar cipher with a shift of 13. As this code only works with letters, it is possible to add the Rot5 to it for the digits (in this case it is sometimes called ROT13 .
I understand the reasons for and against ROT13, but I'm wondering why specifically people have chosen 13 places to shift the alphabet? I understand it's halfway around, but is there an elegant reason to go -that- far, but not 12 or 14 spots?
It seems to me like making each letter "as far away" as possible from its starting position only is meaningful to a human who might recognize "close" characters (although I doubt this is possible/probable).
Anyone know the answer to this?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With