Threshold ElGamal cryptosystem.
Project description
Threshold ElGamal cryptosystem
Library that provides functions for encryption, decrpytion and DKG algorithm using the ElGamal cryptosystem.
Installation
pip install threshold-elgamal
Getting started
The simplest way you can test out this library is by running its main function:
from threshold_elgamal import run_tc_scheme
res = run_tc_scheme(3, 5, m=10)
if res is True:
print("Success!")
You can also create your own threshold scheme manually, and then encrypt and decrypt a message of your choosing:
from threshold_elgamal import create_tc_scheme
public_key, players, scheme = create_tc_scheme(3, 5)
c1, c2 = scheme.encrypt(public_key, message=10)
decryption_shares = {player.id: player.get_decryption_share(c1) for player in players}
decrypted_msg = scheme.decrypt(c2, decryption_shares)
if decrypted_msg == 10:
print("Success!")
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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 threshold_elgamal-0.0.10.tar.gz.
File metadata
- Download URL: threshold_elgamal-0.0.10.tar.gz
- Upload date:
- Size: 11.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.8.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
582beb5178cde2002e12932ab336838daef7cfa6b7d278688e2a129ee31eab87
|
|
| MD5 |
860d79442c4391abb84fbcbfb973c258
|
|
| BLAKE2b-256 |
ba715435af6d3e2f2f46cb4b36a087fa4b251aa4a1826ff3edc8b83902dfc729
|
File details
Details for the file threshold_elgamal-0.0.10-py3-none-any.whl.
File metadata
- Download URL: threshold_elgamal-0.0.10-py3-none-any.whl
- Upload date:
- Size: 24.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.8.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f1ac5edc85df64a8d835a0c7d78af26daeb0e97d656e8cccf812eb572f7c55f4
|
|
| MD5 |
da578b49a4385e671e703e5849693447
|
|
| BLAKE2b-256 |
0a27ef8f8bfe1e20fdc81fc6503b222a3473ba5b027935d189ca139e913af51e
|