Codificazione da sostituzione Codificação por substituição Chiffrierung durch Substitution Chiffrement par substitution Cifrado de sustitución

Substitution cipher

Substitution cipher involves replacing one or more entities (generally letters) in a message with one or more other entities.

There are several types of substitution cryptosystems:

  • Monoalphabetic substitution involves replacing each letter in the message with another letter of the alphabet
  • Polyalphabetic substitution involves using a series of monoalphabetic ciphers that are periodicially reused
  • Homophonic substitution makes it possible to have each letter of the plaintext message correspond to a possible group of other characters
  • Polygraphic substitution involves replacing a group of characters in the message with another group of characters

Caesar cipher

This encryption code is one of the oldest, in that Jules Caesar used it. The encoding principle is based on the addition of a constant value to all of the message's characters, or more precisely to their ASCII code (for a "computer" version of this encoding).

It is simply a question of shifting all the values of the message's characters by a certain number of positions, that is, of substituting each letter with another if you like. For example, by shifting the message "COMMENT CA MARCHE" by 3 positions, we obtain "FRPPHQW FD PDUFKH". When adding value gives a letter after Z, we can simply continue by starting from A, which means we carry out a modulus 26.
As an example, in the film 2001: A Space Odyssey, the computer was named HAL. This nickname is in fact IBM shifted 1 position down...

The character corresponding to the value added to the message for encryption is called the key. In our case the key is C, since it is the 3rd letter of the alphabet.

This encryption system is indeed easy to implement but its disadvantage is that it is totally symmetric, which means that a simple substraction can be performed to find out the initial message. A basic method may involve a simple substraction of the numbers 1 to 26 to see whether one of these numbers gives an intelligible message.
A more advanced method involves calculating how often letters appear in the encoded message (this becomes easier the longer the message is). Depending on the language, some letters are used more frequently than others (in French, for example, the letter E is used the most), so the letter appearing the most often in a text encrypted using the Caesar cipher will most likely correspond to the letter E, and a simple substraction gives the encryption key...

ROT13 encryption

In the specific case of a Caesar cipher where the encryption key is N (13th letter of the alphabet), this is referred to as ROT13 (the number 13, one-half of 26, was chosen to be able to easily encrypt and decrypt textual messages).

Last update on Thursday October 16, 2008 02:43:18 PM.This document entitled « Substitution cipher » from Kioskea (en.kioskea.net) is made available under the Creative Commons license. You can copy, modify copies of this page, under the conditions stipulated by the licence, as this note appears clearly.

Best answers for « Substitution cipher » in :
Transposition ciphers Show Transposition encryption methods involve rearranging data to be encrypted to make them incomprehensible. This may mean, for example, geometrically re-ordering data to make them visually unusable. The Assyrian technique The Assyrian cipher...
The Vigenère cipher Show The Vigenère cipher The Vigenère cipher is a symmetric cryptosystem, which means it uses the same key for encryption and decryption. The Vigenère cipher closely resembles the Caesar cipher, with the exception that it uses a longer key to offset the...
Substitute the sound track of a video Show Substitute the soundtrack of a video You have a video and you want to replace the soundtrack with one of your creation for any personal reasons : Make l use the Windows Movie Maker (it comes with Windows, if this is not the case you...
Tips and tricks ShowTips and tricks Substitution Display Remove Miscellaneous Substitution Substitute "foo" with "bar" on each line Only the 1st occurrence sed 's / foo / bar /' For the 3rd case only sed 's/foo/bar/3' All occurrences sed...
Substitution ShowSubstitution Basic Substitution Simple Global Targetted Conditioned Substitution Simplified Advanced Bloc Advanced The substitute command:[ s. ]changes all occurrences of the regular expression into a new value. Basic...
Go online without downloading MSN Messenger ShowGo online without downloading MSN Messenger It is now possible for users who cannot download MSN Messenger or who want to use it from their mobile device, to get connected online through a browser-based messaging program. The...
Download Files Cipher ShowDescription Designed by FC Soft Groups, the application is very simple and easy to use. It is based on protecting your private data. Files Cipher has an intuitive interface that even a novice would be able to use it without difficulties. It allows...
Download Texter ShowTexter allows you to spare time by reducing keystrokes when typing. The application substitutes and/or extends an abbreviation; that depends on your own configuration. Contrary to similar programs on Windows, Texter works with all the applications...
Cryptography ShowWhy cryptography? Mankind has always felt a need to disguise information, even long before the first computers and calculating machines existed. Since it was created, the Internet has evolved to such a point that it has become an essential...