Skip to content

Example Diffie-Hellman key exchange class in Python

Notifications You must be signed in to change notification settings

r0fls/Diffie-Hellman

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

Diffie-Hellman

Example Diffie-Hellman key exchange class in Python

This relies on the difficulty of factoring the discrete logarithm. That is, it is difficult to solve for x in this equation:

ax mod p

particularly when p, a and x are large.

To use the example, fork or clone the repo and run it:

git clone https://github.com/r0fls/Diffie-Hellman.git
cd Diffie-Hellman
python dh.py

It takes about a minute to run on my machine. In reality this type of encryption is outdated, but it was apparently the first public key exchange, and helped as an example for others.

About

Example Diffie-Hellman key exchange class in Python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages