Cryptonomicon by Neal Stephenson.
A fictional account of the history and mathematics of cryptography, told via two interleaved stories, one based around Bletchley Park and Alan Turing during the war, and another based around early Internet pioneers set in the 1990s. The stories are not just interleaved, but also intertwined. Several of the characters in the modern story are descendants of the characters in the earlier one.
He's gone to some lengths to research and discuss the actual maths, and although it's not important to the understanding of the storyline, it does add a depth which is interesting to me.
(I did an evening class at Aberdeen Uni many years ago, on the subject of cryptography and cryptanalysis. We got homework! A short paragraph of cyphertext which we had to try to decode using the techniques discussed in class.)