原理
簡單替換密碼(Simple Substitution Cipher)加密時,將每個明文字母替換為與之唯一對應且不同的字母。它與愷撒密碼之間的區別是其密碼字母表的字母不是簡單的移位,而是完全是混亂的,這也使得其破解難度要高於凱撒密碼。 比如:
明文字母 : abcdefghijklmnopqrstuvwxyz
密鑰字母 : phqgiumeaylnofdxjkrcvstzwb
a 對應 p,d 對應 h,以此類推。
明文:the quick brown fox jumps over the lazy dog
密文:cei jvaql hkdtf udz yvoxr dsik cei npbw gdm
而解密時,我們一般是知道了每一個字母的對應規則,才可以正常解密。
破解
由於這種加密方式導致其所有的密鑰個數是26!26! ,所以幾乎上不可能使用暴力的解決方式。所以我們 一般采用詞頻分析。
工具
-
在線網站:http://quipqiup.com/
該網站提供一個密文和線索輸入框,執行后自動進行匹配破解,例如:密文Puzzle:
cei jvaql hkdtf udz yvoxr dsik cei npbw gdm線索Clues:
g=d解密結果:第二行
0 -1.604 the jumps brown fox quick over the lazy dog 1 -1.604 the quick brown fox jumps over the lazy dog 2 -1.632 the films brown you ?i??? over the jack dog 3 -1.632 the ?i??? brown you films over the jack dog 4 -1.860 one ?i??? black was right axel one jump day 5 -1.885 she ?u??? front box quick over she play dog 6 -1.885 she quick front box ?u??? over she play dog 7 -1.889 she ?u??? brown tom quick over she play dog