Monday, February 09, 2015

The Imitation Game

Photo credit: Jack English. Copyright: © 2014 The Weinstein Company. All Rights Reserved. Click to enlarge.
The Imitation Game / The Imitation Game. GB/US © 2014 BBP Imitation LLC. P: Nora Grossman, Ido Ostrowsky, Teddy Schwarzman. D: Morten Tyldum. SC: Graham Moore - based on the book Alan Turing: The Enigma (1983) by Andrew Hodges. DP: Óscar Faura - shot on 35 mm film (Kodak Vision3 250D 5207, Vision3 500T 5219) - Super 35 - cameras: Arricam LT and Arricam ST, Zeiss Master Prime Lenses - 2K digital intermediate: Company 3 - processing: i-Dailies (London) - colour - 2,35:1 - Dolby Digital - released on: DCP. PD: Maria Djurkovic. Cost: Sammy Sheldon Differ. Make-up and hair designer: Ivana Primorac. M: Alexandre Desplat. ED: Willam Goldenberg. D: Benedict Cumberbatch (Alan Turing), Keira Knightley (Joan Clarke), Matthew Goode (Hugh Alexander), Rory Kinnear (Det. Robert Nock), Allen Leech (John Cairncross), Matthew Beard (Peter Hilton) with Charles Dance (Commander Denniston) and Mark Strong (Stewart Menzies). 114 min
    DCP viewed at The Samuel Goldwyn Theater (Motion Picture Academy screening), Wilshire Boulevard, Beverly Hills, 9 Feb 2014.
    Academy Award nominations: - Best Motion Picture of the Year: Nora Grossman, Ido Ostrowsky, Teddy Schwarzman - Best Performance by an Actor in a Leading Role: Benedict Cumberbatch - Best Performance by an Actress in a Supporting Role: Keira Knightley - Best Achievement in Directing: Morten Tyldum.

Official synopsis: "During the winter of 1952, British authorities entered the home of mathematician, cryptanalyst and war hero Alan Turing (Benedict Cumberbatch) to investigate a reported burglary. They instead ended up arresting Turing himself on charges of ‘gross indecency’, an accusation that would lead to his devastating conviction for the criminal offense of homosexuality – little did officials know, they were actually incriminating the pioneer of modern-day computing. Famously leading a motley group of scholars, linguists, chess champions and intelligence officers, he was credited with cracking the so-called unbreakable codes of Germany's World War II Enigma machine. An intense and haunting portrayal of a brilliant, complicated man, The Imitation Game follows a genius who under nail-biting pressure helped to shorten the war and, in turn, save thousands of lives. Directed by Morten Tyldum with a screenplay by Graham Moore, the film stars Benedict Cumberbatch, Keira Knightley, Matthew Goode, Rory Kinnear, Allen Leech, Matthew Beard, Charles Dance and Mark Strong." (Official synopsis from the Production Notes).

AA: A well-made mainstream biopic with special insight in WWII, foreign intelligence, and the birth of the computer. A character-driven story firmly grounded in history and the evolution of information technology. The subject, Alan Turing, is considered the "Father of Theoretical Computer Science and Artificial Intelligence" (Wikipedia).

Compared with The Imitation Game, the simultaneous British success film of a troubled genius, The Theory of Everything is feelgood entertainment. The Imitation Game is a tragedy. The British government, having benefitted immensely from Alan Turing's insight during the war, poisons him with hormons to "cure" him of homosexuality.

The screenplay is intelligent, discussing ever-relevant themes about human and artificial intelligence.

The Imitation Game is also a different kind of a war film. We are in one of the centers where the outcome of the war was settled. Although we are far from the front, we often sense the immediacy of the war. There are telling details such as a brief shot of a legless war invalid, which convey the general horror quite powerfully.

A puzzling aspect is the ethical dilemma of war. Not all discoveries could be put to use, because that would have exposed to the Nazis the fact that the Enigma had been cracked.

The codebreaking philosophy has wide-ranging implications. "How's that different from normal people talking. They never say what they mean". As an outsider, Alan Turing has been able to make observations like that.

The Imitation Game will be remembered as the film about the first computer. The film creation, here called Christopher, is bigger and more exciting than the real thing, almost a character in its own right.

The characters are contradictory in a way that feels true to life, but there is a mainstream (Weinstein?) polish in the production. For instance the talented and incredibly prolific Alexandre Desplat has here composed a conventional score that I feel simplifies the emotional flow.

As a Finn I start to think that an interesting film could be made of WWII Finnish codebreakers, too. And also of the Stella Polaris operation of rescuing intelligence abroad when the war was about to end.


1927, Sherborne School, Dorset, England: 15-year-old Alan Turing is shy, awkward, solitary and bullied. Months of misery at this traditional boarding school stretch ahead, until a handsome 16-year old knight comes to his rescue. Christopher Morcom advises Turing to try to blend in, so as not to be picked on. As their close friendship develops, Christopher introduces him to the arcane art of cryptography, a concept which Turing embraces immediately. Both excelling at mathematics, the two boys become adept at communicating in code, allowing them to keep their mutual attraction concealed from the rest of the school. Christopher leaves for a holiday with his parents and Turing is confused when he fails to reappear at the beginning of the new term. The headmaster breaks the awful news: Christopher has died of bovine tuberculosis from drinking infected milk. Turing is left distraught and alone again.

1939, Bletchley Park, Buckinghamshire, England: Turing arrives at the heavily fortified Victorian mansion for a meeting with the head of the top secret Government Code and Cypher School, naval Commander Alastair Denniston. The interview does not go well. Denniston finds the Cambridge mathematics graduate arrogant and obtuse and is about to show him the door when Alan mentions Enigma, the German military code machine. Denniston points out that Enigma is unbreakable, but Turing gleefully responds that he should be allowed to try.

Turing meets the other new recruits, including Hugh Alexander, man about town, chess champion and leader of the group; John Cairncross, Scottish and an inferior mathematician; Peter Hilton, a precocious Oxford undergraduate; and Furman and Richards, a couple of linguists. Denniston shows a captured Enigma machine to his protégés and when Turing makes it clear he is not a team player, the watching head of newly-created MI6, Stewart Menzies, quickly brings him into line, pointing out that men are dying while they are time-wasting.

Turing’s response is to write to Winston Churchill, expressing his dissatisfaction with the Bletchley set-up and suddenly finding himself in charge of the Enigma team, on the Prime Minster's orders. Furman and Richards fail to survive this change of regime and Turing suggests a crossword-solving contest with the help of MI6. To general embarrassment, the winner is a girl, Cambridge mathematics graduate Joan Clarke.

Turing secretly includes her in the Bletchley team, placing her in a hut full of Wrens, but he risks arrest by giving her Enigma messages to analyze. Meanwhile, he works obsessively on his own electro-mechanical code-breaking machine, which he calls Christopher, leaving his fellow team members increasingly impatient at their lack of results. Turing makes a gauche attempt at making friends, but possibly too late. Denniston wants to shut the machine down and Clarke is threatening to go home, so partly in desperation, Turing proposes marriage. She accepts, although she knows that Turing is gay and is genuinely disappointed when he later breaks it off, to save her from investigation over the "borrowed" Enigma intercepts.

Suddenly, there's a breakthrough. At a party, Clarke's friend Helen mentions that she has been intercepting numerous messages from the same German radio operator and there seem to be repeated words which could provide a key. Turing realizes that all messages contain the phrase "Heil Hitler!" Enigma can be broken!

Although the end is in sight, Turing points out that they must use their knowledge sparingly. Lives will continue to be lost, but the code-breakers must not disclose their success to the enemy, or Enigma will be replaced. Turing persuades Menzies to keep their secret from the British top brass, until the Allies' newfound advantage can be perfected.

Codenamed "Ultra", Bletchley Park becomes the biggest store of military intelligence in the world and the war is drastically shortened. Turing and the members of Hut 8 can finally take their secrets back to their civilian lives.

1952, Manchester, England: Police are called to the house of a university professor of mathematical biology, following reports of a burglary. Investigating Detective Robert Nock finds Professor Turing a curious "victim", who appears to be hiding something. Digging into his background he finds his war record has been erased. Nock sniffs espionage, but his investigation is derailed when Turing is arrested for "gross indecency". Nock interviews him, finding his true background a revelation and is sickened when the shy academic is convicted.

Clarke visits Turing and finds him a shambling shadow of his former self, his brain clouded by synthetic oestrogen – the “chemical cure” which he opted for as an alternative to prison. He is still trying to work on a newer model of Christopher, but is unable even to manage a crossword puzzle.

1954: Police are again in attendance at Turing's house. The troubled genius has committed suicide – a half-eaten apple dusted with cyanide is by his bed.

His machine was never perfected, though it generated a whole field of research into what became known as "Turing Machines". Today we call them "computers"

Wikipedia: Accuracy

The film has received criticism from historians and academics regarding the events and people it portrays.

Historical events

Suggesting that the work at Bletchley Park was the effort of a small group of cryptographers who were stymied for the first few years of the war until a sudden breakthrough that allowed them to break Enigma.
Progress was actually made from the beginning of the war in 1939 and thousands of people were working on the project before the war ended in 1945. Throughout the war there were breakthroughs and setbacks when the design or use of the German Enigma machines was changed and the Bletchley Park code breakers had to adapt.

Naming the Enigma-breaking machine "Christopher" after Turing's childhood friend.
In actuality, this electromechanical machine was called 'Victory'. Victory was a British Bombe machine, which drew a spiritual legacy from a design by the Polish Cryptanalyst Marian Rejewski. Rejewski designed a machine in 1938 called bomba kryptologiczna which exploited a particular, but temporary, weakness in German operating procedures. A new machine with a different strategy was designed by Turing (with a key contribution from mathematician Gordon Welchman, unmentioned in the film) in 1940. More than 200 British Bombes were built under the supervision of Harold Keen of the British Tabulating Machine Company.

Showing a scene where the Hut 8 team decides not to use broken codes to stop a German raid on a convoy that the brother of one of the code breakers (Peter Hilton) is serving on, in order to hide the fact they have broken the code.
In reality, Hilton had no such brother, and decisions about when and whether to use data from Ultra intelligence were made at much higher administrative levels.

Showing Turing writing a letter to Churchill in order to gain control over Enigma breaking and obtain funding for the decryption machine.
Turing was actually not alone in making a different request with a number of his colleagues, including Hugh Alexander, writing a letter to Churchill (who had earlier visited there) in an effort to get more administrative resources sent to Bletchley Park, which Churchill immediately did.

Showing a Dornier Do 17 performing a reconnaissance mission against an Allied convoy.
In reality, the Do 17 had too short a range to perform a reconnaissance mission in the Atlantic. This role was carried out by long-range aircraft such as the Focke-Wulf Fw 200 Condor.

Turing's personality and personal life

Exaggerating Turing's social difficulties to the point of depicting him having Asperger syndrome or otherwise being on the autism spectrum.
While a few writers and researchers have tried to assign such a retrospective diagnosis to Turing, and it is true that he had his share of eccentricities, the Asperger's-like traits portrayed in the film – an intellectual snob with no friends, no sense of how to work cooperatively with others, and no understanding of humour – bear little relationship to the actual adult Turing, who had friends, was viewed as having a sense of humour, and had good working relationships with his colleagues.

Scenes about Turing's childhood friend, including the manner in which Turing learned of Morcom's illness and death.

Portraying Turing's arrest as happening in 1951 and having a detective suspect him of being a Soviet spy until Turing tells his codebreaking story in an interview with the detective, who then discovers Turing is gay.
Turing's arrest was in 1952. The detective in the film and the interview as portrayed are fictional. Turing was investigated for his homosexuality after a robbery at his house and was never investigated for espionage.

Suggesting that the chemical castration that Turing was forced to undergo made him unable to think clearly or do any work.
Despite physical weakness and changes in Turing's body including gynecomastia, at that time he was doing innovative work on mathematical biology, inspired by the very changes his body was undergoing due to chemical castration.

Clarke visiting Turing in his home while he is serving probation.
There is no record of Clarke ever visiting Turing's residence during his probation, although Turing did stay in touch with her after the war and informed her of his upcoming trial for indecency.

Stating outright that Turing committed suicide after a year of hormone treatment.
In reality, the nature of Turing's death is a matter of considerable debate. The chemical castration period ended fourteen months before his death. The official inquest into his death ruled that he had committed suicide by consuming a cyanide-laced apple. Turing biographer Andrew Hodges believes the death was indeed a suicide, re-enacting the poisoned apple from Snow White, Turing's favourite fairy tale, with some deliberate ambiguity included to permit Turing's mother to interpret it as an accident. However Jack Copeland, an editor of volumes of Turing's work and Director of the Turing Archive for the History of Computing, has suggested that Turing's death may have been accidental, caused by the cyanide fumes produced by an experiment in his spare room, and that the coroner's investigation was poorly conducted.

Personalities and actions of other characters

Depicting Commander Denniston as a rigid officer, bound by military thinking and eager to shut down the decryption machine when it fails to deliver results.
Denniston's grandchildren stated that the film takes an "unwarranted sideswipe" at their grandfather's memory, showing him to be a "baddy" and a "hectoring character" who hinders the work of Turing. They said their grandfather had a completely different temperament from the one portrayed in the film and was entirely supportive of the work done by cryptographers under his command.
There is no record of the film's depicted interactions between Turing and Denniston. In addition, Turing was always respected and considered one of the best code breakers at Bletchley Park.

Showing Turing interacting with Stewart Menzies, head of the British Secret Intelligence Service.
There are no records showing they interacted at all during Turing's time at Bletchley Park.

Including an espionage subplot involving Turing working with John Cairncross.
Turing and Cairncross worked in different areas of Bletchley Park and there is no evidence they ever met. Historian Von Tunzelmann was angered by this subplot (which suggests that Turing was for a while blackmailed into not revealing Cairncross as a spy lest his homosexuality be revealed), writing that "Creative licence is one thing, but slandering a great man's reputation – while buying into the nasty 1950s prejudice that gay men automatically constituted a security risk – is quite another."

(Remarks about historical accuracy copied from Wikipedia).

Virtual Bletchley Park
by Tony Sale
Tony Sale's Codes and Ciphers

The Breaking of Enigma by the Polish Mathematicians

As German military power increased during the 1920's, the Poles felt threatened and vulnerable, situated as they were between two powerful nations, Germany to the West and Russia to the East.

In order to discover the intentions of their potential enemies, they resorted to intelligence gathering. They had a long tradition of this and particularly of code breaking.

The modern use of Radio allowed them to intercept enemy Radio transmissions without revealing their intelligence activities.

From 1928 onward Polish Intelligence intercepted German Radio transmissions using a new cipher system which was eventually identified as coming from an Enigma machine.

Polish Intelligence had obtained examples of the commercial Enigma machine but quickly found that the German Enigma was different in detail from the commercial version.

The Polish Mathematicians
Polish Intelligence were initially unable to break the German Enigma traffic, however driven by the imperative of finding what the Germans were up to, they, uniquely among other nations at that time, decided to try a mathematical approach. In 1932 a team of young mathematicians was set up. It included Jerzy Rozycki, Henryk Zygalski and Marian Rejewski (all of whom were products of the notable flowering of Polish mathematics in the 1920s and 1930s).

Rejewski quickly showed that mathematical techniques could be used to attack the problem of finding the message key by exploiting the German's cryptographic error in repeating the message key at the start of a transmission.

The problem that still had to solved was the internal wiring connections in each wheel. In this Polish Intelligence were helped by the French. The French were very interested in assisting Poland because they also were disturbed by the rise in German militancy and wanted an ally on Germans Eastern flank.

In 1931 and 1932 the French cryptographer Gustave Bertrand obtained priceless information about the German Enigma from a spy, Hans-Thilo Schmidt, known by the code name Asche. The French were unable to use this information to break into the German Enigma traffic. It was also passed to the British who were also at this time unable to break into Enigma. Finally Bertrand passed the information to Polish Intelligence who had not revealed how far they had got with their attack on Enigma. This information, which included German operating instructions for Enigma and two sheets of monthly key settings enabled Rejewski to deduce the internal wheel wiring for all three wheels, but only after he had made an inspired leap of imagination. The problem was the order of the 26 wires connecting the keyboard to the fixed entry disc at the right hand end of the three wheels.

In the commercial Enigma, which the Polish team possessed, the wiring order clockwise round the entry disc was the order of the keys on the keyboard, QWERTZUIO... Rejewski had realised that the wiring order must be different on the German Forces Enigma, but had no way of finding out what the order was. The inspired leap of imagination was to suppose the Germans had, in their logical way, just used ABCDEFG... as the order. He tried this and it worked and he could now work out from his equations the internal wiring of the three wheels and the reflector.

The deduction of the internal wiring of the wheels was a spectacular feat by Rejewski. It enabled the Polish cryptographers to build replicas of the German Enigma machine which could then be used to decipher the intercepted Radio messages once the Enigma configuration and the message settings had been deduced.

That was the next problem. Rejewski had shown that his "characteristics" could be deduced from a day's radio traffic when the Germans were double enciphering the Enigma message settings. Now the Polish cryptographers had to produce a catalogue of these characteristics for every wheel order and every wheel start position, 26x26x26x6 entries,(no less than 105,456 in all!), in order to deduce the Enigma configuration for that day.

They devised a machine which they called a Cyclometer. This consisted of, in effect, two Enigma machines side by side with their right hand wheels offset by three places.

Click here to see how Rejewski's characteristics were catalogued and used.

Then in September 1938 the Germans changed the Enigma procedures for enciphering message keys. They no longer started the message key encipherment from one standard set of wheel positions set for the whole 24 hour period, but asked the Enigma operator to choose a different encipherment start, known as the indicator, for each message sent and to transmit the chosen indicator with the double enciphered message setting in the header of the German message.

This meant that Rejewski's characteristics no longer worked because they depended on all message key encipherments being from the same wheels start positions.

The Zygalski Sheets
When they had been studying the double enciphered message settings in order to construct Rejewski's characteristics, cases had been noticed where the same enciphered letter occurred in either the 1st and 4th, or 2nd and 5th, or 3rd and 6th positions in the enciphered message settings. These positions, which were called females, corresponded to positions at which the same letter had been keyed by the German operator into the Enigma machine because of the repeat of the three letter message key.

Zygalski realised that whether this occurred or not depended on the wheel order and the start position, therefore inversely if it did occur it implied one of a set of possible Enigma configurations. If enough of these doubles occurred during a days traffic it might be possible to find a unique configuration for which all of these doubles could occur.

Click here to generate a set of intercepts on random indicators and message keys.

The settings of the Enigma were: wheels 132 rings QJF and no Steckers. The list of 234 intercepts contains 34 females of which 14 are of the 1,4 type.

Zygalski realised that the analysis of the vast amount of information required could be achieved by a grill method using perforated sheets.

The sheet procedure involves working through each of the six possible wheel orderings for three wheels and for each wheel order working through the 26 possible left hand wheel ring letters, 156 tries in all, but on average only half before the answer is found.

There were sheets prepared for each left wheel letter for each wheel order. Each sheet contained four squares of 26 by 26 ie two alphabets along the top and down the side.

The first decision was which wheel order to try, (in our case 132) and which ring first letter, in this case Q. Next take the first letter of the first indicator that gives a 1,4 female in this case P and get the sheet 123 Q P. Place this on the table offset by the next two letters of the indicator, TJ. Now get sheets for succeeding indicators overlaying them on the table. If the wheel order and the first ring letter are what was used to encipher the message key then one square will line up and let light through from below the table. The original ring setting can now be deduced from the co-ordinates of this lit square.

Click here to try overlaying Zygalski sheets.

This emulation of the Zygalski sheets calculates the offset of a sheet and recreates the overlaid portion of each sheet at run time. This minimises the downloaded information but takes a little time to recalculate each sheet. Click here for a description of the calculations required to do this.

Rejewski's Bomba
Rejewski also had the idea for a mechanical method for finding the Enigma ring settings from the females in the double enciphered message settings.

This was called the Bomba. Long after WW II Rejewski drew a sketch of it. The idea was to rotate six sets of enigma wheels in synchronism with each set being one fast wheel position in advance of the preceding one so that the six positions corresponding to the double encipherment of the message setting could be examined simultaneously looking for repeating enciphered letters.

Six of these machines were required, each set with one of the six possible wheel order for the possible three wheels in the Enigma machine. The Bombas were not very reliable and Zygalski's sheets produced better results.

In interviews after the War, Rejewski was quite clear that the Bombas were designed specifically to attack the double encipherment of the message setting. They were not designed, or ever used, for a general "known text" attack.

Successes, Failure and a Priceless Gift
Using these techniques the Polish cryptographers were, by 1938, reading some 75% of intercepted German Radio transmissions enciphered using the Enigma machine. They kept this a very closely guarded secret, telling no one of their successes.

Then in 1938 the Germans brought another two wheels into service so that the German operator now had to chose three out of five to put into the Enigma machine. This raised the amount of effort required to find keys way beyond what Polish Intelligence could provide.

In July 1939 with the invasion of Poland imminent, the Polish cryptographers decided to share their Enigma results with the French and British code breakers. At a meeting in the Kabackie Woods near Pyry just outside Warsaw all was revealed to the utter astonishment of the French and British. The Polish team gave them copies of the German Enigma machine and revealed the details of the Cyclometers, Bombas and Zygalski sheets.

Just before the German invasion, the three Polish code breakers escaped through Roumania and eventualy joined up with Gustave Bertrand and his French team at Chateau Vignolles in France just outside Paris.    

This page was originally created by the late Tony Sale, the original curator of the Bletchley Park Museum

Thanks to Mr. Kari Yli-Annala for bringing Tony Sale's article to my attention.

For illustrations and links see

No comments: