Movatterモバイル変換


[0]ホーム

URL:


TOPICS
SearchClose
Search

Diffie-Hellman Protocol


The Diffie-Hellman protocol is a method for two computer users to generate a shared private key with which they can then exchange information across an insecure channel. Let the users be named Alice and Bob. First, they agree on two prime numbersg andp, wherep is large (typically at least 512 bits) andg is aprimitive root modulop. (In practice, it is a good idea to choosep such that(p-1)/2 is also prime.) The numbersg andp need not be kept secret from other users. Now Alice chooses a large random numbera as her private key and Bob similarly chooses a large numberb. Alice then computesA=g^a (mod p), which she sends to Bob, and Bob computesB=g^b (mod p), which he sends to Alice.

Now both Alice and Bob compute their shared keyK=g^(ab) (mod p), which Alice computes as

 K=B^a (mod p)=(g^b)^a (mod p)

and Bob computes as

 K=A^b (mod p)=(g^a)^b (mod p).

Alice and Bob can now use their shared keyK to exchange information without worrying about other users obtaining this information. In order for a potential eavesdropper (Eve) to do so, she would first need to obtainK=g^(ab) (mod p) knowing onlyg,p,A=g^a (mod p) andB=g^b (mod p).

This can be done by computinga fromA=g^a (mod p) orb fromB=g^b (mod p). This is thediscrete logarithm problem, which is computationally infeasible for largep. Computing the discrete logarithm of a number modulop takes roughly the same amount of time as factoring the product of two primes the same size asp, which is what the security of the RSA cryptosystem relies on. Thus, the Diffie-Hellman protocol is roughly as secure as RSA.


See also

Cryptography,Public-KeyCryptography,RSA Encryption

This entry contributed byDavid Terr

Explore with Wolfram|Alpha

References

Diffie, W. and Hellman, M. "New Directions in Cryptography."IEEE Trans. Info. Th.22, 644-654, 1976.Hershey, J. E.Cryptography Demystified. New York: McGraw-Hill, pp. 162-166, 2003.Schneier, BApplied Cryptography: Protocols, Algorithms, and Source Code in C, 2nd ed. New York: Wiley, pp. 513-516, 1996.

Referenced on Wolfram|Alpha

Diffie-Hellman Protocol

Cite this as:

Terr, David. "Diffie-Hellman Protocol." FromMathWorld--A Wolfram Resource, created byEric W. Weisstein.https://mathworld.wolfram.com/Diffie-HellmanProtocol.html

Subject classifications

Created, developed and nurtured by Eric Weisstein at Wolfram Research

[8]ページ先頭

©2009-2025 Movatter.jp