Contents

说明:
本密码题来自《Understanding Cryptography》

密文:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
lrvmnir bpr sumvbwvr jx bpr lmiwv yjeryrkbi jx qmbm wi
bpr xjvni mkd ymibrut jx irhx wi bpr riirkvr jx
ymbinlmtmipw utn qmumbr dj w ipmhh but bj rhnvwdmbr bpr
yjeryrkbi jx bpr qmbm mvvjudwko bj yt wkbrusurbmbwjk
lmird jk xjubt trmui jx ibndt
wb wi kjb mk rmit bmiq bj rashmwk rmvp yjeryrkb mkd wbi
iwokwxwvmkvr mkd ijyr ynib urymwk nkrashmwkrd bj ower m
vjyshrbr rashmkmbwjk jkr cjnhd pmer bj lr fnmhwxwrd mkd
wkiswurd bj invp mk rabrkb bpmb pr vjnhd urmvp bpr ibmbr
jx rkhwopbrkrd ywkd vmsmlhr jx urvjokwgwko ijnkdhrii
ijnkd mkd ipmsrhrii ipmsr w dj kjb drry ytirhx bpr xwkmh
mnbpjuwbt lnb yt rasruwrkvr cwbp qmbm pmi hrxb kj djnlb
bpmb bpr xjhhjcwko wi bpr sujsru msshwvmbwjk mkd
wkbrusurbmbwjk w jxxru yt bprjuwri wk bpr pjsr bpmb bpr
riirkvr jx jqwkmcmk qmumbr cwhh urymwk wkbmvb

解密结果:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
BECAUSE THE PRACTICE OF THE BASIC MOVEMENTS OF KATA IS
THE FOCUS AND MASTERY OF SELF IS THE ESSENCE OF
MATSUBAYASHI RYU KARATE DO I SHALL TRY TO ELUCIDATE THE
MOVEMENTS OF THE KATA ACCORDING TO MY INTERPRETATION
BASED ON FORTY YEARS OF STUDY
IT IS NOT AN EASY TASK TO EXPLAIN EACH MOVEMENT AND ITS
SIGNIFICANCE AND SOME MUST REMAIN UNEXPLAINED TO GIVE A
COMPLETE EXPLANATION ONE WOULD HAVE TO BE QUALIFIED AND
INSPIRED TO SUCH AN EXTENT THAT HE COULD REACH THE STATE
OF ENLIGHTENED MIND CAPABLE OF RECOGNIZING SOUNDLESS
SOUND AND SHAPELESS SHAPE I DO NOT DEEM MYSELF THE FINAL
AUTHORITY BUT MY EXPERIENCE WITH KATA HAS LEFT NO DOUBT
THAT THE FOLLOWING IS THE PROPER APPLICATION AND
INTERPRETATION I OFFER MY THEORIES IN THE HOPE THAT THE
ESSENCE OF OKINAWAN KARATE WILL REMAIN INTACT

解密方法:

使用 http://practicalcryptography.com/cryptanalysis/letter-frequencies-various-languages/english-letter-frequencies/ 中的词频分析结果,分析出前3个字符:r, b, m。分别替代为 E,T,A(英语中出现概率最高的3个字符,出现的概率分别为:13%, 9%, %8)。

解密出的字符用对应的大写字母替代。再结合其他词频及猜测单词,依次解出所有字符。

字频分析代码:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php
$str = 'lrvmnir bpr sumvbwvr jx bpr lmiwv yjeryrkbi jx qmbm wi
bpr xjvni mkd ymibrut jx irhx wi bpr riirkvr jx
ymbinlmtmipw utn qmumbr dj w ipmhh but bj rhnvwdmbr bpr
yjeryrkbi jx bpr qmbm mvvjudwko bj yt wkbrusurbmbwjk
lmird jk xjubt trmui jx ibndt
wb wi kjb mk rmit bmiq bj rashmwk rmvp yjeryrkb mkd wbi
iwokwxwvmkvr mkd ijyr ynib urymwk nkrashmwkrd bj ower m
vjyshrbr rashmkmbwjk jkr cjnhd pmer bj lr fnmhwxwrd mkd
wkiswurd bj invp mk rabrkb bpmb pr vjnhd urmvp bpr ibmbr
jx rkhwopbrkrd ywkd vmsmlhr jx urvjokwgwko ijnkdhrii
ijnkd mkd ipmsrhrii ipmsr w dj kjb drry ytirhx bpr xwkmh
mnbpjuwbt lnb yt rasruwrkvr cwbp qmbm pmi hrxb kj djnlb
bpmb bpr xjhhjcwko wi bpr sujsru msshwvmbwjk mkd
wkbrusurbmbwjk w jxxru yt bprjuwri wk bpr pjsr bpmb bpr
riirkvr jx jqwkmcmk qmumbr cwhh urymwk wkbmvb';
$arr = [];
for ($i = 0; $i < strlen($str); $i++) {
if (trim($str[$i]) !== '') {
$arr[] = $str[$i];
}
}
$result = array_count_values($arr);
asort($result, SORT_NUMERIC);
print_r(array_slice($result, -5));
/*
Array
(
[j] => 48
[k] => 49
[m] => 62
[b] => 68
[r] => 84
)
*/
?>

按英文文本中前3个高频字符替换,即 r -> E, b -> T, m -> A

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
$str = 'lEvAniE TpE suAvTwvE jx TpE lAiwv yjeEyEkTi jx qATA wi
TpE xjvni Akd yAiTEut jx iEhx wi TpE EiiEkvE jx
yATinlAtAipw utn qAuATE dj w ipAhh Tut Tj EhnvwdATE TpE
yjeEyEkTi jx TpE qATA Avvjudwko Tj yt wkTEusuETATwjk
lAiEd jk xjuTt tEAui jx iTndt
wT wi kjT Ak EAit TAiq Tj EashAwk EAvp yjeEyEkT Akd wTi
iwokwxwvAkvE Akd ijyE yniT uEyAwk nkEashAwkEd Tj oweE A
vjyshETE EashAkATwjk jkE cjnhd pAeE Tj lE fnAhwxwEd Akd
wkiswuEd Tj invp Ak EaTEkT TpAT pE vjnhd uEAvp TpE iTATE
jx EkhwopTEkEd ywkd vAsAlhE jx uEvjokwgwko ijnkdhEii
ijnkd Akd ipAsEhEii ipAsE w dj kjT dEEy ytiEhx TpE xwkAh
AnTpjuwTt lnT yt EasEuwEkvE cwTp qATA pAi hExT kj djnlT
TpAT TpE xjhhjcwko wi TpE sujsEu AsshwvATwjk Akd
wkTEusuETATwjk w jxxEu yt TpEjuwEi wk TpE pjsE TpAT TpE
EiiEkvE jx jqwkAcAk qAuATE cwhh uEyAwk wkTAvT';
$arr = preg_split('/\s+/', $str);
$result = array_count_values($arr);
asort($result, SORT_NUMERIC);
print_r(array_slice($result, -10));
/*
Array
(
[kjT] => 2
[w] => 3
[TpAT] => 3
[qATA] => 3
[yt] => 3
[wi] => 4
[Tj] => 6
[Akd] => 6
[jx] => 9
[TpE] => 12
)
*/
?>

3个字母的单词按频率排序: TpE => 12, Akd => 6
2个字母的单词按频率排序: jx => 9, Tj => 6, wi => 4, yt => 3
1个字母的单词: w => 3

根据 http://practicalcryptography.com/cryptanalysis/letter-frequencies-various-languages/english-letter-frequencies/ 的结果:
最频繁出现的3个字符的单词分别为: the => 6.42%, and => 2.75%, for => 1.01%
解出
TpE 中的 p 对应 H (后面内容中,“对应”2个字用 “=>” 代替,大写字母代表解密结果)
Akd 中: k => N, d => D

最频繁出现的2个字符的单词分别为: of => 2.76%, to => 2.67%, in => 2.31%, is => 1.12%
解出
Tj 中, j => O
这样,jx 即 Ox, of 的词频是最高的,因此 x => F

最频繁出现的2个字符的单词分别为: a => 2.43%, i => 0.41%
即 w 可能是 A 也可能是 I
根据文中 *TwON 判断, w => I

得到结果:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
lEvAniE THE suAvTIvE OF THE lAiIv yOeEyENTi OF qATA Ii
THE FOvni AND yAiTEut OF iEhF Ii THE EiiENvE OF
yATinlAtAiHI utn qAuATE DO I iHAhh Tut TO EhnvIDATE THE
yOeEyENTi OF THE qATA AvvOuDINo TO yt INTEusuETATION
lAiED ON FOuTt tEAui OF iTnDt
IT Ii NOT AN EAit TAiq TO EashAIN EAvH yOeEyENT AND ITi
iIoNIFIvANvE AND iOyE yniT uEyAIN nNEashAINED TO oIeE A
vOyshETE EashANATION ONE cOnhD HAeE TO lE fnAhIFIED AND
INisIuED TO invH AN EaTENT THAT HE vOnhD uEAvH THE iTATE
OF ENhIoHTENED yIND vAsAlhE OF uEvOoNIgINo iOnNDhEii
iOnND AND iHAsEhEii iHAsE I DO NOT DEEy ytiEhF THE FINAh
AnTHOuITt lnT yt EasEuIENvE cITH qATA HAi hEFT NO DOnlT
THAT THE FOhhOcINo Ii THE suOsEu AsshIvATION AND
INTEusuETATION I OFFEu yt THEOuIEi IN THE HOsE THAT THE
EiiENvE OF OqINAcAN qAuATE cIhh uEyAIN INTAvT

INTAvT 根据常识推断: 解出: v => C

结果为:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
lECAniE THE suACTICE OF THE lAiIC yOeEyENTi OF qATA Ii
THE FOCni AND yAiTEut OF iEhF Ii THE EiiENCE OF
yATinlAtAiHI utn qAuATE DO I iHAhh Tut TO EhnCIDATE THE
yOeEyENTi OF THE qATA ACCOuDINo TO yt INTEusuETATION
lAiED ON FOuTt tEAui OF iTnDt
IT Ii NOT AN EAit TAiq TO EashAIN EACH yOeEyENT AND ITi
iIoNIFICANCE AND iOyE yniT uEyAIN nNEashAINED TO oIeE A
COyshETE EashANATION ONE cOnhD HAeE TO lE fnAhIFIED AND
INisIuED TO inCH AN EaTENT THAT HE COnhD uEACH THE iTATE
OF ENhIoHTENED yIND CAsAlhE OF uECOoNIgINo iOnNDhEii
iOnND AND iHAsEhEii iHAsE I DO NOT DEEy ytiEhF THE FINAh
AnTHOuITt lnT yt EasEuIENCE cITH qATA HAi hEFT NO DOnlT
THAT THE FOhhOcINo Ii THE suOsEu AsshICATION AND
INTEusuETATION I OFFEu yt THEOuIEi IN THE HOsE THAT THE
EiiENCE OF OqINAcAN qAuATE cIhh uEyAIN INTACT

EiiENCE 根据常识解出: i => S

结果为:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
lECAnSE THE suACTICE OF THE lASIC yOeEyENTS OF qATA IS
THE FOCnS AND yASTEut OF SEhF IS THE ESSENCE OF
yATSnlAtASHI utn qAuATE DO I SHAhh Tut TO EhnCIDATE THE
yOeEyENTS OF THE qATA ACCOuDINo TO yt INTEusuETATION
lASED ON FOuTt tEAuS OF STnDt
IT IS NOT AN EASt TASq TO EashAIN EACH yOeEyENT AND ITS
SIoNIFICANCE AND SOyE ynST uEyAIN nNEashAINED TO oIeE A
COyshETE EashANATION ONE cOnhD HAeE TO lE fnAhIFIED AND
INSsIuED TO SnCH AN EaTENT THAT HE COnhD uEACH THE STATE
OF ENhIoHTENED yIND CAsAlhE OF uECOoNIgINo SOnNDhESS
SOnND AND SHAsEhESS SHAsE I DO NOT DEEy ytSEhF THE FINAh
AnTHOuITt lnT yt EasEuIENCE cITH qATA HAS hEFT NO DOnlT
THAT THE FOhhOcINo IS THE suOsEu AsshICATION AND
INTEusuETATION I OFFEu yt THEOuIES IN THE HOsE THAT THE
ESSENCE OF OqINAcAN qAuATE cIhh uEyAIN INTACT

FOCnS 根据常识解出: n => U
结果为:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
lECAUSE THE suACTICE OF THE lASIC yOeEyENTS OF qATA IS
THE FOCUS AND yASTEut OF SEhF IS THE ESSENCE OF
yATSUlAtASHI utU qAuATE DO I SHAhh Tut TO EhUCIDATE THE
yOeEyENTS OF THE qATA ACCOuDINo TO yt INTEusuETATION
lASED ON FOuTt tEAuS OF STUDt
IT IS NOT AN EASt TASq TO EashAIN EACH yOeEyENT AND ITS
SIoNIFICANCE AND SOyE yUST uEyAIN UNEashAINED TO oIeE A
COyshETE EashANATION ONE cOUhD HAeE TO lE fUAhIFIED AND
INSsIuED TO SUCH AN EaTENT THAT HE COUhD uEACH THE STATE
OF ENhIoHTENED yIND CAsAlhE OF uECOoNIgINo SOUNDhESS
SOUND AND SHAsEhESS SHAsE I DO NOT DEEy ytSEhF THE FINAh
AUTHOuITt lUT yt EasEuIENCE cITH qATA HAS hEFT NO DOUlT
THAT THE FOhhOcINo IS THE suOsEu AsshICATION AND
INTEusuETATION I OFFEu yt THEOuIES IN THE HOsE THAT THE
ESSENCE OF OqINAcAN qAuATE cIhh uEyAIN INTACT

lECAUSE 根据常识解出: l => B
SHAhh 根据常识解出: h => L
STUDt, EASt 根据常识解出: t => Y

结果为:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
BECAUSE THE suACTICE OF THE BASIC yOeEyENTS OF qATA IS
THE FOCUS AND yASTEuY OF SELF IS THE ESSENCE OF
yATSUBAYASHI uYU qAuATE DO I SHALL TuY TO ELUCIDATE THE
yOeEyENTS OF THE qATA ACCOuDINo TO yY INTEusuETATION
BASED ON FOuTY YEAuS OF STUDY
IT IS NOT AN EASY TASq TO EasLAIN EACH yOeEyENT AND ITS
SIoNIFICANCE AND SOyE yUST uEyAIN UNEasLAINED TO oIeE A
COysLETE EasLANATION ONE cOULD HAeE TO BE fUALIFIED AND
INSsIuED TO SUCH AN EaTENT THAT HE COULD uEACH THE STATE
OF ENLIoHTENED yIND CAsABLE OF uECOoNIgINo SOUNDLESS
SOUND AND SHAsELESS SHAsE I DO NOT DEEy yYSELF THE FINAL
AUTHOuITY BUT yY EasEuIENCE cITH qATA HAS LEFT NO DOUBT
THAT THE FOLLOcINo IS THE suOsEu AssLICATION AND
INTEusuETATION I OFFEu yY THEOuIES IN THE HOsE THAT THE
ESSENCE OF OqINAcAN qAuATE cILL uEyAIN INTACT

FOuTY, YEAuS 根据常识解出: u => R
结果为:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
BECAUSE THE sRACTICE OF THE BASIC yOeEyENTS OF qATA IS
THE FOCUS AND yASTERY OF SELF IS THE ESSENCE OF
yATSUBAYASHI RYU qARATE DO I SHALL TRY TO ELUCIDATE THE
yOeEyENTS OF THE qATA ACCORDINo TO yY INTERsRETATION
BASED ON FORTY YEARS OF STUDY
IT IS NOT AN EASY TASq TO EasLAIN EACH yOeEyENT AND ITS
SIoNIFICANCE AND SOyE yUST REyAIN UNEasLAINED TO oIeE A
COysLETE EasLANATION ONE cOULD HAeE TO BE fUALIFIED AND
INSsIRED TO SUCH AN EaTENT THAT HE COULD REACH THE STATE
OF ENLIoHTENED yIND CAsABLE OF RECOoNIgINo SOUNDLESS
SOUND AND SHAsELESS SHAsE I DO NOT DEEy yYSELF THE FINAL
AUTHORITY BUT yY EasERIENCE cITH qATA HAS LEFT NO DOUBT
THAT THE FOLLOcINo IS THE sROsER AssLICATION AND
INTERsRETATION I OFFER yY THEORIES IN THE HOsE THAT THE
ESSENCE OF OqINAcAN qARATE cILL REyAIN INTACT

REyAIN 根据常识解出: y => M
结果为:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
BECAUSE THE sRACTICE OF THE BASIC MOeEMENTS OF qATA IS
THE FOCUS AND MASTERY OF SELF IS THE ESSENCE OF
MATSUBAYASHI RYU qARATE DO I SHALL TRY TO ELUCIDATE THE
MOeEMENTS OF THE qATA ACCORDINo TO MY INTERsRETATION
BASED ON FORTY YEARS OF STUDY
IT IS NOT AN EASY TASq TO EasLAIN EACH MOeEMENT AND ITS
SIoNIFICANCE AND SOME MUST REMAIN UNEasLAINED TO oIeE A
COMsLETE EasLANATION ONE cOULD HAeE TO BE fUALIFIED AND
INSsIRED TO SUCH AN EaTENT THAT HE COULD REACH THE STATE
OF ENLIoHTENED MIND CAsABLE OF RECOoNIgINo SOUNDLESS
SOUND AND SHAsELESS SHAsE I DO NOT DEEM MYSELF THE FINAL
AUTHORITY BUT MY EasERIENCE cITH qATA HAS LEFT NO DOUBT
THAT THE FOLLOcINo IS THE sROsER AssLICATION AND
INTERsRETATION I OFFER MY THEORIES IN THE HOsE THAT THE
ESSENCE OF OqINAcAN qARATE cILL REMAIN INTACT

MOeEMENTS 根据常识解出: e => V
INTERsRETATION 根据常识解出: s => P

结果为:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
BECAUSE THE PRACTICE OF THE BASIC MOVEMENTS OF qATA IS
THE FOCUS AND MASTERY OF SELF IS THE ESSENCE OF
MATSUBAYASHI RYU qARATE DO I SHALL TRY TO ELUCIDATE THE
MOVEMENTS OF THE qATA ACCORDINo TO MY INTERPRETATION
BASED ON FORTY YEARS OF STUDY
IT IS NOT AN EASY TASq TO EaPLAIN EACH MOVEMENT AND ITS
SIoNIFICANCE AND SOME MUST REMAIN UNEaPLAINED TO oIVE A
COMPLETE EaPLANATION ONE cOULD HAVE TO BE fUALIFIED AND
INSPIRED TO SUCH AN EaTENT THAT HE COULD REACH THE STATE
OF ENLIoHTENED MIND CAPABLE OF RECOoNIgINo SOUNDLESS
SOUND AND SHAPELESS SHAPE I DO NOT DEEM MYSELF THE FINAL
AUTHORITY BUT MY EaPERIENCE cITH qATA HAS LEFT NO DOUBT
THAT THE FOLLOcINo IS THE PROPER APPLICATION AND
INTERPRETATION I OFFER MY THEORIES IN THE HOPE THAT THE
ESSENCE OF OqINAcAN qARATE cILL REMAIN INTACT

EaPLAIN 根据常识解出: a => X
ACCORDINo 根据常识解出: o => G

结果为:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
BECAUSE THE PRACTICE OF THE BASIC MOVEMENTS OF qATA IS
THE FOCUS AND MASTERY OF SELF IS THE ESSENCE OF
MATSUBAYASHI RYU qARATE DO I SHALL TRY TO ELUCIDATE THE
MOVEMENTS OF THE qATA ACCORDING TO MY INTERPRETATION
BASED ON FORTY YEARS OF STUDY
IT IS NOT AN EASY TASq TO EXPLAIN EACH MOVEMENT AND ITS
SIGNIFICANCE AND SOME MUST REMAIN UNEXPLAINED TO GIVE A
COMPLETE EXPLANATION ONE cOULD HAVE TO BE fUALIFIED AND
INSPIRED TO SUCH AN EXTENT THAT HE COULD REACH THE STATE
OF ENLIGHTENED MIND CAPABLE OF RECOGNIgING SOUNDLESS
SOUND AND SHAPELESS SHAPE I DO NOT DEEM MYSELF THE FINAL
AUTHORITY BUT MY EXPERIENCE cITH qATA HAS LEFT NO DOUBT
THAT THE FOLLOcING IS THE PROPER APPLICATION AND
INTERPRETATION I OFFER MY THEORIES IN THE HOPE THAT THE
ESSENCE OF OqINAcAN qARATE cILL REMAIN INTACT

fUALIFIED 根据常识解出: f => Q
RECOGNIgING 根据常识解出: g => Z
TASq 根据常识解出: q => K
FOLLOcING 根据常识解出: c => W

结果为:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
BECAUSE THE PRACTICE OF THE BASIC MOVEMENTS OF KATA IS
THE FOCUS AND MASTERY OF SELF IS THE ESSENCE OF
MATSUBAYASHI RYU KARATE DO I SHALL TRY TO ELUCIDATE THE
MOVEMENTS OF THE KATA ACCORDING TO MY INTERPRETATION
BASED ON FORTY YEARS OF STUDY
IT IS NOT AN EASY TASK TO EXPLAIN EACH MOVEMENT AND ITS
SIGNIFICANCE AND SOME MUST REMAIN UNEXPLAINED TO GIVE A
COMPLETE EXPLANATION ONE WOULD HAVE TO BE QUALIFIED AND
INSPIRED TO SUCH AN EXTENT THAT HE COULD REACH THE STATE
OF ENLIGHTENED MIND CAPABLE OF RECOGNIZING SOUNDLESS
SOUND AND SHAPELESS SHAPE I DO NOT DEEM MYSELF THE FINAL
AUTHORITY BUT MY EXPERIENCE WITH KATA HAS LEFT NO DOUBT
THAT THE FOLLOWING IS THE PROPER APPLICATION AND
INTERPRETATION I OFFER MY THEORIES IN THE HOPE THAT THE
ESSENCE OF OKINAWAN KARATE WILL REMAIN INTACT

至此解密完毕

明文使用 Google 的图书搜索 得到结果:

The Essence of Okinawan Karate-Do - Page 56
by Shoshin Nagamine
Contents