Buy new:
-37% $11.99$11.99
Delivery Friday, July 26
Ships from: Amazon.com Sold by: Amazon.com
Save with Used - Good
$10.99$10.99
Delivery Friday, July 26
Ships from: Amazon Sold by: Joyful Dreamer LLC
Download the free Kindle app and start reading Kindle books instantly on your smartphone, tablet, or computer - no Kindle device required.
Read instantly on your browser with Kindle for Web.
Using your mobile phone camera - scan the code below and download the Kindle app.
Image Unavailable
Color:
-
-
-
- To view this video download Flash Player
The Code Book: The Science of Secrecy from Ancient Egypt to Quantum Cryptography Paperback – August 29, 2000
Purchase options and add-ons
Throughout the text are clear technical and mathematical explanations, and portraits of the remarkable personalities who wrote and broke the world's most difficult codes. Accessible, compelling, and remarkably far-reaching, this book will forever alter your view of history and what drives it. It will also make you wonder how private that e-mail you just sent really is.
- Print length432 pages
- LanguageEnglish
- PublisherVintage
- Publication dateAugust 29, 2000
- Dimensions5.15 x 0.88 x 7.98 inches
- ISBN-100385495323
- ISBN-13978-0385495325
- Lexile measure1310L
Frequently bought together

Customers who bought this item also bought
Cryptanalysis: A Study of Ciphers and Their Solution (Dover Brain Games)Helen F. GainesPaperback$15.88 shipping
Fermat's Enigma: The Epic Quest to Solve the World's Greatest Mathematical ProblemPaperback$15.38 shippingGet it as soon as Friday, Jul 26Only 1 left in stock - order soon.
Editorial Reviews
Amazon.com Review
Confronted with the prospect of defeat, the Allied cryptanalysts had worked night and day to penetrate German ciphers. It would appear that fear was the main driving force, and that adversity is one of the foundations of successful codebreaking.
In the information age, the fear that drives cryptographic improvements is both capitalistic and libertarian--corporations need encryption to ensure that their secrets don't fall into the hands of competitors and regulators, and ordinary people need encryption to keep their everyday communications private in a free society. Similarly, the battles for greater decryption power come from said competitors and governments wary of insurrection.
The Code Book is an excellent primer for those wishing to understand how the human need for privacy has manifested itself through cryptography. Singh's accessible style and clear explanations of complex algorithms cut through the arcane mathematical details without oversimplifying. --Therese Littleton
Review
"Entertaining and satisfying. . . . Offers a fascinating glimpse into the mostly secret competition between codemakers and codebreakers." --USA Today
"A good read that, bless it, makes the reader feel a bit smarter when it's done. Singh's an elegant writer and well-suited to the task of leading the mathematically perplexed through areas designed to be tricky." --Seattle Weekly
"An absorbing tale of codemaking and codebreaking over the centuries." --Scientific American
"Singh spins tales of cryptic intrigue in every chapter." --The Wall Street Journal
"Brings together...the geniuses who have secured communications, saved lives, and influenced the fate of nations. A pleasure to read." --Chicago Tribune
"Enthralling...commendably lucid...[Singh's] book provides a timely and entertaining summary of the subject." --The Economist
From the Inside Flap
Throughout the text are clear technical and mathematical explanations, and portraits of the remarkable personalities who wrote and broke the world's most difficult codes. Accessible, compelling, and remarkably far-reaching, this book will forever alter your view of history and what drives it. It will also make yo wonder how private that e-mail you just sent really is.
From the Back Cover
Throughout the text are clear technical and mathematical explanations, and portraits of the remarkable personalities who wrote and broke the world's most difficult codes. Accessible, compelling, and remarkably far-reaching, this book will forever alter your view of history and what drives it. It will also make yo wonder how private that e-mail you just sent really is.
About the Author
Excerpt. © Reprinted by permission. All rights reserved.
Mary Queen of Scots was on trial for treason. She had been accused of plotting to assassinate Queen Elizabeth in order to take the English crown for herself. Sir Francis Walsingham, Elizabeth's Principal Secretary, had already arrested the other conspirators, extracted confessions, and executed them. Now he planned to prove that Mary was at the heart of the plot, and was therefore equally culpable and equally deserving of death.
Walsingham knew that before he could have Mary executed, he would have to convince Queen Elizabeth of her guilt. Although Elizabeth despised Mary, she had several reasons for being reluctant to see her put to death. First, Mary was a Scottish queen, and many questioned whether an English court had the authority to execute a foreign head of state. Second, executing Mary might establish an awkward precedent -- if the state is allowed to kill one queen, then perhaps rebels might have fewer reservations about killing another, namely Elizabeth. Third, Elizabeth and Mary were cousins, and their blood tie made Elizabeth all the more squeamish about ordering her execution. In short, Elizabeth would sanction Mary's execution only if Walsingham could prove beyond any hint of doubt that she had been part of the assassination plot.
The conspirators were a group of young English Catholic noblemen intent on removing Elizabeth, a Protestant, and replacing her with Mary, a fellow Catholic. It was apparent to the court that Mary was a figurehead for the conspirators, but it was not clear that she had actually given her blessing to the conspiracy. In fact, Mary had authorised the plot. The challenge for Walsingham was to demonstrate a palpable link between Mary and the plotters.
On the morning of her trial, Mary sat alone in the dock, dressed in sorrowful black velvet. In cases of treason, the accused was forbidden counsel and was not permitted to call witnesses. Mary was not even allowed secretaries to help her prepare her case. However, her plight was not hopeless because she had been careful to ensure that all her correspondence with the conspirators had been written in cipher. The cipher turned her words into a meaningless series of symbols, and Mary believed that even if Walsingham had captured the letters, then he could have no idea of the meaning of the words within them. If their contents were a mystery, then the letters could not be used as evidence against her. However, this all depended on the assumption that her cipher had not been broken.
Unfortunately for Mary, Walsingham was not merely Principal Secretary, he was also England's spymaster. He had intercepted Mary's letters to the plotters, and he knew exactly who might be capable of deciphering them. Thomas Phelippes was the nation's foremost expert on breaking codes, and for years he had been deciphering the messages of those who plotted against Queen Elizabeth, thereby providing the evidence needed to condemn them. If he could decipher the incriminating letters between Mary and the conspirators, then her death would be inevitable. On the other hand, if Mary's cipher was strong enough to conceal her secrets, then there was a chance that she might survive. Not for the first time, a life hung on the strength of a cipher.
The Evolution of Secret Writing
Some of the earliest accounts of secret writing date back to Herodotus, 'the father of history' according to the Roman philosopher and statesman Cicero. In The Histories, Herodotus chronicled the conflicts between Greece and Persia in the fifth century bc, which he viewed as a confrontation between freedom and slavery, between the independent Greek states and the oppressive Persians. According to Herodotus, it was the art of secret writing that saved Greece from being conquered by Xerxes, King of Kings, the despotic leader of the Persians.
The long-running feud between Greece and Persia reached a crisis soon after Xerxes began constructing a city at Persepolis, the new capital for his kingdom. Tributes and gifts arrived from all over the empire and neighbouring states, with the notable exceptions of Athens and Sparta. Determined to avenge this insolence, Xerxes began mobilising a force, declaring that 'we shall extend the empire of Persia such that its boundaries will be God's own sky, so the sun will not look down upon any land beyond the boundaries of what is our own'. He spent the next five years secretly assembling the greatest fighting force in history, and then, in 480 bc, he was ready to launch a surprise attack.
However, the Persian military build-up had been witnessed by Demaratus, a Greek who had been expelled from his homeland and who lived in the Persian city of Susa. Despite being exiled he still felt some loyalty to Greece, so he decided to send a message to warn the Spartans of Xerxes' invasion plan. The challenge was how to dispatch the message without it being intercepted by the Persian guards. Herodotus wrote:
As the danger of discovery was great, there was only one way in which he could contrive to get the message through: this was by scraping the wax off a pair of wooden folding tablets, writing on the wood underneath what Xerxes intended to do, and then covering the message over with wax again. In this way the tablets, being apparently blank, would cause no trouble with the guards along the road. When the message reached its destination, no one was able to guess the secret, until, as I understand, Cleomenes' daughter Gorgo, who was the wife of Leonides, divined and told the others that if they scraped the wax off, they would find something written on the wood underneath. This was done; the message was revealed and read, and afterwards passed on to the other Greeks.
As a result of this warning, the hitherto defenceless Greeks began to arm themselves. Profits from the state-owned silver mines, which were usually shared among the citizens, were instead diverted to the navy for the construction of two hundred warships.
Xerxes had lost the vital element of surprise and, on 23 September 480 bc, when the Persian fleet approached the Bay of Salamis near Athens, the Greeks were prepared. Although Xerxes believed he had trapped the Greek navy, the Greeks were deliberately enticing the Persian ships to enter the bay. The Greeks knew that their ships, smaller and fewer in number, would have been destroyed in the open sea, but they realised that within the confines of the bay they might outmanoeuvre the Persians. As the wind changed direction the Persians found themselves being blown into the bay, forced into an engagement on Greek terms. The Persian princess Artemisia became surrounded on three sides and attempted to head back out to sea, only to ram one of her own ships. Panic ensued, more Persian ships collided and the Greeks launched a full-blooded onslaught. Within a day, the formidable forces of Persia had been humbled.
Demaratus' strategy for secret communication relied on simply hiding the message. Herodotus also recounted another incident in which concealment was sufficient to secure the safe passage of a message. He chronicled the story of Histaiaeus, who wanted to encourage Aristagoras of Miletus to revolt against the Persian king. To convey his instructions securely, Histaiaeus shaved the head of his messenger, wrote the message on his scalp, and then waited for the hair to regrow. This was clearly a period of history that tolerated a certain lack of urgency. The messenger, apparently carrying nothing contentious, could travel without being harassed. Upon arriving at his destination he then shaved his head and pointed it at the intended recipient.
Secret communication achieved by hiding the existence of a message is known as steganography, derived from the Greek words steganos, meaning 'covered', and graphein, meaning 'to write'. In the two thousand years since Herodotus, various forms of steganography have been used throughout the world. For example, the ancient Chinese wrote messages on fine silk, which was then scrunched into a tiny ball and covered in wax. The messenger would then swallow the ball of wax. In the fifteenth century, the Italian scientist Giovanni Porta described how to conceal a message within a hard-boiled egg by making an ink from a mixture of one ounce of alum and a pint of vinegar, and then using it to write on the shell. The solution penetrates the porous shell, and leaves a message on the surface of the hardened egg albumen, which can be read only when the shell is removed. Steganography also includes the practice of writing in invisible ink. As far back as the first century ad, Pliny the Elder explained how the 'milk' of the thithymallus plant could be used as an invisible ink. Although transparent after drying, gentle heating chars the ink and turns it brown. Many organic fluids behave in a similar way, because they are rich in carbon and therefore char easily. Indeed, it is not unknown for modern spies who have run out of standard-issue invisible ink to improvise by using their own urine.
The longevity of steganography illustrates that it certainly offers a modicum of security, but it suffers from a fundamental weakness. If the messenger is searched and the message is discovered, then the contents of the secret communication are revealed at once. Interception of the message immediately compromises all security. A thorough guard might routinely search any person crossing a border, scraping any wax tablets, heating blank sheets of paper, shelling boiled eggs, shaving people's heads, and so on, and inevitably there will be occasions when the message is uncovered.
Hence, in parallel with the development of steganography, there was the evolution of cryptography, derived from the Greek word kryptos, meaning 'hidden'. The aim of cryptography is not to hide the existence of a message, but rather to hide its meaning, a process known as encryption. To render a message unintelligible, it is scrambled according to a particular protocol which is agreed beforehand between the sender and the intended recipient. Thus the recipient can reverse the scrambling protocol and make the message comprehensible. The advantage of cryptography is that if the enemy intercepts an encrypted message, then the message is unreadable. Without knowing the scrambling protocol, the enemy should find it difficult, if not impossible, to recreate the original message from the encrypted text.
Although cryptography and steganography are independent, it is possible to both scramble and hide a message to maximise security. For example, the microdot is a form of steganography that became popular during the Second World War. German agents in Latin America would photographically shrink a page of text down to a dot less than 1 millimetre in diameter, and then hide this microdot on top of a full stop in an apparently innocuous letter. The first microdot to be spotted by the FBI was in 1941, following a tip-off that the Americans should look for a tiny gleam from the surface of a letter, indicative of smooth film. Thereafter, the Americans could read the contents of most intercepted microdots, except when the German agents had taken the extra precaution of scrambling their message before reducing it. In such cases of cryptography combined with steganography, the Americans were sometimes able to intercept and block communications, but they were prevented from gaining any new information about German spying activity. Of the two branches of secret communication, cryptography is the more powerful because of this ability to prevent information from falling into enemy hands.
In turn, cryptography itself can be divided into two branches, known as transposition and substitution. In transposition, the letters of the message are simply rearranged, effectively generating an anagram. For very short messages, such as a single word, this method is relatively insecure because there are only a limited number of ways of rearranging a handful of letters. For example, three letters can be arranged in only six different ways, e.g. cow, cwo, ocw, owc, wco, woc. However, as the number of letters gradually increases, the number of possible arrangements rapidly explodes, making it impossible to get back to the original message unless the exact scrambling process is known. For example, consider this short sentence. It contains just 35 letters, and yet there are more than 50,000,000,000,000,000,000,000,000,000,000 distinct arrangements of them. If one person could check one arrangement per second, and if all the people in the world worked night and day, it would still take more than a thousand times the lifetime of the universe to check all the arrangements.
Product details
- Publisher : Vintage; Reprint edition (August 29, 2000)
- Language : English
- Paperback : 432 pages
- ISBN-10 : 0385495323
- ISBN-13 : 978-0385495325
- Lexile measure : 1310L
- Item Weight : 2.31 pounds
- Dimensions : 5.15 x 0.88 x 7.98 inches
- Best Sellers Rank: #47,157 in Books (See Top 100 in Books)
- #5 in Web Encryption
- #48 in Linguistics Reference
- #157 in History & Philosophy of Science (Books)
- Customer Reviews:
About the author

Simon Singh is a science journalist and TV producer. Having completed his PhD at Cambridge he worked from 1991 to 1997 at the BBC producing Tomorrow's World and co-directing the BAFTA award-winning documentary Fermat's Last Theorem for the Horizon series. He is the author of Fermat's Last Theorem, which was a no 1 bestseller in Britain and translated into 22 languages. In 1999, he wrote The Code Book which was also an international bestseller and the basis for the Channel 4 series The Science of Secrecy.
Customer reviews
Customer Reviews, including Product Star Ratings help customers to learn more about the product and decide whether it is the right product for them.
To calculate the overall star rating and percentage breakdown by star, we don’t use a simple average. Instead, our system considers things like how recent a review is and if the reviewer bought the item on Amazon. It also analyzed reviews to verify trustworthiness.
Learn more how customers reviews work on AmazonCustomers say
Customers find the book engaging, accessible, and fun. They also say it offers a rock-solid foundation for those new to cryptology. Readers also appreciate the historical overview and well-illustrated examples.
AI-generated from the text of customer reviews
Customers find the book engagingly written, worth any reader's time, and easy to understand for the average layman. They also describe it as a fantastic primer and historical perspective on cryptoanalysis. Readers also mention that the logic is clear and simple to latch on to.
"...The book is written for a general audience, but also contains a lot of somewhat technical information, but is not so mathematical as to be..." Read more
"...The Code Book is extremely well written and after finishing it you really do feel like you learned something...." Read more
"...This is a popular science book aimed at general readers, so the text is accessible and isn’t bogged down with incomprehensible mathematical jargon...." Read more
"...about any reader and the analysis of the logic is clear and simple to latch on to, even as it delves into some deeper details...." Read more
Customers find the book's content interesting, well-written, and fascinating. They also appreciate the author's immense research and up-to-date topics. Readers also mention that the book provides enough background and a cipher challenge at the end.
"...many others in the area of codes and ciphers in that it discusses very up to date topics (at least up to 1999 when the book was written), such as..." Read more
"...Some other great aspects of this book are a Cipher Challenge at the end which allows you to test your codebreaking skills as well as multiple..." Read more
"...The Code Book is a fascinating mix of cryptographic history and practical knowledge on how ciphers are created and cracked...." Read more
"...reading this book purely for leisure as the storytelling and content is extremely interesting and captivating even for someone not particularly..." Read more
Reviews with images
-
Top reviews
Top reviews from the United States
There was a problem filtering reviews right now. Please try again later.
What is in the book –
The book goes beyond many others in the area of codes and ciphers in that it discusses very up to date topics (at least up to 1999 when the book was written), such as the ciphers being used for Internet transactions and questions of privacy and code breaking. The book also covers material on the deciphering of hieroglyphics and Linear-B, which are not covered in other books on codes. I found the sections on the techniques used to decipher messages enciphered with a Vigenére table and the algorithms employed by the DES and RSA systems to be very clear and enlightening. The book contains information on the Enigma machine and the work at Bletchley Park in Britain to decipher the messages sent on it. However, this material is not as detailed as the material in books such as Budainsky’s “Battle of Wits”, Kahn’s “Seizing the Enigma” or Sebag-Montefiore’s “The Battle for the Code”, so if this is your primary interest I would direct you to these sources. However, if your interest is more general then I think that “The Code Book” is an excellent choice.
Some other great aspects of this book are a Cipher Challenge at the end which allows you to test your codebreaking skills as well as multiple appendices for those who want to go even deeper into the technical areas of ciphers and encryption.
My only complaint about this book is that it's aging. It was written in 1999, and the world of computing has changed a lot from 1999-2018. But don't let this fact deter you from reading The Code Book. The historical cipher/encryption knowledge that you learn about in the World Wars and the dawn of computing are very interesting. Even if you only want to focus on the modern aspects of encryption, I still recommend reading this book and then picking up something more modern after.
Every time someone writes a book about cryptography for the general reader, some fundamentals must be covered. First of all, the author must explain how a simple alphabetic substitution cipher works (each letter in the alphabet is substituted for another). Then, the writer must explain how to solve such a cipher using frequency analysis (the most commonly used letter in the ciphertext, for example, is likely to represent E, the most common letter in the English alphabet, and so on). Anyone with an interest in cryptography already knows about these elementary matters, but they must be included in order to lay the foundation for the discussion and to educate newcomers to the subject. It’s no small feat that Singh manages to explain these basics in an articulate way that novices can understand but won’t bore the pants off those who already know what he’s talking about.
The Code Book is a fascinating mix of cryptographic history and practical knowledge on how ciphers are created and cracked. Singh doesn’t just talk about how ciphers were used in the past and show you some examples. He really gives you an understanding of how each cipher works and the motivation behind its development. There’s an entire chapter, for example, on the Nazis’ World War II code machine named Enigma. The reader comes away with a pretty thorough understanding of that mechanism’s cryptographic process. This is followed by another chapter about how the Allies cracked the Enigma cipher. From there, Singh goes into digital cryptography. To some extent, computer-generated ciphers are too complex for the unaided human mind to unravel, but Singh still does a great job of explaining the methods and mathematics behind today’s digital encryption. Finally, Singh moves into quantum cryptography and quantum computing. In order to discuss these topics, he has to give the reader a nutshell overview of quantum mechanics, which he manages to do quite eloquently.
Singh goes off on some digressions that feel unnecessary. In the first chapter, I don’t think I needed a complete biography of Mary Queen of Scots to figure out how her cipher worked, and the discussion of cryptography really got lost amid all the historical context. Singh also spends half a chapter on the decipherment of ancient languages, such as Egyptian hieroglyphics and Linear B. While I’m interested in that subject, it feels out of place here because it ventures more into linguistics than cryptography.
The Code Book was published in 1999, so it only covers the history of cryptography up to that point. A lot has happened since then. Singh writes about identity theft and personal data leaks as if they were events bound to happen in the future, not the common occurrences of today. Although he covers the initial scientific investigations into quantum computing, further developments have occurred in the past two decades. This is a history book, after all, and the present never stays the present forever. As a historical summary of cryptography up to the year 2000, it’s hard to imagine a better one-volume treatment than this.
Top reviews from other countries
The printing of the book was also in some areas rather poor, missing text on pages. As seen on the picture.
I liked the book and the writer is sometimes funny and very informative. Just wishing printing quality would be better and updated to 2024!
Reviewed in Sweden on May 13, 2024
The printing of the book was also in some areas rather poor, missing text on pages. As seen on the picture.
I liked the book and the writer is sometimes funny and very informative. Just wishing printing quality would be better and updated to 2024!
Si bien es verdad que no es un libro académico y no te puedes esperar el grandes análisis en profundidad.
Doch im selben Maß, wie die Verschlüsselung immer sicherer wurde, wurden auch immer ausgefeiltere Verfahren zum Entschlüsseln entwickelt. Schließlich hingen oft genug politische oder militärische Siege bzw Niederlagen und damit Menschenleben, oder zumindest wirtschaftliche Erfolge davon ab, zu wissen, was der Gegner plant, und zu verhindern, dass die eigenen Pläne ausgespäht werden.
Dieses Buch folgt dem Gang der Geschichte und beschreibt den spannenden Wettlauf zwischen Code-Erfindern und Code-Knackern – von Caesar über Mary Stuart und die Helden von Bletchley Park bis zum Internet-Zeitalter.
Dabei wird nicht nur die dahinterstehende Mathematik allgemein verständlich erklärt. Der Autor schildert auch die Umstände, die zu der einen oder anderen Entdeckung führten und holt die Persönlichkeiten vor den Vorhang, die für wegweisende Entwicklungen in diesem Bereich verantwortlich waren.
Abgerundet wird das Ganze durch eine Sammlung von verschlüsselten Texten, an denen die Leser selbst ihre Dechiffrierfähigkeiten erproben können.
Trotz der teilweise anspruchsvollen Konzepte, die hier vorgestellt werden, ist das Buch flott lesbar und unterhaltsam. Es regt aber auch dazu an, sich noch weiter mit den hier präsentierten Ideen auseinander zu setzen und zeigt, welch umfangreiche Fähigkeiten und vor allem welche Kreativität erforderlich sind, um im Bereich der Ver- und Entschlüsselung erfolgreich zu sein.
Das einzige kleine Manko, für das man natürlich niemandem einen Vorwurf machen darf, besteht darin, dass das Buch eben schon über 20 Jahre alt und daher nicht auf dem allerneusten Stand ist. Soweit ich das beurteilen kann, hat es jedoch auch hinsichtlich des Inhalts des letzten Kapitels (Quantencomputer und Quantenkryptografie) seither keine wirklich umwälzenden Neuerungen gegeben.
















