Enigma is a 2001 British film about the Enigma codebreakers of Bletchley Park in World War II. The film, directed by Michael Apted, stars Dougray Scott and Kate Winslet. The film's screenplay was by Tom Stoppard, based on the novel Enigma by Robert Harris. This was the final film to be scored by John Barry.
In 1943 amid the largest convoy deployment from the US to Britain, cryptanalyst Tom Jericho returns to Bletchley Park to help find the code to the U-Boats' Enigma communications. On finding a cypher containing highly classified information, hidden by a former lover who has gone missing, he attempts to solve the code while working on cracking the German U-Boat code against a background of subterfuge, spies and the Katyn massacre.
The film was co-produced by Mick Jagger, who provided funding for the film, as well as access to his own Enigma machine. It was shot in England, Scotland and the Netherlands. Critical reviews were largely positive, although there was criticism of the largely fictional storyline which does not mention the real codebreaker Alan Turing, nor give due credit to the Polish cryptanalysis foundation on which subsequent British codebreaking was dependent for its successes.

plot:

The story takes place in March 1943 with the Second World War at its height and is loosely based on actual events. The cryptanalysts at Bletchley Park, Buckinghamshire, England, have a problem: the Nazi U-boats have increased the security of key-changing of their Enigma machine ciphers, leading to a blackout in the flow of naval vital signals intelligence. This could spell disaster in the critical Battle of the Atlantic, on whose outcome Britain's survival depends. The British cryptanalysts have cracked the "Shark" cipher once before, and they need to do it again in order to keep track of U-boat locations and steer shipping convoys out of their way.
The plot follows the fictional character of the brilliant but maverick working class mathematician Tom Jericho (played by Dougray Scott). He is returned to Bletchley Park from Cambridge to assist with the crisis after recovering from a nervous breakdown brought on by overwork combined with an unhappy love affair with Claire Romilly (Saffron Burrows), who works at Bletchley. Jericho immediately tries to see Claire again and finds that she mysteriously disappeared a few days earlier. He enlists the help of Claire's blue stocking housemate Hester Wallace (Kate Winslet), also working at Bletchley, to follow the trail of clues and learn what has happened to Claire.
Mr. Jericho and Miss Wallace, as they formally address each other, repeatedly break the rules of the Bletchley Park establishment and the law as their hunt for Claire gets more intense, especially after they discover that she has stolen and hidden some messages which have not been decyphered.
Jericho is closely watched by a suave MI5 agent Wigram (Jeremy Northam), who plays cat and mouse with him throughout the film. But Jericho's eccentricities are tolerated at the Park, despite his transgressions, because of the brilliant plan he devises for uncovering the new code key. The plan may unfortunately mean sacrificing at least one Allied convoy to the U-boats.
The film follows events as signals intelligence see a convoy spotted and then hunted down by the U-boats, but this gives enough information for the new key to be analysed using electro mechanical Bombe devices.
Tom and Hester's highly unofficial research uncovers a British government plot to bury the intelligence information of the Katyn massacre for fear it might weaken American willingness to remain in the war on the same side as Joseph Stalin.
This in turn leads to their suspicion that a Polish cryptanalyst, Jozef 'Puck' Pukowski (Nikolaj Coster Waldau) working at the Park may have been so incensed by his own learning of the massacre â?? which claimed the life of his brother â?? that he is prepared to betray Bletchley's secrets to the Nazis in order to take revenge on Stalin.
Jericho trails Puck to Scotland and catches up with him just as he is about to be taken on board a U-boat, but Wigram and the police have been trailing them both and the U-boat is bombed and sunk.
A short scene after the War sees Jericho and Hester married with a child on the way. It is implied that Claire, who was revealed to be an agent planted by Wigram, is still missing and unaccounted for. She is, however, spotted by Jericho as he waits on some steps for Hester (though it was possible that this was a hallucination, as she was wearing an evening gown and fur stole).