A cipher disk is a circular slide rule for letters: turn one alphabet against another and every letter is added to the shift. Turn it as you go and the code gets much harder; slide a table of letter frequencies along the ciphertext and a simple shift falls apart.
Drag the inner disk round, or Tab to it and use the arrow keys, or type the letter that A should become. Leave "every" at 0 for a plain shift.
A shift is an addition. Number the letters 0 to 25: a shift of k adds k to each, going round past Z, which is arithmetic mod 26. Julius Caesar, says Suetonius, shifted by three. The disk does the sum, as a circular slide rule adds logarithms.
Turning it. Leon Battista Alberti described his disk in 1467: a fixed ring of capitals and a movable ring of small letters. His new idea was to turn the inner ring every few words, so that one letter is enciphered several ways. That is the first polyalphabetic cipher in Europe, and it defeats counting letters.
Try it. Encode "AAAAAA" with the disk turned every 2 letters: the A's no longer look alike. Set the same start and turns, tick decode, and paste the result back to get the message.
For each letter of the message, set the slide by the next letter of the key, so that the key letter lies under A. Read the cipher letter under the message letter. The key word repeats as long as the message runs.
Vigenère. Giovan Battista Bellaso published this cipher in 1553; it took the name of Blaise de Vigenère, who described a stronger one in 1586. Each letter of the key is a different Caesar shift, so the cipher is a disk turned to a new setting for every letter.
The slide. French officers did it with a Saint-Cyr slide, named after the military school: a strip of card with the alphabet on it twice, slid under a fixed alphabet. It is a straight slide rule for addition mod 26.
Broken. It was called le chiffre indéchiffrable for three centuries. Charles Babbage broke it in the 1850s and Friedrich Kasiski published a method in 1863: repeated fragments in the ciphertext give away the length of the key, and then each letter of the key is only a shift, broken as on the next plate.
The amber bars are how often each letter comes in the ciphertext; the blue bars are English. Slide English along until its tall E, T, A and O stand under tall amber bars. The text below the picture is the ciphertext shifted back.
Al-Kindi. In the ninth century al-Kindi wrote the first known account of frequency analysis: count the letters of the secret text, count them in ordinary text, and match the commonest to the commonest. A shift keeps the shape of the frequency chart and only moves it along.
The misfit. For each of the 26 shifts the page computes chi-square, the sum of (observed − expected)² / expected over the letters. The true shift is usually far below the rest once there are a hundred letters or so; with a dozen letters it may not be.
Why the disk helps. Turn the disk as you go, or use a key word, and each shift covers only some of the letters, so the chart flattens. Kasiski's step is to split the text by position in the key and slide each part separately.