A polyalphabetic cipher—like a monoalphabetic one—encrypts each letter by a substitution that is defined by a permuted alphabet. However for each letter another alphabet is used, depending on its position in the plaintext.
Thus polyalphabetic encryption breaks the invariant properties that led to successful cryptanalysis of monoalphabetic substitutions:
This method was considered unbreakable until the 19th Century, its variants that used encryption machines even until the begin of the computer area. Nevertheless before encryption machines became available it was rarely used because it requires concentrated attention by the operator, and the ciphertext often is irreparably spoiled by encryption errors.
The key of a monoalphabetic substitution over an alphabet was a permutation of this alphabet. It has a unique description by the sequence of substituted letters in the order of the alphabet.
Example for the standard alphabet {A, ..., Z}:
a) representation by the permutation table:
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z B C D F G H I J K M N W S T U V W X Y Z P A R O L E
b) ... or representation by the permuted alphabet alone:
B C D F G H I J K M N W S T U V W X Y Z P A R O L E
... that very conveniently may be written on a cipher disk.
The term »monoalphabetic« expresses that this one (permuted) alphabet defines the complete encryption function.
Now let us write several permuted alphabets below each other and apply them in order: the first alphabet for the first plaintext letter, the second alphabet for the second letter and so on. In this way we perform a polyalphabetic substitution. If the list of alphabets is exhausted before reaching the end of the plaintext, then we restart with the first alphabet. This method is called periodic polyalphabetic substitution.
Example for the standard alphabet with 5 permuted alphabets:
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z K N Q T W Z C F I L O R U X A D G J M P S V Y B E H L O R U X A D G J M P S V Y B E H K N Q T W Z C F I A D G J M P S V Y B E H K N Q T W Z C F I L O R U X U X A D G J M P S V Y B E H K N Q T W Z C F I L O R S V Y B E H K N Q T W Z C F I L O R U X A D G J M P
Using these alphabets we encrypt:
UNIVERSITAETMAINZ = plaintext S J W X alphabet from line 1 Y N Q I alphabet from line 2 Y Y K alphabet from line 3 F Z U alphabet from line 4 E S Q alphabet from line 5 ----------------- SYYFEJNYZSWQKUQXI = ciphertext
... by four independent binary properties:
In general we take a set of alphabets (only n! different ones are possible at all for an n-letter alphabet), and use them in a certain order, periodically repeated or not. Often one takes exactly n alphabets, each one beginning with a different letter. Then one can control the alphabet choice by a keyword that is cyclically repeated, or by a long keytext that is at least as long as the plaintext.