CAESAR CIPHER
凯撒密码 / ROT13,一键加解密。
输入文本与偏移量即可加密或解密;不知道密钥时,暴力枚举全部 26 种偏移,一眼挑出可读结果。
本页处理在浏览器本地完成
这是什么?
凯撒密码把每个英文字母按固定偏移替换,ROT13 是偏移 13 的特例(加密解密相同)。本工具只对 A–Z/a–z 偏移,中文与符号原样保留。
常见问题
暴力枚举适合什么场景?
拿到一段密文却不知道偏移量时,列出全部 26 种结果,人眼一眼就能挑出可读的那一条。
文件会上传吗?
不会。所有计算都在当前浏览器里完成,文本不会发送到任何服务器。
示例与注意事项Example & notes
一个例子A worked example
明文 HELLO 位移 3 位得到 KHOOR;解密时反向位移 3 位即可还原。Plaintext HELLO shifted by 3 becomes KHOOR, and shifting back by 3 restores it.
注意事项Things to watch
- 位移 13(ROT13)是自逆的,加密两次就回到原文。A shift of 13 is self-inverse: applying it twice returns the original.
- 只对字母生效,数字、标点与中文不受影响。Only letters shift — digits, punctuation and Chinese stay unchanged.
- 位移只有 25 种可能,暴力破解毫无难度,仅作教学用途。With only 25 possible shifts it is trivially broken, so treat it as a teaching tool.
相关问答More Q&A
怎么破解凯撒密码?How do you break it?
最多试 25 次,或利用词频分析;字母 e 出现频率最高可作为突破口。Brute force the 25 shifts, or use frequency analysis — e is the most common letter.
支持中文吗?Does it support Chinese?
不支持;中文可先转拼音,或改用维吉尼亚密码。No — convert to pinyin first, or use the Vigenère cipher.