Elizebeth was able to crack codes significantly more devilish than this. Ones in which the letters had been shifted in a variety of complex ways, sometimes defined by tables in books that the code-breakers had to reverse engineer using only the encrypted output and brainpower.

Even after World War One, her abilities were in high demand, explains Fagone. Having left Riverbank with her new husband, she continued to unravel encrypted messages. But this time they were ones penned by criminals. Among the crooks she helped put behind bars were members of Al Capone’s gang.

“Elizebeth was repeatedly called in to fix messes that nobody else could fix – she was a secret weapon for hire,” says Fagone. “Her skills were so unusual that she became indispensable.”

Elizebeth Friedman, above, helped the US decode many enemy messages (Credit: SPL)

And thanks to papers recently declassified, it is now known that during World War Two Elizebeth helped to smash a network of Nazi spies trying to foment fascist revolutions in South America – their ultimate goal being an attack on the US. Many of these spies were arrested as a direct consequence of her and her team’s work at the US Coastguard. However, for decades J Edgar Hoover and the FBI claimed more or less all the credit for this achievement. Elizebeth, sworn to secrecy and uninterested in publicity, stayed quiet.

When she first entered the world of code-breaking, Elizebeth really was one of very few women in the world doing such a job. But by World War Two things had moved on. Liza Mundy, author of another new book, Code Girls: The Untold Story of the American Women Code Breakers of World War II, explains that the US Navy and Army both hired thousands of women to help in code-breaking operations.

“Young women majoring in math, science or languages got secret letters inviting them to interview at Wellesley College – it was an astronomy professor who sent the letters,” says Mundy.

“She asked them if they liked to do crossword puzzles and if they were engaged to be married.”