Keira Knightley is in talks to star in the indie drama, Imitation Game, opposite Sherlock’s Benedict Cumberbatch.

The drama is based on the book Alan Turing: The Enigma.

The Hollywood Reporter says Morten Tyldum is set to direct the film which is being produced by Black Bear Pictures.

Cumberbatch is lined up to play Alan Turing who was the renowned mathematician and cryptographer based at Bletchley Park during the Second World War where he devised a machine which broke the German’s Enigma code.

Later Turing was prosecuted by the UK government for being a homosexual and he is believed to have committed suicide at the age of 41 in 1954.

Knightley is in talks to play a woman who had a complicated relationship with Turing.