K098 / Encoding and decoding
ROT13 Caesar cipher
ROT13 is a simple substitution cipher replacing each Latin alphabet letter with the letter 13 positions later.
CRYPTOGRAPHY LAB / K098
Cryptography Lab · ROT13 Caesar cipher
Run real computations and inspect intermediate states step by step.
Educational only. Never enter real passwords or secret keys. Computation stays in your browser; input and trace values are not sent to a server. Do not use this implementation in production.
ROT13
See the scope above for fixed examples, reduced parameters and supported variants. Standard operation names and formulas are retained.Output
Previous state
- Definition and overview
- ROT13 is a simple substitution cipher replacing each Latin alphabet letter with the letter 13 positions later. Source document ↗
- Classification and reversibility
- Caesar cipher variant with a shift of 13, half of 26; applying it twice restores the input. Source document ↗
- Key or secret requirements
- Simple substitution using a fixed shift of 13 as its key. Source document ↗
- Operating principle and structure
- Add 13 to each alphabetic position c and take modulo 26. Source document ↗
- Key size, block size and parameters
- Special case of Caesar cipher with shift/key 13 and modulo-26 alphabet. Source document ↗
- Security strength and recommendation
- Negligible security, easily broken and not recommended for sensitive information. Source document ↗
- Known attacks and vulnerabilities
- Caesar cipher's key space of 25 allows exhaustive search and frequency analysis. Source document ↗
- Standards and certification
- RFC 1855 netiquette guidelines mention Rotate utilities for avoiding spoilers. Source document ↗
- Typical uses
- Usenet spoiler and punchline hiding. Source document ↗
- Implementations, libraries and tools
- Implementations offer ROT13 libraries, CLI tools and playgrounds. Source document ↗
- Decryption or decoding
- Apply the same ROT13 operation again to reverse it. Source document ↗
- Advantages
- Self-inverse, so one simple implementation handles encoding and decoding. Source document ↗
- Limitations and cautions
- Classical substitution is easily cracked and fails modern security requirements. Source document ↗
- Distinguishing encryption, encoding and hashing
- Understand ROT13 as rotation/obfuscation to avoid spoilers, not security encryption. Source document ↗
Practical examples
Example
HELLO becomes URYYB and returns to HELLO when ROT13 is applied again. Letters rotate by 13; no secret key is used.
Procedure
Operate only on A–Z/a–z; add 13 to each position modulo 26 and output. Decode with the same steps. Treat ROT13 as obfuscation, not secure encryption.
Scenario
Suitable for spoilers, puzzles/CTF learning and demonstrations of classical ciphers. Use standard cryptographic libraries instead for secure storage/transfer.
Pitfalls and alternatives
Do not protect passwords or personal data with ROT13. Korean characters, numbers and symbols may remain unchanged. Use vetted encryption such as AES-GCM and TLS for sensitive data, and Argon2/scrypt for passwords.
References
- ROT13 ↗
- ROT-13 - @agntn/ciphers ↗
- Practical Cryptography ↗
- ROT13 Cipher | ROT13Cipher ↗
- Computer and Network Security ↗
- Caesar Ciphers, ROT13, and Why Neither Is - DevTools ↗
- ROT13: the encoder/decoder that was never trying to be encryption - iotools.cloud ↗
- ROT13 — Edgepedia ↗
- ROT 13 Cipher ↗
- Historical Ciphers & Modular Arithmetic (Symmetric Cryptography) Summary ↗