If traditional cryptosystems are used, anyone who knows enough to encode a message will also know enough to decode an intercepted message. In 1976, W. Diffie and M. Hellman proposed public key cryptography, which is based on the observation that the encryption and decryption procedures need not have the same key. This removes the requirement that the encoding key be kept secret. The encoding function
must be relatively easy to compute, but
must be extremely difficult to compute without some additional information, so that someone who knows only the encrypting key cannot find the decrypting key without prohibitive computation. It is interesting to note that to date, no system has been proposed that has been proven to be “one-way;” that is, for any existing public key cryptosystem, it has never been shown to be computationally prohibitive to decode messages with only knowledge of the encoding key.
Subsection The RSA Cryptosystem
The
RSA cryptosystem introduced by R. Rivest, A. Shamir, and L. Adleman in 1978, is based on the difficulty of factoring large numbers. Though it is not a difficult task to find two large random primes and multiply them together, factoring a 150-digit number that is the product of two large primes would take 100 million computers operating at 10 million instructions per second about 50 million years under the fastest algorithms available in the early 1990s. Although the algorithms have improved, factoring a number that is a product of two large primes is still computationally prohibitive.
The
RSA cryptosystem works as follows. Suppose that we choose two random 150-digit prime numbers
and
Next, we compute the product
and also compute
where
is the Euler
-function. Now we start choosing random integers
until we find one that is relatively prime to
that is, we choose
such that
Using the Euclidean algorithm, we can find a number
such that
The numbers
and
are now made public.
Suppose now that person B (Bob) wishes to send person A (Alice) a message over a public line. Since
and
are known to everyone, anyone can encode messages. Bob first digitizes the message according to some scheme, say
If necessary, he will break the message into pieces such that each piece is a positive integer less than
Suppose
is one of the pieces. Bob forms the number
and sends
to Alice. For Alice to recover
she need only compute
Only Alice knows
Example 7.5.
Before exploring the theory behind the
RSA cryptosystem or attempting to use large integers, we will use some small integers just to see that the system does indeed work. Suppose that we wish to send some message, which when digitized is
Let
and
Then
We can let
since
The encoded message is computed to be
This computation can be reasonably done by using the method of repeated squares as described in
Chapter 4. Using the Euclidean algorithm, we determine that
therefore, the decrypting key is
We can recover the original message by calculating
Now let us examine why the
RSA cryptosystem works. We know that
hence, there exists a
such that
There are two cases to consider. In the first case assume that
Then by
Theorem 6.18,
So we see that Alice recovers the original message
when she computes
For the other case, assume that
Since
and
we know
is a multiple of
or a multiple of
but not both. We will describe the first possibility only, since the second is entirely similar. There is then an integer
with
and
Note that we have
and that
Then, using
Theorem 6.18, but now mod
So there is an integer
such that
Thus, Alice also recovers the message in this case,
We can now ask how one would go about breaking the
RSA cryptosystem. To find
given
and
we simply need to factor
and solve for
by using the Euclidean algorithm. If we had known that
in
Example 7.5, we could have recovered
Subsection Historical Note
Encrypting secret messages goes as far back as ancient Greece and Rome. As we know, Julius Caesar used a simple shift code to send and receive messages. However, the formal study of encoding and decoding messages probably began with the Arabs in the 1400s. In the fifteenth and sixteenth centuries mathematicians such as Alberti and Viete discovered that monoalphabetic cryptosystems offered no real security. In the 1800s, F. W. Kasiski established methods for breaking ciphers in which a ciphertext letter can represent more than one plaintext letter, if the same key was used several times. This discovery led to the use of cryptosystems with keys that were used only a single time. Cryptography was placed on firm mathematical foundations by such people as W. Friedman and L. Hill in the early part of the twentieth century.
The period after World War I saw the development of special-purpose machines for encrypting and decrypting messages, and mathematicians were very active in cryptography during World War II. Efforts to penetrate the cryptosystems of the Axis nations were organized in England and in the United States by such notable mathematicians as Alan Turing and A. A. Albert. The Allies gained a tremendous advantage in World War II by breaking the ciphers produced by the German Enigma machine and the Japanese Purple ciphers.
By the 1970s, interest in commercial cryptography had begun to take hold. There was a growing need to protect banking transactions, computer data, and electronic mail. In the early 1970s,
IBM developed and implemented
LUZIFER, the forerunner of the National Bureau of Standards’ Data Encryption Standard (DES).
The concept of a public key cryptosystem, due to Diffie and Hellman, is very recent (1976). It was further developed by Rivest, Shamir, and Adleman with the
RSA cryptosystem (1978). It is not known how secure any of these systems are. The trapdoor knapsack cryptosystem, developed by Merkle and Hellman, has been broken. It is still an open question whether or not the
RSA system can be broken. In 1991,
RSA Laboratories published a list of semiprimes (numbers with exactly two prime factors) with a cash prize for whoever was able to provide a factorization (
http://www.emc.com/emc-plus/rsa-labs/historical/the-rsa-challenge-numbers.htm). Although the challenge ended in 2007, many of these numbers have not yet been factored.
There been a great deal of controversy about research in cryptography and cryptography itself. In 1929, when Henry Stimson, Secretary of State under Herbert Hoover, dismissed the Black Chamber (the State Department’s cryptography division) on the ethical grounds that “gentlemen do not read each other’s mail.” During the last two decades of the twentieth century, the National Security Agency wanted to keep information about cryptography secret, whereas the academic community fought for the right to publish basic research. Currently, research in mathematical cryptography and computational number theory is very active, and mathematicians are free to publish their results in these areas.