Glossary

Kasiski examination

Kasiski testKasiski method

The Kasiski examination estimates the period of a repeating-key polyalphabetic cipher from distances between repeated ciphertext sequences.

Definition

The Kasiski examination is a classical method for attacking Vigenère and related ciphers with a repeating key. When the same plaintext sequence appears at positions encrypted by the same key positions, it can produce the same ciphertext sequence. The distance between those occurrences is then often a multiple of the key length.

How it works

Find repeated ciphertext groups, commonly three or more characters, record the distances between their positions, and factor those distances. Factors shared by several distances—or their greatest common divisor—become candidate key lengths. For each candidate, split the ciphertext into columns and test their frequency profiles.

Limitations

Repetitions may be accidental, short texts may contain too few, and the strongest factor may be a divisor or multiple of the actual period. The method assumes a repeated key and is not a general attack on modern encryption. Index of Coincidence and frequency analysis are used to confirm the candidates.

Frequently asked questions

Three-character repeats are less likely to occur by chance than single letters or pairs while still appearing often enough in longer ciphertexts.

Not directly. It estimates candidate key lengths; frequency analysis of the resulting columns is then used to infer key characters.

No. Short messages, long keys, few repeated plaintext fragments, or a nonrepeating key can leave insufficient evidence.

See also