VIGENÈRE CIPHER
维吉尼亚密码,多表替换难猜透。
输入文本与密钥即可加密或解密。密钥按字母循环作用于明文,比单表凯撒更难破解,是 CTF 常见古典密码。
本页处理在浏览器本地完成
这是什么?
维吉尼亚用一组循环移位凯撒表:明文字母按其在字母表的位置、再叠加对应密钥字母的偏移得到密文。解密时反过来减。本工具只处理 A–Z/a–z,其它字符原样保留。
常见问题
密钥能是中文吗?
标准维吉尼亚只用 A–Z。本工具会忽略密钥中的非字母字符,并把字母统一大写后再使用。
文件会上传吗?
不会。所有计算都在当前浏览器里完成,文本不会发送到任何服务器。
示例与注意事项Example & notes
一个例子A worked example
明文 ATTACK、密钥 KEY 加密得到 KXRKCE——每个字母的位移量都不同,比凯撒难破解得多。Plaintext ATTACK with key KEY encrypts to KXRKCE — each letter shifts by a different amount.
注意事项Things to watch
- 密钥循环使用,太短会暴露周期性,建议与明文长度相当。The key repeats, so a short one exposes periodicity; match the message length.
- 同一明文配不同密钥结果完全不同,这正是它的价值。The same plaintext with a different key gives unrelated output — that is the point.
- 仍属古典密码,现代场景请使用 AES 等标准算法。It is still classical crypto; use AES or similar for real work.
相关问答More Q&A
怎么解密?How do I decrypt?
用同一密钥反向位移即可,页面支持加密与解密双向切换。Shift backwards with the same key — the page toggles between the two directions.
密钥可以用中文吗?Can the key be Chinese?
建议用字母;中文可先转拼音再作为密钥。Stick to letters; convert Chinese to pinyin first.