The story of this celebrated mathematical problem was also the subject of Singh's first book, "Fermat's Last Theorem". In 1997, he began working on his second book, "The Code Book", a history of codes and codebreaking. As well as explaining the science of codes and describing the impact of cryptography on history, the book also contends that cryptography is more important today than ever before. "The Code Book" has resulted in a return to television for him. He presented "The Science of Secrecy", a five-part series for Channel 4. The stories in the series range from the cipher that sealed the fate of Mary, Queen of Scots, to the coded Zimmermann Telegram that changed the course of the First World War. Other programmes discuss how two great 19th-century geniuses raced to decipher Egyptian hieroglyphs and how modern encryption can guarantee privacy on the Internet.