Cryptographic recipes and primitives used in IVXV.
Project description
pyivxv
A Python3 library for common IVXV operations. IVXV is the codename for the current Estonian internet voting system.
Usage examples:
from pyivxv.crypto.keys import PublicKey
from pyivxv.encoding.message import decode_from_point
pk = PublicKey.from_public_bytes(b"...")
message = "0000.101"
ct = pk.encode_and_encrypt(message, store_ephemeral=True)
unblinded = ct.unblind(pk.H)
decoded = decode_from_point(unblinded, pk.curve).decode()
print("Message:", message)
print("Encryption randomness:", ct.ephemeral_random)
from pyivxv.crypto.keys import generate_private_key
from pyivxv.crypto.zkp import generate_decryption_proof
sk = generate_private_key()
pk = sk.public_key
message = "0000.101"
ct = pk.encode_and_encrypt(message)
M = sk.decrypt(ct)
proof = generate_decryption_proof(M, ct, sk)
proof.verify(M, ct, pk)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyivxv-0.0.1a1.tar.gz
(10.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
pyivxv-0.0.1a1-py3-none-any.whl
(12.0 kB
view details)
File details
Details for the file pyivxv-0.0.1a1.tar.gz.
File metadata
- Download URL: pyivxv-0.0.1a1.tar.gz
- Upload date:
- Size: 10.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1e572ba92c6479b55efb9fec555257557cc140858faa7b9bc974de1b8fd7ce19
|
|
| MD5 |
dd9afd275f6d9af9673e2af3834e5d74
|
|
| BLAKE2b-256 |
3b057e7bf57712972130ff7a29792a1b1e5fcedad35a6f12064ad469966222ab
|
File details
Details for the file pyivxv-0.0.1a1-py3-none-any.whl.
File metadata
- Download URL: pyivxv-0.0.1a1-py3-none-any.whl
- Upload date:
- Size: 12.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
884cf5beb047c0e090a16a578241044e917f6aa89b250122068a0bb044d8ddab
|
|
| MD5 |
987e7508c4fd787c7242a74b0ad5a5fd
|
|
| BLAKE2b-256 |
2d44f528b56b413b8c2e3deda2c994f8d03c1e1e698b2fbcccb8d98bd5f80644
|