Tools · Machines and secret writing
Bacon’s cipher
Francis Bacon’s cipher: each letter becomes five A/B marks that can hide in the typeface of an innocent text.
Runs in your browser. Your text goes nowhere.
How to use it
Type a secret and each letter turns into a group of A and B marks. Paste groups of A and B (or 0 and 1) and you get the letters back. The “Table” switch picks the version:
- 24 letters (Bacon) is Bacon’s own table, in which I and J share a group, and so do U and V, as was usual in the Latin script of his day.
- 26 letters is the modern version with a group for every letter: a = AAAAA, b = AAAAB and so on, which is really the letter’s number in binary.
- Russian, 6 marks: 33 letters don’t fit into five marks (there are only 32 combinations), so the groups have six. Bacon had no such table; it is our extension.
Hide it in an ordinary text
Bacon’s real idea was not the groups but where to put them. He suggested printing a harmless letter in two slightly different typefaces: a letter in the first face means A, in the second, B. A reader sees a note about the weather; someone in the know sees the secret. That is no longer a cipher but steganography, hiding the fact that there is a message at all.
Write a cover text and the tool marks it up: the B letters become bold, italic, a different typeface or capitals, as you choose. The cover needs enough letters, five per letter of the secret. Any letters left over at the end mean nothing.
Read a hidden message
Typefaces and bold are lost when text is copied, so for sending through a chat capitals work better. Paste such a text into the bottom panel: each letter becomes an A or a B, the marks gather into groups and the groups into the secret. If the capitals mark A rather than B, switch to “lowercase = B”.
Questions
When did Bacon invent it?
He published it in De Augmentis Scientiarum in 1623, and wrote that he had devised it as a young man in Paris.
Did Bacon hide messages in Shakespeare’s plays?
That is a popular legend. William and Elizebeth Friedman, later famous American codebreakers, examined it and showed that such “messages” can be pulled out of any text if you sort the letters into typefaces to suit the answer you want.
Is it secure?
As a cipher, no: the table is public. Its strength is that nobody notices it. More such tricks in the lesson on steganography.