pyDH
Pure Python Implementation of Diffie-Hellman Key Exchange. Py2, Py3, PyPy compatible.
Example
To use as a library:
import pyDH
d1 = pyDH.DiffieHellman()
d2 = pyDH.DiffieHellman()
d1_pubkey = d1.gen_public_key()
d2_pubkey = d2.gen_public_key()
d1_sharedkey = d1.gen_shared_key(d2_pubkey)
d2_sharedkey = d2.gen_shared_key(d1_pubkey)
d1_sharedkey == d2_sharedkey
By default it uses the group 14 (2048 bit). To use another group (e.g., 15):
d1 = pyDH.DiffieHellman(15) #or pyDH.DiffieHellman(group=15)
Installation
To install pyDH, simply:
$ pip install pyDH
Release files for pyDH 0.1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pyDH-0.1.6.tar.gz | 4.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyDH-0.1.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.5 kB
Release files / pyDH-0.1.6.tar.gz
| Download URL | pyDH-0.1.6.tar.gz |
|---|---|
| Size | 4.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
748ba74bc5e60066c05ef0047f71e8c4ab88e44c20622bdbfa9ab73a7f9e47d3
|
|
BLAKE2b-256 checksum How to use checksums |
fe2410c3d959bf093592e11badb32850fc1271ea01d018ebe1067e507182b097
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.1 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.9.1
|
Release files / pyDH-0.1.6-py3-none-any.whl
| Download URL | pyDH-0.1.6-py3-none-any.whl |
|---|---|
| Size | 8.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
45ef1010a93555a0ffd2979841bc4d0d411c9f5b09418d1ae84ee27f255ec1e2
|
|
BLAKE2b-256 checksum How to use checksums |
3a3bff8929cce916915378c5f0db73d9fb62aa54bdd4ea8add7b9ad024f092f6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.1 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.9.1
|