Codes and ciphers. The difference between them is that ciphers encode letter by letter, codes encode word by word.
I’ve been reading the excellent book Dunin and Schmeh “Codebreaking – a practical guide”, which put me in mind of two types of ciphers that I made up when I was a youth. Neither of them is in that book, I’m not sure whether to be surprised by this or not. On the one hand thousands of other people must have come up with my ciphers, and on the other hand there must be hundreds of thousands of types of ciphers.
I’d like to know what they are called.
The first I came up with is a simple way of flattening the frequency distribution of letters in a cipher.
In its simplest form, the plaintext aaaaaaaa
becomes ciphertext bcdefghi
.
Try this one uchyt cfqsl zwlqf dnivk etpum gotfg gfjyf
The second cipher was intended to be easier to solve by hand then by computer.
In it’s simplest form, the plaintext aaaaaaaaaaaaaaaaaaaa
becomes zbzzbbzzbbzbzzbzbzbb
using a random rise or fall.
For decoding, go up and down one from the ciphertext, giving
acaaccaaccacaacacacc
yayyaayyaayayyayayaa
And then by eye, thread a path up and down through the two lines of decoded text for a result with sensible words and grammar to get, in this case, aaaaaaaaaaaaaaaaaaaa
.
Try this one, the plaintext is a quote from the uncyclopedia xppjh fdtbq flpru eznpt tgnqs ifjql fbuvi hbijr bszod ngfbt sfqoj mehzo cfmjb zbxdz ufoot sdmxc zftmw dht
It’s generally true that the more options there are for the “key”, the more difficult it is to solve a cipher. For a caesar cipher (a constant number added to each letter), the key is between 1 and 25. For a simple substitution cipher, the key is between 1 and ~325. The two ciphers above have no key, or to be more specific the key is 1. That makes them even easier to solve than a caesar cipher.
For serious coding puposes to hide content, we add a long key to make it more difficult to crack.
So, what I’m asking is:
a) What is the name of a cipher that is designed to use earlier encoded material to decript the latest encoded letter?
b) What is the name of a cipher that is designed to have multiple decriptions into plaintext, with an ambiguity that is only resolved by use of a dictionary?