Better to know some... than all 


Polyalphabetic substitutions and Vigen'ere ciphersA simple substitution cipher involves a single mapping of the plaintext alphabet onto ciphertext characters. A more complex alternative is to use different substitution mappings (called multiple alphabets) on various portions of the plaintext. This results in socalled polyalphabetic substitution. In the simplest case, the different alphabets are used sequentially and then repeated, so the position of each plaintext character in the source string determines which mapping is applied to it. Under different alphabets, the same plaintext character is thus encrypted to different ciphertext characters, precluding simple frequency analysis as per monoalphabetic substitution. Definition: A simple Vigen'ere cipher of period t, over an scharacter alphabet, involves a tcharacter key k,_{1} k_{2} …. k_{t}. The mapping of plaintext m = m_{1}m_{2}m_{3}….. to ciphertext c = c_{1}c_{2}c_{3}….. is defined on individual characters by c_{i} = m_{i}+k_{i} mod s, where subscript i in k_{i} is taken modulo t (the key is reused). The simple Vigen'ere uses t shift ciphers, defined by t shift values k_{i}, each specifying one of s (monoalphabetic) substitutions; k_{i} is used on the characters in position i, i + s, i + 2s,…. In general, each of the t substitutions is different; this is referred to as using t alphabets rather than a single substitution mapping. The shift cipher is a simple Vigen'ere with period t = 1. Beaufort variants of Vigen'ere: Compared to the simple Vigen'ere mapping c_{i} = m_{i} + k_{i} mod s, the Beaufort cipher has c_{i} = k_{i} m_{i} mod s, and is its own inverse. The variant Beaufort has encryption mapping c_{i} = m_{i} k_{i} mod s. Compound Vigen'ere: The compound Vigen'ere has encryption mapping c_{i} = m_{i} + (k^{1}_{i} + k^{2}_{i} +…+ k^{r}_{i}) mod s, where in general the keys k^{j} , 1 <= j <= r, have distinct periods t_{j} , and the subscript i in k_{i}^{j} , indicating the ith character of k^{j} , is taken modulo t_{j} . This corresponds to the sequential application of r simple Vigen'eres, and is equivalent to a simple Vigen'ere of period lcm(t_{1},…,t_{r}). Fact: A runningkey cipher can be strengthened by successively enciphering plaintext under two or more distinct running keys. For typical English plaintext and running keys, it can be shown that iterating four such encipherments appears unbreakable. An autokey cipher is a cipher wherein the plaintext itself serves as the key (typically subsequent to the use of an initial priming key). Autokey Vigen'ere: In a runningkey Vigen'ere with an scharacter alphabet, define a priming key k = k_{1}k_{2} …. k_{t}. Plaintext characters mi are encrypted as c_{i} = m_{i} + k_{i} mod s for 1 <= i <= t (simplest case: t = 1). For i > t, c_{i} = (m_{i} + m_{it}) mod s. An alternative involving more keying material is to replace the simple shift by a full Vigen'ere with permutations e_{i}, 1 <= i <= s, defined by the key k_{i} or character m_{i}: for 1 <= i <= t, c_{i} = e_{ki}(m_{i}), and for i > t, c_{i} = e_{mit}(m_{i}). An alternative to Example is to autokey a cipher using the resulting ciphertext as the key: for example, for i > t, c_{i} = (m_{i} + c_{it}) mod s. This, however, is far less desirable, as it provides an eavesdropping cryptanalyst the key itself. Vernam viewed as a Vigen'ere: Consider a simple Vigen'ere defined by c_{i} = m_{i} +k_{i} mod s. If the keystream is truly random and independent  as long as the plaintext and never repeated  this yields the unconditionally secure Vernam cipher, generalized from a binary to an arbitrary alphabet. 