Bacon's cipher is a simple substitution cipher in which the ciphertext consists of five-letter strings consisting of the letters A and B.
Francis Bacon developed this method of hiding one message in another. This is not a real cipher, but just a way to hide secret text from being read directly.
The Bacon cipher is actually a method of steganography (a method of hiding a secret message as opposed to a cipher) developed by Francis Bacon in 1605. The message is hidden in the presentation of the text, not in its body.
There are two versions. The first uses the same code for I and J and for U and V. The second uses different codes for each letter.
Each letter of plaintext is replaced by a group of five letters 'A' or 'B'. This conversion is binary encoding and follows the Bacon cipher alphabet (from the Latin alphabet) as below:
Letter |
Code |
Binary
|
A |
aaaaa |
00000
|
B |
aaaab |
00001
|
C |
aaaba |
00010
|
D |
aaabb |
00011
|
E |
aabaa |
00100
|
F |
aabab |
00101
|
G |
aabba |
00110
|
H |
aabbb |
00111
|
I, J |
abaaa |
01000
|
K |
abaab |
01001
|
L |
ababa |
01010
|
M |
ababb |
01011
|
|
Letter |
Code |
Binary
|
N |
abbaa |
01100
|
O |
abbab |
01101
|
P |
abbba |
01110
|
Q |
abbbb |
01111
|
R |
baaaa |
10000
|
S |
baaab |
10001
|
T |
baaba |
10010
|
U, V |
baabb |
10011
|
W |
babaa |
10100
|
X |
babab |
10101
|
Y |
babba |
10110
|
Z |
babbb |
10111
|
|
The second version of the Bacon cipher uses a unique code for each letter. In other words, I , J , U , and V have their own separate code:
Letter |
Code |
Binary
|
A |
aaaaa |
00000
|
B |
aaaab |
00001
|
C |
aaaba |
00010
|
D |
aaabb |
00011
|
E |
aabaa |
00100
|
F |
aabab |
00101
|
G |
aabba |
00110
|
H |
aabbb |
00111
|
I |
abaaa |
01000
|
J |
abaab |
01001
|
K |
ababa |
01010
|
L |
ababb |
01011
|
M |
abbaa |
01100
|
|
Letter |
Code |
Binary
|
N |
abbab |
01101
|
O |
abbba |
01110
|
P |
abbbb |
01111
|
Q |
baaaa |
10000
|
R |
baaab |
10001
|
S |
baaba |
10010
|
T |
baabb |
10011
|
U |
babaa |
10100
|
V |
babab |
10101
|
W |
babba |
10110
|
X |
babbb |
10111
|
Y |
bbaaa |
11000
|
Z |
bbaab |
11001
|
|
In the original, the author used two different typefaces to hide the true content. Different typeface for A and different for B.
For example, we want to hide the word "MESSAGE" and encode it in some body that will appear to be plain text. By encrypting the word MESSAGE with the Bacon code, we will get ABABBAABAABAAABBAAABAAAAAABBAAABAA . The original secret message (MESSAGE) is 7 characters long, so the encoded version is 7 * 5 = 35 characters. We find a sentence with 35 letters, it could be "In this text is hidden a top secret message". Now we change the typeface. For each B, we will use bold italics and leave A unchanged.
AB ABBA ABAA BA AABBAA A BAA AAAAAB BAAABAA
In this text is hidden a top secret message
So our open message in which we encoded the secret text would look like this "In this text is hidden a top secret message".
If I wanted to decrypt the secret information, it would be enough if I would substitute A for each normally written letter, and B for the letter written in bold italics. Put the obtained result into the decoder or check it in the table.
More on: Wikipedia - Bacon's cipher