Baconian Cipher Wed 26 Feb. 2003 G Gordon Worley III redbird@mac.com Sir Francis Bacon lived from 1562 to 1626. During that time he developed the modern version of the scientific method wrote several scientific works. In his spare time he developed ciphers and, according to rumor, wrote the works of Shakespeare (and, if you're interested, every work of literature past, present, and future). Bacon was interested in developing ciphers that would allow him to transmit secret message without anyone knowing that secret messages were being sent. The Baconian Cipher system is one such method. Baconian Cipher ~~~~~~~~~~~~~~~ The Baconian Cipher (or, rather, ciphers) are based on a binary encoding of the plain text. Each letter is assigned to a string of five binary digits. In most cases, a and b are used instead of 1 and 0. A simple 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 Although this 24 letter alphabet is commonly used, you can use one of any size (26 letters like standard English, or 21 letters in Bacon's own alphabet) that can be encoded in bit strings of length 5 (32 possible encodings). So, let's say Bacon wants to send a message to Angela about a new brand of dog food he has been using. Pt: ITS BACON Et: abaaa baaba baaab aaaab aaaaa aaaba abbab ababb Our encoded text (Et) is now ready to be turned into cipher text. There are several ways to do this. One is to modify some plain text to hide the message in the style of the text. For instance, you might line the Et up with some generic text from a letter: Et: ab aaa baa bab aaaba aaa baaaaaa aa baab baba babb Lt: Hi, how are you doing. The weather is nice here today. Ct1: Hi, HOW aRE yOu DOInG. THE wEATHER IS nICe hErE tOday. And generate the above cipher text. In Ct1, all letters in Lt with an `a' above them were made capital letters and all letters in Lt with a `b' above them were made into lowercase letters. Of course, this cipher text is pretty obvious, so it doesn't really accomplish the goal of concealing that any secret message is being transmitted. Another method is a generate a cipher text by specifying that a range of letters in the Ct will serve as an `a' and the rest will be `b's. For instance, assume we assign the letters A through K to `a' and L through Z to `b', then we generate the following cipher text: Et: a baaa baa bab aaa ba aaa baa aaa aaab aab baba babb Ct2: I like the new bag. We had the bag kids get Nana less. Assuming you generate a good cipher text (better than mine), it will not be obvious that you are sending cipher text. This is much easier if each letter in Et is used in a null cipher, where a particular character, set by the protocol, in a word is the only one that is considered. Using the character ranges from earlier and the first letter of each word in the cipher text: Et: abaaa. baababaa. abaaaabaaaaaaaabaabbab. ababb Ct3: I like kitties and doggies. They have always liked helping me feel better. I remember an instance from childhood where a kind kangaroo cat came and aided everytime my brother, Anthony, stepped on a nail. He was a nice pet. As you may have noticed, the generated text sounds a little artificial. It is often better to start with a cipher text and work backwards to develop a message from it, changing the mapping from encoding to characters as necessary to hide the message. The protocol is up the sender and the recipient. These are just some suggestions; you can generate many different encryption protocols based on Baconian encoding. The keyspace of such ciphers is the size of the encoding space times the size of the function from Et to Ct. |Baconian Encodings| = P(32, 24) {using our 24 letter alphabet; replace 24 with the size of your alphabet.} 26! |f:Et->Ct2| = -------- 11!15! So the total size of the cipher used in example 2 would be: P(32, 24)26! ------------- = 3276647891112960000 11!15! Which is brute forcable in a reasonable amount of time. Baconian ciphers are a lot of fun and can be an interesting way to spend the afternoon. Play around and see what ways you can devise to hide your secret messages out in the open.