# Baconian Cipher

## Introduction §

The Baconian cipher is named after its inventor, Sir Francis Bacon. The Baconian cipher is a substitution cipher in which each letter is replaced by a sequence of 5 characters. In the original cipher, these were sequences of 'A's and 'B's e.g. the letter 'D' was replaced by 'aaabb', the letter 'O' was replaced by 'abbab' etc.

This cipher offers very little communication security, as it is a substitution cipher. As such all the methods used to cryptanalyse substitution ciphers can be used to break Baconian ciphers. The main advantage of the cipher is that it allows hiding the fact that a secret message has been sent at all.

## The Algorithm §

Each letter is assigned to a string of five binary digits. These could be the letters 'A' and 'B', the numbers 0 and 1 or whatever else you may desire. An example Baconian Cipher Encoding might be:

```A = aaaaa  I/J = abaaa    R = baaaa
B = aaaab    K = abaab    S = baaab
C = aaaba    L = ababa    T = baaba
D = aaabb    M = ababb  U/V = baabb
E = aabaa    N = abbaa    W = babaa
F = aabab    O = abbab    X = babab
G = aabba    P = abbba    Y = babba
H = aabbb    Q = abbbb    Z = babbb
```

To encipher a message, e.g. 'STRIKE NOW', we replace each letter:

```S     T     R     I     K     E     N     O     W
baaab baaba baaaa abaaa abaab aabaa abbaa abbab babaa

Hold OFf uNtIl you hEar frOm mE agAin. wE May cOMpROmIse.
```

The message above has been written so that capital letters are used where the Baconian cipher has a 'b' and lowercase where there is an 'a'. This scheme is a little bit transparent, however there are many ways of encoding a Baconian cipher in text. This page discusses several examples.

## Cryptanalysis §

The Baconian cipher is a substitution cipher, which can be easily broken, see here for an example of quickly breaking substitution ciphers.