pip install PyCryptoDomex
from elgamal import Elgamal
m = b'Text'
print(m)
pb, pv = Elgamal.newkeys(128)
print(pb)
print(pv)
ct = Elgamal.encrypt(m, pb)
print(ct)
dd = Elgamal.decrypt(ct, pv)
print(dd)
print()
My telegram: https://t.me/sidqdev
By sidq with love
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
elgamal-0.0.3.tar.gz
(2.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file elgamal-0.0.3.tar.gz.
File metadata
- Download URL: elgamal-0.0.3.tar.gz
- Upload date:
- Size: 2.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.3.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a7475f4825a1d76cd2d0c717c78a05f7167ce70f0fd685cfc41e92912061488c
|
|
| MD5 |
464ea85e07ca68f2185acf0666541c4c
|
|
| BLAKE2b-256 |
ed32c13e15a024cce33f00bd145e4a672718fdb568368274610b40b4a18f7884
|
File details
Details for the file elgamal-0.0.3-py3-none-any.whl.
File metadata
- Download URL: elgamal-0.0.3-py3-none-any.whl
- Upload date:
- Size: 3.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.3.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
201d1da92d09f8c98ce0f8c6d414066c26c46d2661e6d69c4f5b82e10dd06625
|
|
| MD5 |
e95c02357882280c0c14fde88054457d
|
|
| BLAKE2b-256 |
4a7892068b128a100bafaf1e08c127f5a3c7910a2c6ddeedf996f3be2b2935c0
|