Chapter 3 Cryptography 63
Cryptography Overview
Phase 1
Phase 2
Figure 3-12 The Diffie-Hellman Key Agreement Protocol
Parameter Generation
A central authority selects a prime number p of length k bytes, and an integer g greater
than 0 but less than p, called the base. The central authority may optionally select an
integer l, the private-value length in bits, that satisfies 2l1 p.
Phase 1
Each of the two parties executing the Diffie-Hellman protocol does the following:
1. Each party, i, i = 1 or 2, randomly generates a private value, which is a number, xi,
greater than 0 but less than the prime. If the central authority has specified the
length l, the private value shall satisfy 2l1 xi < 2l.
2. Each party computes a public value yi=gxi mod p.
Parameters
Bob
Private value
Public value
Bob
Alice
Private value
Public value
Alice
Phase 1
Phase 2
Agreed upon
key
Agreed upon
key =