Search for a tool
Multiplicative Cipher

Tool to decrypt/encrypt with multiplicative encryption, a substitution cipher based on a multiplication operation.

Results

Multiplicative Cipher -

Tag(s) : Substitution Cipher

Share
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!


Feedback and suggestions are welcome so that dCode offers the best 'Multiplicative Cipher' tool for free! Thank you!

Multiplicative Cipher

Multiplicative Cipher Decoder

 



Multiplicative Encoder

 



See also: Affine Cipher

Answers to Questions (FAQ)

What is Multiplicative Cipher? (Definition)

The Multiplicative Cipher (or Decimation Cipher) is an Affine cipher (ax+b) with the value b null (equal to 0), so a multiplication by $ a $.

How to encrypt using Multiplicative cipher?

Multiplicative encryption uses a key $ k $ (an integer) and an alphabet.

Example: Encrypt DCODE with the key $ k = 17 $ and the 26-letter alphabet: ABCDEFGHIJKLMNOPQRSTUVWXYZ

Each letter is associated with its rank $ c $ in the alphabet (starting from 0).

Example: D=3, C=2, O=14, D=3, E=4

For each character of the plain message, apply the following calculation:

$$ c \times k \mod 26 $$

($ 26 $ being the number of letters in the alphabet)

The number obtained indicates the rank in the alphabet of the corresponding numbered letter.

Example: D = 3, so $ 3 \times 17 \mod 26 \equiv 25 $ and the letter at rank 25 is Z. So on for each letter, the final encrypted message is ZIEZQ.

How to decrypt Multiplicative cipher?

Decryption can be done in 2 ways:

— Mathematically, calculate the modular inverse $ k^{-1} $ of the key modulo 26 and apply the calculation for each letter:

$$ c \times k^{-1} \mod 26 $$

Example: The key $ 17 $ has the inverse modulo 26 of the value $ 23 $ so Z (index 25) becomes $ 25 \times 23 \mod 26 \equiv 3 $ and 3 corresponds to D in the alphabet.

— By substitution, in fact, during encryption each letter is associated with only one other, by calculating all the possible associations (by encrypting the 26 letters of the alphabet) then it is possible to deduce an alphabet substitution that will serve as a decryption table.

What are the possible key values?

For the encryption to be reversible (so that the message can be decrypted), the key must be a coprime number with 26 (where 26 is the number of letters of the alphabet).

So there is an infinite number of possible keys, but many will give identical messages, because for a $ k $ key, then the $ k + 26 $ key gives an identical cipher.

How to recognize a Multiplicative ciphertext? (Identification)

The message is an alphabetical substitution, the frequency analysis should make it possible to find the most common letters.

The index of coincidence is unchanged from plain text.

The letter A remains unchanged ans id always encoded A

How to decipher Multiplicative cipher without key? (Attacks)

For a given alphabet, there are only a few possible keys.

The 26-letter Latin alphabet allows only 11 keys: 3, 5, 7, 9, 11, 15, 17, 19, 21, 23 and 25 (these are coprime numbers with 26).

KeySubstitution Alphabet
3ADGJMPSVYBEHKNQTWZCFILORUX
5AFKPUZEJOTYDINSXCHMRWBGLQV
7AHOVCJQXELSZGNUBIPWDKRYFMT
9AJSBKTCLUDMVENWFOXGPYHQZIR
11ALWHSDOZKVGRCNYJUFQBMXITEP
15APETIXMBQFUJYNCRGVKZODSHWL
17ARIZQHYPGXOFWNEVMDULCTKBSJ
19ATMFYRKDWPIBUNGZSLEXQJCVOH
21AVQLGBWRMHCXSNIDYTOJEZUPKF
23AXUROLIFCZWTQNKHEBYVSPMJGD
25AZYXWVUTSRQPONMLKJIHGFEDCB

There are other numbers co-prime with 26 (which are greater than 26) but they give alphabets identical to those above.

What are the variants of the Multiplicative cipher?

The multiplicative cipher is a simplification of the Affine cipher.

The multiplicative cipher has little interest, but it is often used for learning computer science and ciphers.

Source code

dCode retains ownership of the "Multiplicative Cipher" source code. Except explicit open source licence (indicated Creative Commons / free), the "Multiplicative Cipher" algorithm, the applet or snippet (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or the "Multiplicative Cipher" 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 "Multiplicative Cipher" are not public, same for offline use on PC, mobile, tablet, iPhone or Android app!
Reminder : dCode is free to use.

Cite dCode

The copy-paste of the page "Multiplicative Cipher" 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):
Multiplicative Cipher on dCode.fr [online website], retrieved on 2024-10-05, https://www.dcode.fr/multiplicative-cipher

Need Help ?

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

Questions / Comments

Feedback and suggestions are welcome so that dCode offers the best 'Multiplicative Cipher' tool for free! Thank you!


https://www.dcode.fr/multiplicative-cipher
© 2024 dCode — El 'kit de herramientas' definitivo para resolver todos los juegos/acertijos/geocaching/CTF.
 
Feedback