# Programming Colossus (Cracking Enigma)

**URL:** <https://boards.straightdope.com/t/programming-colossus-cracking-enigma/178271>\
**Category:** Factual Questions\
**Created:** [May 29, 2003, 2:45pm UTC](https://boards.straightdope.com/t/programming-colossus-cracking-enigma/178271 "2003-05-29T14:45:36Z")\
**Posts on this page:** 16\
**Page:** 2

<div class="post-metadata">

**Author:** ![sailor](https://avatars.discourse-cdn.com/v4/letter/s/a587f6/32.png) [@sailor](https://boards.straightdope.com/u/sailor)\
**Post date:** [July 5, 2003, 12:12pm UTC](https://boards.straightdope.com/t/programming-colossus-cracking-enigma/178271/21 "2003-07-05T12:12:24Z")

</div>

I forgot to include [the link](http://www.codesandciphers.org.uk/enigma/enigma3.htm) where you can see a facsimile of a code book and an explanation of how it was used. The first column is the day of the month. The second column is the rotor order. The third column is the ring settings. The fourth column is the plugboard settings. There is a fifth column called Kenngruppe which was not necessarily used as that page explains.

In [this page](http://home.earthlink.net/~nbrass1/1enigma.htm) you can also see an example of how the Enigma was used in practice.

---

<div class="post-metadata">

**Author:** ![KidCharlemagne](https://avatars.discourse-cdn.com/v4/letter/k/ed8c4c/32.png) [@KidCharlemagne](https://boards.straightdope.com/u/KidCharlemagne)\
**Post date:** [July 5, 2003, 3:21pm UTC](https://boards.straightdope.com/t/programming-colossus-cracking-enigma/178271/22 "2003-07-05T15:21:21Z")

</div>

My understanding is that Colossus wasn’t pure brute force but was set to start with likely combinations based on cribs, link chains (which was the first undoing of the Enigma - I think we have those two Polish mathematicians to thank for that one), and other intelligence.

I have to second “The Code Book” by Simon Singh. That’s the best non-fiction read I’ve had in years.

---

<div class="post-metadata">

**Author:** ![PastTense](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/pasttense/32/14550_2.png) [@PastTense](https://boards.straightdope.com/u/PastTense)\
**Post date:** [January 18, 2024, 11:52pm UTC](https://boards.straightdope.com/t/programming-colossus-cracking-enigma/178271/23 "2024-01-18T23:52:02Z")

</div>

For those of you still interested in Colossus:

> **[80 years later, GCHQ releases new images of Nazi code-breaking computer](https://arstechnica.com/gadgets/2024/01/new-images-of-secret-nazi-busting-computer-emerge-on-80th-anniversary/)**
>
> GCHQ unveils new docs on Colossus, a 1943 marvel that let allies "read Hitler's mind."

The documents are at:

> **[GCHQ Celebrates 80 Years of Colossus](https://www.gchq.gov.uk/news/colossus-80)**
>
> Today GCHQ celebrates 80 years of Colossus, the code-breaking computer that played a pivotal role in WWII.

---

<div class="post-metadata">

**Author:** ![JacobSwan](https://avatars.discourse-cdn.com/v4/letter/j/a6a055/32.png) [@JacobSwan](https://boards.straightdope.com/u/JacobSwan)\
**Post date:** [January 19, 2024, 10:17am UTC](https://boards.straightdope.com/t/programming-colossus-cracking-enigma/178271/24 "2024-01-19T10:17:04Z")

</div>

These days only a few original Enigmas exist and they change hands for £150,000-£250,000. Mick Jagger is a famous owner and lent his to the makers of ‘Enigma’ and got a thanks in the credits.

After the war there were hundreds if not thousands of the things available cheap through army surplus stores and scrap merchants.

There is a conspiracy that the British Government encouraged various countries to buy up and use these, without mentioning that they knew how to crack them. But there’s little evidence to prove that. The more likely truth is that governments just bought them cheap. Some of them were still in use up until the 80’s.

---

<div class="post-metadata">

**Author:** ![bob\_2](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/bob_2/32/3341_2.png) [@bob\_2](https://boards.straightdope.com/u/bob_2)\
**Post date:** [January 19, 2024, 12:50pm UTC](https://boards.straightdope.com/t/programming-colossus-cracking-enigma/178271/25 "2024-01-19T12:50:46Z")

</div>

An actual photo of Collusus

[![](https://ichef.bbci.co.uk/news/976/mcs/media/images/74658000/jpg/_74658228_colossusoperators.jpg) ](https://ichef.bbci.co.uk/news/976/mcs/media/images/74658000/jpg/_74658228_colossusoperators.jpg)

Ms Mortimer does not have fond memories of her time working with Colossus.

“We worked terribly long hours in not terribly pleasant working surroundings,” she said. “We stood up all the time to operate the machine, so it was terribly tiring.”

---

<div class="post-metadata">

**Author:** ![Schnitte](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/schnitte/32/9033_2.png) [@Schnitte](https://boards.straightdope.com/u/Schnitte)\
**Post date:** [January 19, 2024, 1:40pm UTC](https://boards.straightdope.com/t/programming-colossus-cracking-enigma/178271/26 "2024-01-19T13:40:12Z")

</div>

> [@gotpasswords](#):
>
> Sailor - Transmitting the key in plaintext makes sense. Think of it as the public key you might use for PGP encryption. Doesn’t do any good without the private key, or in this case, the physical Enigma device.

Enigma was nothing like modern-day asymmetric encryption of the PGP sort. Asymmetric encryption (where you’d use different keys to encrypt and decrypt, and can consequently safely publish the one for encryption) was only developed in the 1970s.

It’s a rule of best practice in cryptography that the security of the scheme should rely on the secrecy of the key, not that of the algorithm. The Wehrmacht could not communicate keys in plain text and rely on the enemy not having a physical Enigma as the only safeguard, as your public/private key analogy implies.

---

<div class="post-metadata">

**Author:** ![Schnitte](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/schnitte/32/9033_2.png) [@Schnitte](https://boards.straightdope.com/u/Schnitte)\
**Post date:** [January 19, 2024, 1:47pm UTC](https://boards.straightdope.com/t/programming-colossus-cracking-enigma/178271/27 "2024-01-19T13:47:32Z")

</div>

(In fact, the Enigma was a commercially marketed product in the 1920s, available for anyone to buy. They were also patented, so anybody could look up the mechanics of the device. The Wehrmacht used a modified version rather than the civilian editions, but it goes to show that you can’t rely simply on the secrecy of the machine itself to provide secure encryption.)

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [January 19, 2024, 1:48pm UTC](https://boards.straightdope.com/t/programming-colossus-cracking-enigma/178271/28 "2024-01-19T13:48:40Z")

</div>

> [@bob\_2](#):
>
> Ms Mortimer does not have fond memories of her time working with Colossus.

And she probably got paid about a tenth of what a man would have gotten for the same work.

---

<div class="post-metadata">

**Author:** ![Schnitte](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/schnitte/32/9033_2.png) [@Schnitte](https://boards.straightdope.com/u/Schnitte)\
**Post date:** [January 19, 2024, 1:56pm UTC](https://boards.straightdope.com/t/programming-colossus-cracking-enigma/178271/29 "2024-01-19T13:56:38Z")

</div>

[This guy](http://enigmamuseum.com/replica/) offers functioning replica Enigmas for sale. There’s no price posted, so I suppose he makes them himself when someone places an order, and they’re expensive; but elsewhere on his website he says he is also trading in original working Enigmas, with prices ranging between $250k and $400k, so I guess the replica option will still be significantly cheaper.

---

<div class="post-metadata">

**Author:** ![Seren359](https://avatars.discourse-cdn.com/v4/letter/s/a87d85/32.png) [@Seren359](https://boards.straightdope.com/u/Seren359)\
**Post date:** [January 19, 2024, 5:05pm UTC](https://boards.straightdope.com/t/programming-colossus-cracking-enigma/178271/30 "2024-01-19T17:05:25Z")

</div>

One very important fact is required here!  
Colossus was NOT designed to break Enigma, the Bombe machines did that.  
Colossus was used on the very high-level Lorentz teleprinter cipher that the High command used.

---

<div class="post-metadata">

**Author:** ![Baal\_Houtham](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/baal_houtham/32/13604_2.png) [@Baal\_Houtham](https://boards.straightdope.com/u/Baal_Houtham)\
**Post date:** [January 19, 2024, 8:46pm UTC](https://boards.straightdope.com/t/programming-colossus-cracking-enigma/178271/31 "2024-01-19T20:46:29Z")

</div>

Hello. Did the OP’s question from 20 years ago ever get answered?

> [@keeper0](#):
>
> Did it just cycle through all the possible permutations and leave it up to humans to read through the millions of possibilities to determine likely solutions, or was there some “intelligence” to the computer that it could recognize “good” solutions?

I’m not at all programming savvy, but it seems that the only response that addressed the OP’s question was #10, which received no replies or elaborations, and is too technical for me to understand.

> [@astro](#):
>
> At Bletchley Park, Bill Tutte had proposed the “Double Delta” method for finding the Lorenz machine wheel start positions to which the German operator had set his Lorenz machine. (different wheel start positions for each message).
> 
> The Tutte algorithm required adding modulo two (XORing) the current and previous character bits on both the cipher text (Z) and the Chi wheel patterns (X) being tested to get the Deltas and then XORing these together for two of the five channels (tracks) on the paper tape. Then counting, down the whole length of the tape the number of times that this result equated to zero, trying various pattern start positions to find the maximum score.  
> i.e. if channels 1 and 2 are being used then count when […]

So, the bombe had a target result, and each automated attempt to discover the Enigma’s starting position produced a score of some sort? Is that roughly accurate? Could anyone simplify or elaborate?

---

<div class="post-metadata">

**Author:** ![bob\_2](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/bob_2/32/3341_2.png) [@bob\_2](https://boards.straightdope.com/u/bob_2)\
**Post date:** [January 19, 2024, 8:59pm UTC](https://boards.straightdope.com/t/programming-colossus-cracking-enigma/178271/32 "2024-01-19T20:59:08Z")

</div>

> [@Chronos](#):
>
> And she probably got paid about a tenth of what a man would have gotten for the same work.

They were WRENS. ( The Women’s Royal Naval Service was the women’s branch of the Royal Navy. First formed in 1917 for the First World War,)

As far as I can tell, they were paid at about half the rate of a similarly ranked male sailor.

---

<div class="post-metadata">

**Author:** ![Jas09](https://avatars.discourse-cdn.com/v4/letter/j/d07c76/32.png) [@Jas09](https://boards.straightdope.com/u/Jas09)\
**Post date:** [January 20, 2024, 3:13am UTC](https://boards.straightdope.com/t/programming-colossus-cracking-enigma/178271/33 "2024-01-20T03:13:04Z")

</div>

> [@Baal\_Houtham](#):
>
> So, the bombe had a target result, and each automated attempt to discover the Enigma’s starting position produced a score of some sort? Is that roughly accurate? Could anyone simplify or elaborate?

It’s the Lorenz, and Colossus (not Bombe and Enigma), but it sounds like it was pretty automated.

Basically the entire cipher stream is evaluated and a series of XOR operations is performed to determine how often the XOR of subsequent characters in the Cipher text matched the XOR of subsequent Chi-wheel output characters (this was done for each possible Chi-wheel input). If the Chi wheel settings were right these operations would match 55% of the time. If they were wrong it would be 50%. This is due to the non-random frequencies of letters in German.

The computer was built to do these operations very quickly and cumulate a sort of “running total”. The right Chi-wheel settings would produce an obviously different result than the wrong ones.

Some math and an explanation of the attack can be found here: [The Double Delta Attack](https://cs.stanford.edu/people/eroberts/courses/soco/projects/2008-09/colossus/doubledelta.html)

From here: [The Colossus Machine](https://cs.stanford.edu/people/eroberts/courses/soco/projects/2008-09/colossus/colossus.html)

> [@](#):
>
> An operator of the machine would manually set a threshold which, when it was exceeded by the count of zeros for given wheel settings, would cause the wheel settings and the number of zeros for those settings to be printed out. Thus, all the combinations which produced too few zeros could be ignored because their count would not exceed the threshold and so would not be printed out.

Any possibly correct wheel settings (ones that produced a higher-than-expected number of matching zeros) would be printed out automatically.

ETA: One subtlety I glossed over is that there are 5-bits for each character and only the first two bits are exactly compared (hence the discussion of 2 of the 5 tracks).

---

<div class="post-metadata">

**Author:** ![Baal\_Houtham](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/baal_houtham/32/13604_2.png) [@Baal\_Houtham](https://boards.straightdope.com/u/Baal_Houtham)\
**Post date:** [January 20, 2024, 3:45am UTC](https://boards.straightdope.com/t/programming-colossus-cracking-enigma/178271/34 "2024-01-20T03:45:06Z")

</div>

Thank you muchly. I’m googling some terms and reading the Stanford link — and learning a small, enjoyable, bit.

---

<div class="post-metadata">

**Author:** ![Isilder](https://avatars.discourse-cdn.com/v4/letter/i/cc9497/32.png) [@Isilder](https://boards.straightdope.com/u/Isilder)\
**Post date:** [January 26, 2024, 12:45am UTC](https://boards.straightdope.com/t/programming-colossus-cracking-enigma/178271/35 "2024-01-26T00:45:07Z")

</div>

> [@sailor](#):
>
> The daily keys were distrubuted in books for periods of 1 2 or 3 months.

yes.

Its loose talk to say to that the germans “transmitted the rotor settings each night”. I think they were referring to way regular check ins and things like weather reports would be of the same form, and they could see the same patterns in the cipher text… and that assisted the code breakers to get derive the new keys. So that early hours would be “key retrieval” time…

---

<div class="post-metadata">

**Author:** ![kferr](https://avatars.discourse-cdn.com/v4/letter/k/71e660/32.png) [@kferr](https://boards.straightdope.com/u/kferr)\
**Post date:** [January 26, 2024, 12:22pm UTC](https://boards.straightdope.com/t/programming-colossus-cracking-enigma/178271/36 "2024-01-26T12:22:06Z")

</div>

There is a book that came out a few years after this thread was started called “Colossus: Bletchley Park’s Greatest Secret” by Paul Gannon. It’s been years since I read it but scanning the TOC makes it look like it should answer the OP’s question.

[Previous page](https://boards.straightdope.com/t/programming-colossus-cracking-enigma/178271.md?page=1)
