The mechanisms of encryption and authentication are used to protect the confidentiality and integrity of communication between two or more persons. However, such mechanisms require the existence of shared information at all subscribers. This shared information is referred to as a cryptographic key.
A conventional process for establishing a common key via insecure communication channels is the process of Diffie and Hellman (DH process; see W. Diffie and M. Hellman, New Directions in Cryptography, IEEE Transactions on Information Theory, IT-22(6):644-654, November 1976). The basis of the Diffie-Hellmann key exchange (DH76) is the fact that it is virtually impossible to calculate logarithms modulo a large prime number p. This fact is utilized by Alice and Bob in the example shown below, in that they each secretly choose a number x and y, respectively, smaller than p (and relatively prime to p-1). They then send each other (consecutively or simultaneously) the x-th (and y-th) power of a publicly known number α. From the received powers, they are able to calculate a common key K:=αxy by renewed raising to the power with x and y, respectively. An attacker who sees only αx and αy is unable to calculate K therefrom. (The only presently known method of doing so would involve first calculating the logarithm, e.g., of αx to the base a modulo p, and then raising αy to that power.)
