我們說,透過字詞出現的頻率來分析密文,稱為頻率分析,根據常見的有字典頻率分析的三原則,我們可以推導為明文。
前五名常出現的字母:e, t, a, o, i、最常出現的單字:the, to, of, and、常見的雙字母組合:st, ng, th, qu
邪惡的駭客總是從經驗中累積自己的破解實力,這次他知道了暴力破解法很耗時,決定採用頻率分析。
駭客已取得一篇文章,文章包含了上下段的明文,而中段的文字使用替換式加密,於是他決定依序下列步驟破解密文。
STEP 1. 首先,把「密文前後段的明文」做單字頻率分析,得出「表一、部分明文單字頻率」 。
STEP 2. 將「表二、字典字母頻率」與「表三、密文字母頻率」進行對照,並依據「表一、部分明文單字頻率」 推論密文中重複出現的單字。
STEP 3. 在「表四、解密後的明文」將加密段落回推為明文。
➢ 操作說明
請參考駭客提示的步驟,將你覺得可能的明文字母填入表四,並檢查解密後的明文是否通順,完成頻率分析。
駭客已取得一篇文章,文章包含了上下段的明文,而中段的文字使用替換式加密,於是他決定依序下列步驟破解密文。
STEP 1. 首先,把「密文前後段的明文」做單字頻率分析,得出「表一、部分明文單字頻率」 。
STEP 2. 將「表二、字典字母頻率」與「表三、密文字母頻率」進行對照,並依據「表一、部分明文單字頻率」 推論密文中重複出現的單字。
STEP 3. 在「表四、解密後的明文」將加密段落回推為明文。
➢ 操作說明
請參考駭客提示的步驟,將你覺得可能的明文字母填入表四,並檢查解密後的明文是否通順,完成頻率分析。
文章
Once upon a time, a farmer had a goose that laid one golden egg every day. The egg provided enough money for the farmer and his wife to support their daily needs. The farmer and his wife continued to be happy for a long time. But, one day, the farmer thought, “Why should we take just one egg a day? Why can’t we take them all at once and make a lot of money?” The farmer told his wife his idea, and she foolishly agreed.
PHEF, PHE FEAP CLK, LB PHE GOOBE WLIC IPB GOWCEF EGG, PHE YLTUET DLB SZIVJ DIPH L BHLTN JFIYE. HE JIWWEC PHE GOOBE LFC VZP IPB BPOULVH ONEF, HONIFG PO YIFC LWW IPB GOWCEF EGGB.
But as he opened the stomach, he only found guts and blood. The farmer quickly realized his foolish mistake and proceeded to cry over his lost resource.
As the days went on, the farmer and his wife became poorer and poorer because of their foolishness.
明文
Once upon a time, a farmer had a goose that laid one golden egg every day. The egg provided enough money for the farmer and his wife to support their daily needs. The farmer and his wife continued to be happy for a long time. But, one day, the farmer thought, “Why should we take just one egg a day? Why can’t we take them all at once and make a lot of money?” The farmer told his wife his idea, and she foolishly agreed.
But as he opened the stomach, he only found guts and blood. The farmer quickly realized his foolish mistake and proceeded to cry over his lost resource.
As the days went on, the farmer and his wife became poorer and poorer because of their foolishness.
But as he opened the stomach, he only found guts and blood. The farmer quickly realized his foolish mistake and proceeded to cry over his lost resource.
As the days went on, the farmer and his wife became poorer and poorer because of their foolishness.
密文
PHEF, PHE FEAP CLK, LB PHE GOOBE WLIC IPB GOWCEF EGG, PHE YLTUET DLB SZIVJ DIPH L BHLTN JFIYE. HE JIWWEC PHE GOOBE LFC VZP IPB BPOULVH ONEF, HONIFG PO YIFC LWW IPB GOWCEF EGGB.
表一、明文單字頻率 (出現頻率前10高的單字)
表二、字典字母頻率
表三、密文字母頻率
表四、解密後的明文
按下「替換」後,出現橘底為解密正確的字母。
按下「替換」後,出現橘底為解密正確的字母。
注意:同一格密文字母只能放入一個"藍色字母方塊",以確保每一個明文字母只會對應到一個密文字母。
透過「表三、密文字母頻率」可以發現密文中沒有出現 MQRX 這四個字母,因此這四個密文字母的橘底答案僅供參考。
透過「表三、密文字母頻率」可以發現密文中沒有出現 MQRX 這四個字母,因此這四個密文字母的橘底答案僅供參考。
明文 |
|
密文 |
|
拖曳方塊 |
|