ArticleslgStudy

computer science

Turingery

Turingery is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Turingery rather than just read about it. In short: Turingery or Turing's method (playfully dubbed Turingismus by Peter Ericsson, Peter Hilton and Donald Michie) was a manual codebreaking method devised in July 1942 by the mathematician and cryptanalyst Alan Turing at the British Government Code and Cypher School at Bletchley Park during World War II. It was for use in cryptanalysis of the Lorenz cipher produced by the SZ40 and SZ42 teleprinter rotor stream cipher ma…

Turingery — main illustration
Turingery — illustration

Key takeaways

  • Turingery belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Turingery to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Turingery from memory before moving on to harder problems.

Reference excerpt

Turingery or Turing's method (playfully dubbed Turingismus by Peter Ericsson, Peter Hilton and Donald Michie) was a manual codebreaking method devised in July 1942 by the mathematician and cryptanalyst Alan Turing at the British Government Code and Cypher School at Bletchley Park during World War II. It was for use in cryptanalysis of the Lorenz cipher produced by the SZ40 and SZ42 teleprinter rotor stream cipher machines, one of the Germans' Geheimschreiber (secret writer) machines. The British codenamed non-Morse traffic "Fish", and that from this machine "Tunny" (another word for the tuna fish). 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. The logical structure of Tunny had been worked out by William Tutte and colleagues over several months ending in January 1942. Deriving the message key was called "setting" at Bletchley Park, but it was the derivation of the cam patterns—which was known as "wheel breaking"—that was the target of Turingery. German operator errors in transmitting more than one message with the same key, producing a "depth", allowed the derivation of that key. Turingery was applied to such a key stream to derive the cam settings.

The SZ40 and SZ42

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 SZ machines were 12-wheel rotor cipher machines which implemented a Vernam stream cipher. They were attached in-line to standard Lorenz teleprinters. The message characters were encoded in the 5-bit International Telegraph Alphabet No. 2 (ITA2). The output ciphertext characters were generated by combining a pseudorandom character-by-character key stream with the input characters using the "exclusive or" (XOR) function, symbolised as "⊕" in mathematical notation. The relationship between the plaintext, ciphertext and cryptographic key is then:

ciphertext=plaintext⊕key Similarly, for deciphering, the ciphertext was combined with the same key to give the plaintext:

plaintext=ciphertext⊕key 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. These were termed the chi (χ) wheels, and the psi (ψ) wheels. The chi wheels all moved on one position for each character. The psi wheels also all moved together, but not after each character. Their movement was controlled by the two mu (μ) or "motor" wheels. The key stream generated by the SZ machines thus had a chi component and a psi component that were combined with the XOR function. So, the key that was combined with the plaintext for enciphering—or with the ciphertext for deciphering—can be represented as follows.

key=𝑐ℎ𝑖-key⊕𝑝𝑠𝑖-key Symbolically:

K=χ⊕ψ The twelve wheels each had a series of cams (or "pins") around them. These cams could be set in a raised or lowered position. 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. The number of cams on each wheel equalled the number of impulses needed to cause them to complete a full rotation. 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. However, if the five impulses are considered independently, the numbers are much more manageable. The product of the rotation period of any pair of chi wheels gives numbers between 41×31=1271 and 26×23=598.

Differencing 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 Δ) because XOR is the same as modulo 2 subtraction (without "borrow")—and, incidentally, modulo 2 addition (without "carry"). So, for the characters in the key (K), the difference ΔK was obtained as follows, where underline indicates the succeeding character:

ΔK=K⊕K_ (Similarly with the plaintext, the ciphertext, and the two components of the key). The relationship amongst them applies when they are differenced. For example, as well as:

K=χ⊕ψ It is the case that:

ΔK=Δχ⊕Δψ If the plaintext is represented by P and the cipertext by Z, the following also hold true:

ΔZ=ΔP⊕Δχ⊕Δψ And:

ΔP=ΔZ⊕Δχ⊕Δψ 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. This is because, where the plaintext contained a repeated character and the psi wheels did not move on, the differenced psi character (Δψ) would be the null character ("·····" or 00000), or, in Bletchley Park terminology, "/". When XOR-ed with any character, this null character has no effect, so in these circumstances, Δχ=ΔK. Repeated characters in the plaintext were more frequent, both because of the characteristics of German (EE, TT, LL and SS are relatively common), and because telegraphists frequently repeated the figures-shift and letters-shift characters 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 ΔK, could yield information unobtainable from ordinary key. This Δ principle was to be the fundamental basis of nearly all statistical methods of wheel-breaking and setting.

Bit-level differencing As well as applying differencing to the full 5-bit characters of the ITA2 code, it was also applied to the individual impulses (bits). So, for the first impulse, that was enciphered by wheels χ1 and ψ1, differenced at one:

ΔK1=K1⊕K1_ And for the second impulse:

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Turingery

Start with the simplest possible case. Write down what Turingery claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Turingery before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Turingery ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Turingery

In research
Turingery appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Turingery in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Turingery is common in secondary-school and first-year university syllabi. It links to neighbouring topics Alan Turing, Bletchley Park, Cryptographic attacks, so understanding it makes those chapters shorter.
In everyday life
Look for Turingery outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Turingery” →

How to study Turingery in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Turingery means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Turingery out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Turingery in simple terms?

Turingery or Turing's method (playfully dubbed Turingismus by Peter Ericsson, Peter Hilton and Donald Michie) was a manual codebreaking method devised in July 1942 by the mathematician and cryptanalyst Alan Turing at the British Government Code and Cypher School at Bletchley Park during World War I…

Why does Turingery matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Turingery?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Turingery.

Tags

  • Alan Turing
  • Bletchley Park
  • Cryptographic attacks

Keep exploring