*** Welcome to piglix ***

Classical cipher


In cryptography, a classical cipher is a type of cipher that was used historically but now has fallen, for the most part, into disuse. In contrast to modern cryptographic algorithms, most classical ciphers can be practically computed and solved by hand. However, they are also usually very simple to break with modern technology. The term includes the simple systems used since Greek and Roman times, the elaborate Renaissance ciphers, World War II cryptography such as the Enigma machine and beyond.

In contrast, modern strong cryptography relies on new algorithms and computers developed since the 1970s.

Classical ciphers are often divided into transposition ciphers and substitution ciphers.

In a substitution cipher, letters (or groups of letters) are systematically replaced throughout the message for other letters (or groups of letters).

Another method of substitution cipher is based on a keyword. All spaces and repeated letters are removed from a word or phrase, which the encoder then uses as the start of the cipher alphabet. The end of the cipher alphabet is the rest of the alphabet in order without repeating the letters in the keyword. For example, if the keyword is CIPHER, the cipher alphabet would look like this:

The previous examples were all examples of monoalphabetic substitution ciphers, where just one cipher alphabet is used. It is also possible to have a polyalphabetic substitution cipher, where multiple cipher alphabets are used. The encoder would just make up two or more cipher alphabets using whatever techniques he or she chooses, and then encode their message, alternating what cipher alphabet is used with every letter or word. This makes the message much harder to decode because the codebreaker would have to figure out both cipher alphabets.

Another example of a polyalphabetic substitution cipher that is much more difficult to decode is the Vigenère square, an innovative encoding method. With the square, there are 26 different cipher alphabets that are used to encrypt text. Each cipher alphabet is just another rightward Caesar shift of the original alphabet. This is what a Vigenère square looks like:

To use the Vigenère square to encrypt a message, you first choose whatever keyword you want to use and then repeat it until it is the same length as the message you wish to encode. Let's say we use LEMON as the keyword. Each letter of the repeated keyword will tell you what cipher (what row) you'll use for each letter of the message to be coded. The cipher alphabet on the second row uses B for A and C for B etc. That would be cipher alphabet 'B'. Each cipher alphabet is named by the first letter in it. For example, if you have a keyword of LEMON and the message you want to encode is ATTACKATDAWN, this is what you would do:


...
Wikipedia

...