# Code-Breaking: Encryptions and ciphers

The ADFGVX cipher was used by the German Army during World War I. The cipher got its name from that it only uses characters ADFG(V)X. These letters were chosen because they were very different in Morse code, and therefore less likely to be misinterpreted by operators.

## Atbash cipher

Atbash is a very basic substitution cipher, originally used to encrypt the Hebrew alphabet. It can however be used with any alphabet. Atbash maps the first letter to the last letter, the second letter to the second last letter, etc. This means A=Z, B=Y, etc for the English alphabet.

## Bifid cipher

The Bifid cipher was invented around 1901 by Félix Delastelle. It places the characters of the English alphabet in a 5x5 square (where I and J share position). A message is converted to its coordinates (pairs of numbers), the numbers are then permuted and converted back to letters again. The key to this crypto is the 5x5 square.

## Caesar cipher / ROT13

The Caesar cipher is a very basic substitution cipher. It is also known as a shift cipher or Caesar shift. In this cipher, each letter is replaced by another letter some fixed number of positions down the alphabet. For example with a right shift of 3, the letter A would be replaced by D. The cipher is named after Julius Caesar, who used it in his private communications. A ROT13 cipher is simply a shift cipher with a shift of 13.

## Four-square cipher

The four-square cipher was invented by Félix Delastelle. It uses four 5x5 squares (where I and J share position, or Q is omitted). Generally, the upper left square and the lower-right square contain the standard alphabet, while the other two act as the key. It translates letter two-by-two (digraphs) by matching them with letters in the key squares. Because is using digraphs, it is much less susceptible to frequency analysis than monographic substitution ciphers.

## Gronsfeld cipher

The Gronsfeld Cipher is similar to a Vigenère cipher, but using numbers instead of letters in the key. It is basically using a series of shift ciphers (Caesar ciphers) based on the digits of the key. It is a form of polyalphabetic substitution.

## Playfair cipher

The Playfair cipher, or Wheatstone-Playfair cipher, was invented in 1854 by Charles Wheatstone, but got its name from Lord Playfair for promoting its use. It uses a 5x5 square for the key (where I and J share position). It translates letter two-by-two (digraphs) by matching them with letters in the square. Because is using digraphs, it is much less susceptible to frequency analysis than monographic substitution ciphers.

## Rail Fence (Zig Zag) cipher

The rain fence cipher, also called zig zag cipher, is a simple transposition cipher. The letters are written diagonally in a zig zag pattern, and then read off in rows. The only thing that can be varied is the number of rows, and because of that the cipher is very weak.

## Trifid cipher

The Trifid cipher was invented around 1902 by Félix Delastelle. It extends the earlier Bifid cipher by utilizing trigrams (groups of three letters) to further fractionate and transpose the text. It requires a 27-letter alphabet, which could be for instance the English alphabet and a plus sign as the 27th letter.

## Substitution cipher / cryptogram

Cryptograms, or monoalphabetic substitution ciphers as they are also called, is one of the simplest encryption methods. It has a substitution alphabet, which is used to translate each letter. The Atbash cipher is an example of a substitution cipher, where the substitution alphabet is simply a reverse-order alphabet.

## Vigenère cipher

The Vigenère cipher was invented during the 16th century and was considered unbreakable for hundreds of years. It is basically using a series of shift ciphers (Caesar ciphers) based on the letters of the key. It is a form of polyalphabetic substitution.

## Columnar transposition cipher

In a columnar transposition cipher, the message is written out in rows of fixed length. It is then read out column by column. The order of the columns is determined by a key. Often the message is padded at the end with random characters to fill out the incomplete columns, but there are variants which use different length columns.

## Double transposition cipher

The double transposition cipher is a more secure variant of the columnar transposition cipher. It is basically a columnar transposition cipher applied twice. It can use the same key for both transposition or different keys.

## Enigma machine

The Enigma machines were used during World War II by the Germans to protect their communications. It came in different models, but they all built on the same principles. It had a keyboard, rotors, a plugboard, a reflector and a lampboard to show the results. The Enigma machine encryption was broken during World War II by military intelligence, mainly through operator mistakes and Allied capture of key tables.

## DES cryptosystem

The Data Encryption Standard (DES) was developed in the early 1970s by IBM. After consultation with the National Security Agency (NSA), it was strengthened against differential cryptoanalysis, but weakened against brute-force attacks. Controversies arose around the relatively short key length of 56-bits, and the involvement of the NSA, but it quickly spread as a worldwide standard. A strengthened version, called 3DES (tripple DES) was later developed that basically utilizes DES three times.

## AES/Rijndael cryptosystem

The Advanced Encryption Algorithm (AES) is also known by its original name, Rijndael (from the inventors). It has replaced DES as standard for encryption worldwide. It is available in versions with different key length, 128, 192 and 256 bits.

## RSA cryptosystem

The RSA crypto is one of the first public-key cryptosystems. The encryption key is public, while the decryption key is secret. The RSA security is based on the practical difficulty of "the factoring problem". It is constructed using two large prime numbers and only by knowing them can the decryption key be calculated.