Ciphers
Bacon's cipher
Five A or B per letter, the 26-letter variant, no separators. Made to hide in another text's typography.
- create
- create("bacon")
- family
- Fractionation
- options
- none
- self-inverse
- no
- keyspace
- 1 (fixed 5-bit encoding)
- try it
- ciphers bacon "SECRET"
Francis Bacon's cipher writes each letter as five symbols from a two-letter alphabet, originally to hide a message in the italics of an innocent text. The historical alphabet has 24 letters, I and J merged, U and V merged. This one uses all 26 - A is AAAAA, B is AAAAB, Z is BBAAB - so the round trip is exact. No separators in the output. Decoding reads any A and B, ignores everything else, takes them five at a time.
const bacon = create("bacon");
bacon.encode("A").text; // "AAAAA"
bacon.encode("HI").text; // "AABBBABAAA"
bacon.decode("AABBB ABAAA").text; // "HI"
Puzzle uses the 24-letter version? Then I and J come out as one letter and U and V too. Map them by hand after decoding, it's two letters.