Alan Turing, wartime cryptographer, mathematician. Inventor of the forerunner of the modern computer.
Pleading guilty on the advice of his lawyers, he had agreed to submit to a course of a synthetic oestrogen - a process colourfully referred to as chemical castration - as an alternative to prison. The physical ravages of that treatment - his libido was destroyed and he grew breasts - were bad enough; but he was also stripped of his security clearance and the cryptographic consultancy he was supplying to the British Government was cancelled.
A brief life packed with such triumph and disaster makes for a thrilling and sobering story, though the new film, which stars Benedict Cumberbatch and Keira Knightley, touches only lightly on Turing's sexuality. That's somewhat ironic since the man himself was remarkably open about it. In the early 1950s, behaviour that had previously been closeted and ignored was becoming criminalised and Turing didn't see it coming. That was his tragedy - and the world's loss.
The idea that a bunch of mathematicians and other geeks won the war may not make good copy, but it has a core of literal truth. Yet extraordinarily, the wartime codebreaking was not Turing's most enduring achievement.
In a paper published in 1936, he posited the notion of a "universal machine" that would compute, by way of stored instructions, anything that was capable of being computed. His hypothetical invention, which he called the Turing machine, would behave according to symbols on a strip of tape; we call that a program. In short, Turing invented the computer. Not an instant of our modern, digitally dictated life is untouched by his genius.
Turing has long been known to, and celebrated by, the computing community, which inaugurated their Nobel equivalent, the Turing Prize, in 1966. But his Enigma achievements, swaddled in secrecy by official restrictions, remained unknown for more than 20 years.
The man who brought them into the light was perhaps uniquely qualified to do so. Andrew Hodges, a research fellow at Oxford University, was at the forefront of gay liberation activism in the early 1970s. His exhaustive and superb 1983 biography Alan Turing: The Enigma was the source material both for The Imitation Game and the 1986 play Breaking the Code, which had runs in the West End and on Broadway.
Speaking to me last week, Hodges agreed that he was the right man in the right place at the right time to tell Turing's story.
"It just happened that in the early 1970s, people started leaking all sorts of historical things, even though nobody was quite sure what they were allowed to say. At the same time, there was a lot of talk about reclaiming gay history, which I was very much part of.
"So the story of [Turing's arrest and death] was part of a serious discussion that was trying to make sense of what had happened in the past. But Turing's part in the war was still secret at that stage. It emerged in about 1974 from people in the spying game, who are always telling stories - they are very leaky people. A number of blockbuster books appeared which were pretty inaccurate but which did give the main sense that something very large had happened that was essential to the whole story of the war and had gone unknown by all historians to that point.
"I'm not sure that anyone else would have put those three things together."
The new movie simplifies, as the movies tend to do, the reality of the breaking of Enigma. It was long-winded, unglamorous work, devoid of dramatic "Eureka!" moments that suit the tropes of screen storytelling.
It also lacked a singular hero, because the Bletchley Park work owed much to the pre-war work of Polish cryptographers, who had broken an early version of the code but lacked the resources to tackle the beefed-up naval version.
"It was not a single moment of triumph," says Hodges. "The bombe machine was working March 1940, before Winston Churchill became PM. They were getting on with the air force signals pretty well. The naval signals had to wait until the spring of 1941."
The essence of Enigma was a system of rotors set up according to a key that changed every 24 hours. The movements of the rotors varied electrical circuits so that a given letter - say, A - might be encoded as Q the first time it was struck, but as E the next time. Only a machine using the same key could decode it.
The possible combinations ran into the billions, but Turing, building on the Poles' work, built a machine to out-think the machine.
Military historians tell us that the breaking of Enigma shortened the war by as much as two years and saved as many as 14 million lives; Churchill singled it out as the single biggest factor contributing to Allied victory: "It was because of [it] that we won the war," he told George VI.
Yet it was not until 2009 that Turing was officially rehabilitated. Prime Minister Gordon Brown formally apologised, saying that "the debt of gratitude he is owed makes it all the more horrifying that he was treated so inhumanely" and expressed his deep sorrow that "Alan and the many thousands of other gay men were convicted ... under homophobic laws".
Hodges' view is that Turing's conviction for indecency and its sequel suffering alarmed him only to the extent that it stopped him working. His openness about his sexuality went back to his days at King's College Cambridge, where liberal sexual mores were part of the prevailing culture between the wars: John Maynard Keynes went to King's and it was the alma mater of many of the famously open-minded Bloomsbury Group.
Turing spent plenty of time in Europe and Scandinavia pursuing the pleasures of the flesh - his hormonal imprisonment had ended almost two years before his death. But matters came to a head in March 1953.
"A lad from Norway had turned up," says Hodges. "He was soon taken away and Turing knew that he was under surveillance from Special Branch. He wrote about this as being a crisis as extreme as what had happened the previous year.
"Obviously he was a security risk. He was roving around Europe meeting goodness knows who - even now, if you were a top consultant to a cryptography organisation, that would be seen as beyond the pale.
"He was liable to blackmail because he was gay and it's no secret that people tend to divulge more to people they have had a sexual connection with than to anyone else. So the attitude of the state was not unreasonable.
"His trips abroad were his defiance of the English law, and they were his only way out. But in hindsight, in the circumstances of the Cold War, it is amazing how gently he was treated. He had the most secret knowledge of the Anglo-American world, knowledge about which no hint was given to the public for another 20 years. It was impossible for him to combine that with what was his very modern approach to sexual freedom."
Interestingly, then, and although he came to the story as a gay activist, Hodges resists the simple reading implicit in Brown's apology.
"Of course what Brown said is true and that's why I got into the whole story," he says. "But there is more to it than that. There is a very deep connection between his war work and his early death. But the reality is that when people are involved in wars, they get hurt. War is not a safe business. Even the parts that seem to be peaceful and triumphant, like the codebreaking work, have hidden costs. He was one of those costs."
The Imitation Game is in cinemas from New Year's Day.