The World’s First Computers

As is so often the case with technology, the development of the world’s earliest computers arose from a military need. During the Second World War the German military used the Enigma machine to encrypt their communications, making sensitive information unreadable to eavesdroppers.

The Enigma used a set of three rotors, each containing every letter of the alphabet, and a set of frontal plug boards to determine how a letter in the plaintext would be encoded into the ciphertext. In order to decrypt Enigma encodings, a German operator had to know the exact rotor settings that had been used on the encoding Enigma and set these on his machine (today we would call this the encryption key). Typing in the encrypted text would then produce the original message (plaintext). For security reasons, the German Enigma operators changed starting settings every day, according to a set code book.

Cryptographically the Enigma was not very sophisticated. In fact, German engineers knew of its weaknesses but didn’t believe anybody would go to the effort of trying to crack it when there were over 150,000,000,000,000 possible starting settings. Unfortunately for them, British and Polish mathematicians working at Government Code and Cypher School at Bletchley Park, England, did exactly that. Led by brilliant mathematician Alan Turing, a codebreaking team used two channels of attack to crack the Enigma code.

The first of these was what we now call a Known Plaintext attack – when an attempt is made to decrypt a message by assuming it contains certain words of phrases, then extrapolating from that. In the case of Enigma, Turing’s team used weather reports from trawlers, which always started with a known set phrase and could be relied upon to contain other common weather-related words and phrases too.

A second attack made this easier, by taking advantage of a weakness in the Enigma scheme, whereby no given letter would ever be encrypted to itself. This allowed the team to immediately recognise incorrect rotor settings if they found any such mappings.

Bombe front
Bombe back

During this process, Alan Turing designed the Bombe – an early electro-mechanical machine which came into use in 1940 – to speed up the decryption process by excluding many of the invalid Enigma rotor settings. The few remaining possible combinations could then be tested by hand by the mathematicians at Bletchley.

The British were then able to break the German army and air force versions of the Enigma encryption and read encrypted messages as a matter of routine – indeed, among the Station X codebreakers it was considered bad form if the Enigma settings for the day had not been worked out before breakfast time. The resultant military intelligence – codenamed ULTRA – gave the Allies a significant advantage throughout the war. Later, the Naval version of the Enigma (which used four rotors instead of three) was also broken, and helped dramatically reduce Allied shipping losses in the Atlantic.

Enter Lorenz

Lorenz cipher machine closeup

However, by 1941 the British were finding more and more German Naval traffic that they could not decrypt. The Germans had switched to a new and much more complex system, the Lorenz cipher. Having approximately 160,000,000,000,000,000,000 possible starting settings meant that a “brute force” style attack was no longer feasible. Worse, the Allies had no idea how this new machine worked.

However, in a stroke of luck in August 1941 two significant errors by German operators allowed the Allies a glimpse at how Lorenz worked. A long Lorenz message was sent from Athens to Vienna, but was incorrectly received. The operator in Vienna sent an uncoded request for a re-transmission (first mistake), allowing Bletchley Park to know what was happening. The sender then made a much more significant error, by sending a similar but not quite identical message (some abbreviation were used the second time) using the exact same Lorenz settings (second mistake). This gave Allied codebreakers “depth” – two separate messages encoded with the same key. In a truly brilliant feat, British mathematician Bill Tutte was able to reverse engineer the Lorenz cipher and describe its operation, purely through extensive analysis of these two encrypted messages. Remarkably, Tutte never even saw an actual Lorenz machine until late 1945, but had correctly deduced how it worked.

Tutte’s breakthrough was significant – but took two months. Hand calculations and even bombes were not feasible methods of decrpyting Lorenz messages in sufficient time for the intelligence they contained to be useful. A new method of attacked – fast and automated – was needed.

Mechical machines known as Heath Robinsons were developed, but these too proved slow. Led by engineer Tommy Flowers, a team of British engineers designed and built Colossus – the world’s first electronic, programmable, digital computer – to tackle the task. Colossus used glass vacuum tubes as switches (where transistors are used today in microprocessors) and could read messages on paper tape at 5,000 characters per second (over 27mph). The machine was programmed by re-arranging electrical wires and plugs – there was no software as we know it, and no programming languages – not even machine code.


The first Colossus took 11 months to design and build, and was used in February 1944. Improved versions were developed and put into use just in time for the Allied invasion of Europe in June 1944. By the end of the war, 10 Colossus computers had been built.

The intelligence it provided gave the Allies a direct line in German High Command, at times even allowing them to read messages signed by Hitler himself. It was thanks to this ULTRA intelligence that the Allies knew the Germans had fallen for Operation Fortitude, and believed the D-Day landings would occur at Pas de Calais, rather than Normandy. Churchill himself estimated that ULTRA intelligence gained at Bletchley Park helped shorten the war by two years.

After the war, the Colossus was kept secret for many years. Indeed, the British intelligence service sold Lorenz-style machines to foreign governments and then used Colossus to secretly read their messages! This secrecy also meant that many of the developers of these early computers never received the recognition they deserved.

After the war Tommy Flowers left Bletchley Park and wanted to develop his own successor to Colossus. He applied for a bank loan but was turned down – the bank manager unwilling to believe that such a computing machine could ever be created. Having signed the Offical Secrets Act, Flowers was unable to tell the manager that not only was it *possible*, but he had done it – and helped the Allies win the war.

Alan Turing went on to create detailed designs for a stored-program computer (the way all modern computers work), helped develop the Manchester Mark 1 and ACE computers, made radical breakthroughs in artificial intelligence, proposed the Turing Test for intelligent machines, and made many other advances in mathematics. He died in controversy in 1954, aged just 41.

Be the first to comment

Leave a Reply

Your email address will not be published.