That was public-key cryptography. Singh tells us it is ''considered to be the greatest cryptographic achievement since the invention of the monoalphabetic cipher, over 2,000 years ago.'' It is based on the revolutionary idea that it is possible for someone to announce publicly the precise method of coding a message that anyone may wish to send him, while retaining a secret private key for decoding it. Without that key someone who intercepts the message, even knowing how it was coded, would not be able to decipher it. The theory behind this method was published in 1976 by Whitfield Diffie and Martin Hellman, and cryptography has never been the same. One of the surprising features of public-key cryptography was that the apparently purest and least applicable part of mathematics, the theory of numbers, found a practical application.
Number theory deals with properties of ordinary whole numbers.
For example, any whole number raised to the fifth power will always end in the same digit as the original. Such facts seem more like curiosities than of any practical use. He also said, ''The great bulk of higher mathematics is useless,'' citing the theory of numbers in particular. Number theory did seem ''useless,'' but in 1977 three mathematicians at the Massachusetts Institute of Technology, Ronald Rivest, Adi Shamir and Leonard Adleman, came up with an ingenious method, later patented as the RSA algorithm, to turn the Diffie-Hellman concept into a practical system. Singh presents fairly both sides of the continuing conflict between the government's interest in allowing only those codes to be made public that it can decipher, in order to deter criminal activity, and citizens' interest in communicating freely without being snooped on.