培根密码本质上是使用二进制数设计的,没有采用01编码,而是使用AB来表示
培根密码对照表
第一种方式:
A aaaaa B aaaab C aaaba D aaabb E aabaa F aabab G aabba H aabbb I abaaa J abaab
K ababa L ababb M abbaa N abbab O abbba P abbbb Q baaaa R baaab S baaba T baabb
U babaa V babab W babba X babbb Y bbaaa Z bbaab
第二种方式
a AAAAA g AABBA n ABBAA t BAABA
b AAAAB h AABBB o ABBAB u-v BAABB
c AAABA i-j ABAAA p ABBBA w BABAA
d AAABB k ABAAB q ABBBB x BABAB
e AABAA l ABABA r BAAAA y BABBA
f AABAB m ABABB s BAAAB z BABBB
基础应用
密文:BAABABAABBAABAAAABBAAAAAAABBABABBBAAABBABAAABAAAAAABBBBAABBBBBAAA
明文:BAABA BAABB AABAA AABBA AAAAA ABBAB ABBBA AABBA BAAAB AAAAA ABBBB AABBB BBAAA
s t e g a n o g r a p h y
也就是说明文为steganography
进阶应用
密文:SjkLnIljKHamJmkilABawiiioaAMbOaPIJmklNBaKijmBuaoljiAUWMakMHWNAakm
明文:BAABA BAABB AABAA AABBA AAAAA ABBAB ABBBA AABBA BAAAB AAAAA ABBBB AABBB BBAAA
s t e g a n o g r a p h y
这里是怎么回事呢,我们令大写字母为B,小写字母为A,则将密文转化为BA字符串,再解码即可
密文:
To encodeamessage each letteroftheplaintextis replaced by a group of fiveo
明文:BAABA BAABB AABAA AABBA AAAAA ABBAB ABBBA AABBA BAAAB AAAAA ABBBB AABBB BBAAA
s t e g a n o g r a p h y
我们令粗体表示B,正常字体为A,则将密文转化为BA字符串,再解码即可。
密文:xgdocpdcuuhlpfmglupfdlbhekpxiqknvpiimyykoeahrjjcfkmqusrkbuutqvlfb
明文:BAABA BAABB AABAA AABBA AAAAA ABBAB ABBBA AABBA BAAAB AAAAA ABBBB AABBB BBAAA
s t e g a n o g r a p h y
这里的规则是:
a--m --> A: 字母a到m这一范围内的字母统一换成A
n--z --> B: 字母n到z这一范围内的字母统一换成B