Text length:

Shift by:

Number of bars:

Author: Jean Michel Polak

Autocorrelation compares a text with moved copies of the same text. In each case the matching character is determined. The number of hits per shift is then displayed in the diagram. You can choose between the German and English alphabet. Only the letters of the selected alphabet are analyzed. The number of shifts depends on the length of the text.

You want to analyse the sentence 'Hello, how are you?' with a shift of 2. Characters not belonging to the alphabet such as '?', comma and spaces are filtered out.

			Orginaltext:       Hello, how are you doing?
			Modified:         Hellohowareyoudoing
			Shifted by 9:              Hellohowareyoudoing
The shift by 9 therefore has 2 matches.


Chart.js (used for diagram)

Autocorrelation is based on the assumption that, on the one hand, certain characters occur repeatedly in plaintext, and on the other hand, these characters are occasionally encoded by the same letters of the keyword. This leads to the assumption that the probability of matches between ciphertext and shifted ciphertext would have to be the highest if the key length were shifted by a multiple of the key length.

For example, the Vigenère cipher can be cracked. The periodically recurring maximum values of the number of matching characters, indicate the key length of the Vigenère cipher.

Autocorrelation analysis is more efficient and much more illustrative than the Friedman or Kasiski test. It is versatile and is also used in signal processing.

Since the autocorrelation is a complex calculation, it is recommended that larger texts be processed with a locally installed program like CrypTool2 (