The Bacon cipher was devised in 1605 by Francis Bacon. It is a method of steganographic message encoding, where the true message is hidden inside a seemingly innocuous other message.
Each letter in the Latin alphabet is assigned a five digit binary string, in which each digit corresponds to either an 'a' or 'b'. There are two versions of the Bacon cipher: the original—in which the letters I, J, U, and V do not have unique binary assignments—and the unique variant, in which every letter is assigned a unique binary string.
The code examples above use the unique bacon table.
Original Bacon Table
Letter | Binary | Code | Letter | Binary | Code | |
---|---|---|---|---|---|---|
A | 00000 | aaaaa | N | 01100 | abbaa | |
B | 00001 | aaaab | O | 01101 | abbab | |
C | 00010 | aaaba | P | 01110 | abbba | |
D | 00011 | aaabb | Q | 01111 | abbbb | |
E | 00100 | aabaa | R | 10000 | baaaa | |
F | 00101 | aabab | S | 10001 | baaab | |
G | 00110 | aabba | T | 10010 | baaba | |
H | 00111 | aabbb | U | 10011 | baabb | |
I | 01000 | abaaa | V | 10011 | baabb | |
J | 01000 | abaaa | W | 10100 | babaa | |
K | 01001 | abaab | X | 10101 | babab | |
L | 01010 | ababa | Y | 10110 | babba | |
M | 01011 | ababb | Z | 10111 | babbb |
Unique Bacon Table
Letter | Binary | Code | Letter | Binary | Code | |
---|---|---|---|---|---|---|
A | 00000 | aaaaa | N | 01101 | abbab | |
B | 00001 | aaaab | O | 01110 | abbba | |
C | 00010 | aaaba | P | 01111 | abbbb | |
D | 00011 | aaabb | Q | 10000 | baaaa | |
E | 00100 | aabaa | R | 10001 | baaab | |
F | 00101 | aabab | S | 10010 | baaba | |
G | 00110 | aabba | T | 10011 | baabb | |
H | 00111 | aabbb | U | 10100 | baabb | |
I | 01000 | abaaa | V | 10101 | babab | |
J | 01001 | abaab | W | 10110 | babba | |
K | 01010 | ababa | X | 10111 | babbb | |
L | 01011 | ababb | Y | 11000 | bbaaa | |
M | 01100 | abbaa | Z | 11001 | bbaab |