10.12.2012 Views

Prime Numbers

Prime Numbers

Prime Numbers

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

388 Chapter 8 THE UBIQUITY OF PRIME NUMBERS<br />

An immediate application of this “one-way” feature of exponentiation is a<br />

cryptographic algorithm so simple that we simply state it in English without<br />

formal exhibition. Say you want individuals to have their own passwords to<br />

allow entry onto a computer system or information channel. A universal prime<br />

p and primitive root g are chosen for the whole system of users. Now each<br />

individual user “thinks up” his or her secret password x, an integer, and<br />

computes h = g x mod p, finally storing his or her h value on the system itself.<br />

Thus for the array of users, there is a stored array of h values on the system.<br />

Now when it is time to gain entry to the system, a user need only type the<br />

“password” x, and the system exponentiates this, comparing the result to that<br />

user’s h. The scheme is all very simple, depending on the difficulty of looking<br />

at an h and inferring what was the password x for that h.<br />

Not quite so obvious, but equally elegant, is the Diffie–Hellman key<br />

exchange scheme, which allows two individuals to create a common encryption<br />

key:<br />

Algorithm 8.1.1 (Diffie–Hellman key exchange). Two individuals, Alice<br />

and Bob, agree on a prime p and a generator g ∈ F ∗ p. This algorithm allows<br />

Alice and Bob to establish a mutual key (mod p), with neither individual being<br />

able (under DL difficulty) to infer each other’s secret key.<br />

1. [Alice generates public key]<br />

Alice chooses random a ∈ [2,p− 2]; // Alice’s secret key.<br />

x = g a mod p; // x is Alice’s public key.<br />

2. [Bob generates public key]<br />

Bob chooses random b ∈ [2,p− 2]; // Bob’s secret key.<br />

y = g b mod p; // y is Bob’s public key.<br />

3. [Each individual creates the same mutual key]<br />

Bob computes k = x b mod p;<br />

Alice computes k = y a mod p; // The two k-values are identical.<br />

This mutual key creation works, of course, because<br />

(g a ) b =(g b ) a = g ab ,<br />

and all of this goes through with the usual reductions (mod p). There are<br />

several important features of this basic Diffie–Hellman key exchange notion.<br />

First, note that in principle Alice and Bob could have avoided random<br />

numbers; choosing instead a memorable phrase, slogan, whatever, and made<br />

those into respective secret values a, b. Second, note that the public keys<br />

g a ,g b mod p can be made public in the sense that—under DL difficulty—it<br />

is safe literally to publish such values to the world. Third, on the issue of<br />

what to do with the mutual key created in the algorithm, actual practical<br />

applications often involve the use of the mutual key to encrypt/decrypt long<br />

messages, say through the expedient of a standard block cipher such as DES<br />

[Schneier 1996]. Though it is easy to break the Diffie–Hellman scheme given a<br />

fast DL method, it is unclear whether the two problems are equivalent. That

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!