Tool to decrypt monoalphabetical substitution and find each letter of a substituted message with a deranged alphabet (monoalphabetic cipher).
Mono-alphabetic Substitution - dCode
Tag(s) : Substitution Cipher
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!
An alphabetic substitution is a substitution cipher where the letters of the alphabet are replaced by others according to a 1-1 correspondence (a plain letter always corresponds to the same cipher letter).
The substitution is said to be monoalphabetic because it uses only one alphabet, this alphabet is said to be disordered.
The monoalphabetical substitution consists in using a mixed alphabet (with the letters in an unusual order) and replacing the letters of the alphabet normal by it.
Example: BYKWASLFXOCZTDHJUMIGPVENQR is a totally random alphabet with the 26 letters of the Latin alphabet.
To understand, write the alphabet over the classic alphabet:
Plain alphabet | ABCDEFGHIJKLMNOPQRSTUVWXYZ |
---|---|
Substitution alphabet | BYKWASLFXOCZTDHJUMIGPVENQR |
The substitution involves a replacement in the plaintext of all the letters of the first row with the letters associated with the second row.
Example: All A become N, all the B remain B, all the C become A, etc.
Example: With this substitution DCODE is encrypted as WKHWA.
Any deranged alphabet can be used to create a mono alphabetic substitution provided it respects the criterion of an alphabet: not containing the same letter several times.
The K1, K2, K3, and K4 classifications are used by the ACA to describe the use of keywords in encryption alphabets.
— K1: The key is inserted into the substitution alphabet, usually at the beginning and then the rest of the letters follow in alphabetical order.
Example: Default CODEABFGHIJKLMNPQRSTUVWXYZ but an offset is possible XYZCODEABFGHIJKLMNPQRSTUVW
— K2: The key is inserted into the substitution (reciprocal) coded alphabet ⇅.
— K3: The key is used in both plaintext and coded alphabets.
— K4: Two different keys are used: one for the substitution alphabet and another for the coded alphabet.
Decryption requires knowing the alphabet mixed used and the inverse substitution encryption.
Substitution Alphabet | NBAJYFOWLZMPXIKUVCDEGRQSTH |
---|---|
Plain Alphabet | ABCDEFGHIJKLMNOPQRSTUVWXYZ |
The substitution involves replacing in the ciphertext all the letters of the first row with the letters associated with the second row.
Example: The encrypted message JAKJY has for plain message DCODE.
The ciphered message has an index of coincidence identical to the language of the plain text.
English speakers call this encryption aristocrat (if there are spaces) or patristocrat (if there are no spaces between words).
The MCMC technique (used by dCode) is one of the most effective for finding the most probable plain text and proposing a replacement alphabet.
dCode additionally adds an interactive tool to manually decrypt substitution-encrypted messages.
Another possibility, the known plaintext attack that makes possible to deduce some letters of the alphabet via the knowledge or the preliminary guess of certain portions of the plain text.
Example: The most common alphabets used for substitutions are: QWERTYUIOPASDFGHJKLZXCVBNM
MNBVCXZLKJHGFDSAPOIUYTREWQ
QAZWSXEDCRFVTGBYHNUJMIKOLP
AZERTYUIOPQSDFGHJKLMWXCVBN
NBVCXWMLKJHGFDSQPOIUYTREZA
AQWZSXEDCRFVTGBYHNUJIKOLPM
ZYXWVUTSRQPONMLKJIHGFEDCBA
AEIOUYBCDFGHJKLMNPQRSTVWXZ'
MCMC (Markov Chain Monte Carlo) is the name given to a statistical method that applies very well to mono-alphabetical substitutions.
1 - Initialization: use a random substitution alphabet (but it is possible to carry out an analysis of letter frequencies to obtain a first plain alphabet - encrypted alphabet correspondence table).
2 - Evaluation: calculation of the probability that the current substitution alphabet produces plain text (score generally based on the frequencies of appearance of bigrams in the target language).
3 - Modification of the alphabet: randomly exchange certain plain letter-cipher letter correspondences
4 - Repeat steps 2 and 3 as long as the plausibility score of the message obtained increases and the alphabet selected offers the most probable plain message.
Source: here Diaconis, Persi. (2009). The Markov Chain Monte Carlo Revolution. Bulletin of the American Mathematical Society. 46. 179-205. 10.1090/S0273-0979-08-01238-X.
First, some substitution use specific alphabets, such as Atbash that takes the alphabet backwards ZYXWVUTSRQPONMLKJIHGFEDCBA or the Caesar cipher which uses a shifted alphabet DEFGHIJKLMNOPQRSTUVWXYZABC that is shifted by 3.
There are also substitutions that use several alphabets, alphabet that changes depending on an algorithm defined by encryption (e.g. Vigenere uses 26 alphabets).
In game-play journals, substitution games / exercises are often called cryptograms.
dCode retains ownership of the "Mono-alphabetic Substitution" source code. Except explicit open source licence (indicated Creative Commons / free), the "Mono-alphabetic Substitution" algorithm, the applet or snippet (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or the "Mono-alphabetic Substitution" functions (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) and all data download, script, or API access for "Mono-alphabetic Substitution" are not public, same for offline use on PC, mobile, tablet, iPhone or Android app!
Reminder : dCode is free to use.
The copy-paste of the page "Mono-alphabetic Substitution" or any of its results, is allowed (even for commercial purposes) as long as you credit dCode!
Exporting results as a .csv or .txt file is free by clicking on the export icon
Cite as source (bibliography):
Mono-alphabetic Substitution on dCode.fr [online website], retrieved on 2024-12-02,