Turingery[1] or Turing's method[2] (playfully dubbed Turingismus by Peter Ericsson, Peter Hilton and Donald Michie[3]) was a manual codebreaking method devised in July 1942[4] by the mathematician and cryptanalyst Alan Turing at the British Government Code and Cypher School at Bletchley Park during World War II.
Reading a Tunny message required firstly that the logical structure of the system was known, secondly that the periodically changed pattern of active cams on the wheels was derived, and thirdly that the starting positions of the scrambler wheels for this message—the message key—was established.
[7] The logical structure of Tunny had been worked out by William Tutte and colleagues[8] over several months ending in January 1942.
Turingery was applied to such a key stream to derive the cam settings.
[10] The logical functioning of the Tunny system was worked out well before the Bletchley Park cryptanalysts saw one of the machines—which only happened in 1945, shortly before the allied victory in Europe.
The relationship between the plaintext, ciphertext and cryptographic key is then: Similarly, for deciphering, the ciphertext was combined with the same key to give the plaintext: This produces the essential reciprocity to allow the same machine with the same settings to be used for both enciphering and deciphering.
Each of the five bits of the key for each character was generated by the relevant wheels in two parts of the machine.
In the raised position they generated a "mark", written at Bletchley Park as "×" and equivalent to a binary digit 1, and in the lowered position they generated a "space", written as "·" and equivalent to a binary digit 0.
These numbers are all co-prime with each other, giving the longest possible time before the pattern repeated.
With a total of 501 cams this equals 2501 which is approximately 10151, an astronomically large number.
The product of the rotation period of any pair of chi wheels gives numbers between 41×31=1271 and 26×23=598.
Cryptanalysis often involves finding patterns of some sort that provide a way into eliminating a range of key possibilities.
At Bletchley Park the XOR combination of the values of two adjacent letters in the key or the ciphertext was called the difference (symbolised by the Greek letter delta
was obtained as follows, where underline indicates the succeeding character: (Similarly with the plaintext, the ciphertext, and the two components of the key).
For example, as well as: It is the case that: If the plaintext is represented by P and the cipertext by Z, the following also hold true: And: The reason that differencing provided a way into Tunny was that, although the frequency distribution of characters in the ciphertext could not be distinguished from a random stream, the same was not true for a version of the ciphertext from which the chi element of the key had been removed.
Repeated characters in the plaintext were more frequent, both because of the characteristics of German (EE, TT, LL and SS are relatively common),[15] and because telegraphists frequently repeated the figures-shift and letters-shift characters[16] as their loss in an ordinary telegraph message could lead to gibberish.
To quote the General Report on Tunny:Turingery introduced the principle that the key differenced at one, now called
principle was to be the fundamental basis of nearly all statistical methods of wheel-breaking and setting.
It is also worth noting that the periodicity of the chi and psi wheels for each impulse (41 and 43 respectively for the first one) is reflected in its pattern of
[18] He had become interested in the problem of breaking Tunny from the keys that had been obtained from depths.
[3] In July, he developed the method of deriving the cam settings from a length of key.
Given the knowledge from Tutte's work of the periodicity of each of the wheels, this allowed the propagation of these values at the appropriate positions in the rest of the key.
These contained a set of columns corresponding in number to the cams for the appropriate chi wheel, and were referred to as a 'cage'.
These might either agree or disagree with previous assumptions, and a count of agreements and disagreements was made on these sheets.
As experience of the method developed, improvements were made that allowed it to be used with much shorter lengths of key than the original 500 or so characters.