Search for a tool
Homophonic Cipher

Tool to decrypt / encrypt by homophonic substitution. The homophonic number consists of replacing each letter of the alphabet by several substitutes in order to prevent cryptanalysis by frequency analysis.

Results

Homophonic Cipher -

Tag(s) : Homophonic Substitution Cipher

Share
dCode and more

dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!
A suggestion ? a feedback ? a bug ? an idea ? Write to dCode!

Please, check our dCode Discord community for help requests!
NB: for encrypted messages, test our automatic cipher identifier!

Thanks to your feedback and relevant comments, dCode has developed the best 'Homophonic Cipher' tool, so feel free to write! Thank you!

# Homophonic Cipher

## Homophonic Encoder

 Replacement Mode Take a random item Keep order (1st then 2nd, etc.)

### How to encrypt using Homophonic cipher?

The homophonic substitution cipher uses a correspondence table between the letters / characters of the plain message and one or more letters / numbers / groups of characters. Consequently, the same letter may have several possible encryption and the same message will possibly have several possible encrypted versions.

The objective aimed at by the use of several correspondences for the letters of the plain message is to prevent an attack by frequency analysis, possible on mono-alphabetic (and also polyalphabetic) substitutions. Consequently, it is clever to use a number of correspondence per letter proportional to the frequency of the letter in the language of the plain message.

Example: ABC is coded with multiple matches: A(45,96,17), B(37,60), C(05,88) as 45,60,88 or 96,60,05 or 96,37,05 etc.

In order to simplify the work of the message receiver, use groups of numbers / letters of fixed length (here 2 digits).

To maximize the security of the encryption, take a replacement at random.

### How to decrypt an Homophonic cipher?

Use the correspondence table to transform each character / group of characters in the plain message.

Example: '34,25,10 'has been coded with these multiple correspondances: A(87,34,11), B(25,80), C(10,55), the plain message is ABC

### How many correspondances to use per letters?

By taking 100 numbers, the ideal match is approximately equal to the frequency of each letter in the English language (expressed as a percentage rounded to the nearest unit)

 E T A O 12 9 8 7 7 7 6 6 6 4 4 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1

Using the pieces of a Scrabble game is a good idea.

### How to recognize an homophonic ciphertext?

Well done, the frequency of characters in a homophonically encrypted message is close to that of a perfectly random text, its index of coincidence too.

### How to decipher homophonic without correspondance table?

If the correspondances are proportional to the frequency of characters in the language of the plain message, then it is impossible to use frequency analysis or coincidence index techniques.

From a portion of known or assumed text, it is possible to guess a few correspondences of some characters but it is often insufficient to decipher the whole message.

## Source code

dCode retains ownership of the online 'Homophonic Cipher' tool source code. Except explicit open source licence (indicated CC / Creative Commons / free), any 'Homophonic Cipher' algorithm, applet or snippet (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, translator), or any 'Homophonic Cipher' function (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) and no data download, script, copy-paste, or API access for 'Homophonic Cipher' will be for free, same for offline use on PC, tablet, iPhone or Android ! dCode is free and online.

## Need Help ?

Please, check our dCode Discord community for help requests!
NB: for encrypted messages, test our automatic cipher identifier!