RSA BSAFE Micro Edition Suite

Streamlined security for mobile and embedded devices

Search  Print

Ephemeral Diffie-Hellman

In Ephemeral Diffie-Hellman key exchange, two parties called Alice and Bob agree on a prime p, and a generator g of the field Z* p. This field consists of the set of integers that have no non-trivial factors in common with p. The parties follow this protocol:
  1. Alice selects random number a from the field. This number remains secret for the duration of the key exchange. Alice calculates ga mod p and sends it to Bob (see the Diffie-Hellman Key Exchange diagram below).
  2. Bob selects random number b from the field, calculates gb mod p and sends it to Alice (see the Diffie-Hellman Key Exchange diagram below).
  3. \code \endcode @image html dh_key_exchange.jpg \code \endcode
  4. Alice, knowing g, a and gb mod p, calculates the shared secret (gb)a = gab mod p.
  5. Bob, knowing g, b and ga mod p, calculates the shared secret (ga)b = gab mod p.
Both Alice and Bob now have the same shared secret as the key with which to perform symmetric encryption. Eve, the eavesdropper, knows g, ga and gb, however being unaware of either a or b, is unable to calculate gab from ga and gb.
This difficulty arises from the Diffie-Hellman problem which is based upon the discrete logarithm problem in which x cannot be easily calculated from gx mod p. Ephemeral Diffie-Hellman does not provide authentication, since neither party has guarantees about the entity with which it is communicating.

Copyright (c) 1999-2005 RSA Security Inc. All rights reserved. 072-001001-2100-001-000 - 2.1