Homophonic Cipher (Example)

Homophonic cipher is a substitution cipher where each plaintext letter can be replaced by any of different ciphertext letters.

The substitutes are proportional to the frequency of the letter.

For example, letter “A” accounts for about 8% of all letters in English, so you can assign 8 symbols to represent it.

Every time an “A” appears in the plaintext, it is replaced by one of the 8 symbols chosen at random, thus by the end of the encryption each symbol constitutes about 1% of the plaintext.

Same goes for letter “B” which accounts for 2% of all letters, 2 symbols are assigned to represent it.

Each time letter “B” appears in the plaintext either of the two symbols can be chosen, thus each symbol will also constitute about 1% of the plaintext.

And so on.

A B C D E _F G H I J K L M N O P Q R S T U V W X Y Z
8 1 3 4 13 2 2 6 7 1 1 4 2 7 8 2 1 6 6 9 3 1 2 1 2 1

How coding symbols are assigned based on their relative occurrence:

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
8 1 3 4 13 2 2 6 7 1 1 4 2 7 8 2 1 6 6 9 3 1 2 1 2 1

The main idea is to balance out the frequencies of symbols in the ciphertext.

Homophonic substitution cipher is much more difficult to break than standard substitution ciphers.

To put it simply, in the homophonic cipher, coding symbols are assigned to each plaintext letter based on their relative occurrence.

One special type of homophonic substitution cipher is a nomenclator.

Are you interested in finding out more about ciphers and codes?

The Codebreakers – The Story of Secret Writing book by David Kahn is what I would start with.

Homophonic Cipher

Basically ciphers are of three types:

  • How to solve homophonic cipher.

1) How to solve homophonic cipher

How to encrypt using homophonic cipher

First you need to generate the ciphertext alphabet.

Then replace each letter in the plaintext with one of the options in the ciphertext alphabet for that letter.

You can either alternate between options, or choose randomly each time.

Here is an example:

Plaintext: Kifanga.

Ciphertext alphabet:

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
D X S F Z E H C V I T P G A Q L K J R U O W M Y B N
9       7       3         5 0       4 6            
        2                                          
        1

To encode plaintext letter “K”, I locate it at the top row, then I replace it with the letter below it, “T”.

The second plaintext letter “I”, I could use any of these symbols “V or 3”.

I choose one of these at random, for example decide to go with “3”.

After repeating this for the entire message, my message should be encoded.

Thus, ciphertext: T3ED5H9

Note, by making a different choice at each of the letters where I had options, I could get a different ciphertext.

How to decrypt homophonic cipher

First you need to generate the ciphertext alphabet.

Then simply look for each ciphertext letter along the bottom row, and replace it with the relevant plaintext letter above.

Are you interested in learning how to break codes?

The Elementary Cryptanalysis – A Mathematical Approach book by Abraham Sinkov is what I would recommend.

Add Comment