什麼是 凱薩密碼?

免費線上凱薩密碼工具。使用凱薩位移密碼加密或解密文字。

凱薩密碼是已知最早的加密技術之一,由凱薩大帝用來保護軍事訊息。明文中的每個字母在字母表中向後位移固定數量的位置。以現代運算能力而言,它不提供真正的安全性——但作為理解密碼學基礎、字元編碼與模運算的教學工具,它仍然非常出色。

此工具支援 1 到 25 位元的自訂位移。快速預設按鈕提供 ROT3(經典的凱薩位移)、ROT5(位移數字 0-9)、ROT13(位移字母,自反)與 ROT47(位移所有可列印的 ASCII 字元)。選擇加密或解密模式——加密向前位移,解密向後位移。滑桿提供細微的位移選擇。

暴力破解模式同時顯示全部 25 種可能的位移。這對密碼分析很有用:如果您有密文但不知道位移量,暴力破解會一次顯示所有可能的解密結果。正確的位移通常會產生可讀的英文文字。字母頻率長條圖將輸出中字母的分布視覺化,有助於辨識指示正確解密的自然字母分布。

非字母字元(空格、數字、標點符號)會保留在原始位置。字母大小寫會被保留。工具適用於任何英文或使用拉丁字母語言的文字。

凱薩密碼的實際應用案例

學生學習凱薩密碼的運作方式

一位密碼學學生輸入「HELLO WORLD」並用 ROT3 加密。結果是「KHOOR ZRUOG」。接著他們貼回密文、切換到 ROT3 解密,得到原始文字。學生嘗試不同的位移以理解對應關係。

用暴力破解破解未知的凱薩密碼

一位謎題解題者發現編碼訊息「WKH HDJOH LV LQ WKH QHVW」,但不知道位移量。他們將其貼入暴力破解檢視。全部 25 種位移都顯示出來。其中一種位移脫穎而出:位移 3 時出現「THE EAGLE IS IN THE NEST」——正確的解密。

使用 ROT13 進行簡單的文字混淆

一位論壇使用者想發表一篇劇透文,卻不想立刻洩漏內容。他們用 ROT13 加密自己的文字。想讀劇透的人可以將文字貼回並再次套用 ROT13 解密(因為 ROT13 對 26 個字母自反)。

為什麼要使用 凱薩密碼?

  • Custom shift (1-25) with slider and quick ROT buttons (ROT3, ROT5, ROT13, ROT47)
  • Brute-force mode shows all 25 shifts at once
  • Letter frequency analysis with visual bar chart
  • Preserves non-alphabetic characters and case
  • Professional-grade modular arithmetic implementation

如何使用 凱薩密碼 — 逐步教學

1

Enter your text in the input box.

2

Choose Encrypt or Decrypt mode.

3

使用滑桿調整位移值,或點選 ROT 預設按鈕。

4

Toggle "All" to brute-force all 25 shifts.

5

Use the letter frequency chart to help identify the correct shift.

凱薩密碼適合誰?

  • 學習密碼學的學生
  • CTF 玩家
  • 謎題解謎者
  • 密碼學愛好者

凱薩密碼專業技巧

  • 1ROT13 是網路上最常見的凱薩變體,因為它自反——套用兩次就會恢復原始文字。它常用於論壇的劇透保護與簡單的文字混淆。
  • 2字母頻率圖是破解未知位移的關鍵。在英文中,E 是最常見的字母(約佔文字的 12.7%),其次是 T、A、O、I、N、S、H 與 R。如果圖表顯示的分布符合此模式,您就找到了正確的位移。
  • 3ROT47 位移全部 94 個可列印的 ASCII 字元,而不只是字母。這使它適合混淆包含數字、標點與特殊字元(ROT13 不會改變這些)的文字。
  • 4凱薩密碼是單字母替代密碼——每個字母只對應到另一個字母。這使它很容易用頻率分析破解。現代加密使用多字母替代密碼與基於金鑰的演算法來抵抗這種攻擊。

凱薩密碼 — 常見問題

ROT13 與凱薩密碼有何不同?

ROT13 is a Caesar cipher with shift 13. Since the alphabet has 26 letters, ROT13 is self-inverse — applying it twice returns the original text. ROT47 extends the concept to all 94 printable ASCII characters.

凱薩密碼可以被破解嗎?

Yes, easily. There are only 25 possible shifts, so brute-force reveals all of them instantly. The frequency analysis chart helps identify which shift produces the most natural letter distribution.

Does the text analyzer support non-English languages?

Yes. The analysis uses the browser's native Intl API for language-aware text segmentation. Word and character counting works correctly for most languages including Chinese, Japanese, Arabic, and accented Latin scripts.

Can I process very long documents?

Documents up to approximately 100,000 words are supported. Analysis is incremental, meaning results update instantly even for large texts without blocking the browser.

Is there a difference between character count with and without spaces?

Yes. The tool provides both metrics. Character count without spaces is commonly used for SMS, social media posts, and certain content management systems.

準備好使用 凱薩密碼 了嗎?

免費線上工具 — 在瀏覽器中運作,無需註冊。立即開始使用。

立即試用
Free Forever · No Sign-up

182 Free Tools at Your Fingertips

All free online tools for developers, designers, students, and creators. Every tool works in your browser — no sign-up, no data collection.