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.
This is an independent, 3rd party library. It is not developed or endorsed by the Estonian State Electoral Office. The official IVXV repositories can be found at github.com/valimised.
NB! This library should not be used in production settings, see Security for more details.
You can install pyivxv with:
pip install pyivxv
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)
Security
This library is designed for testing and quick scripting, rather than for production use.
This library does not protect against side-channel attacks!
Do not use it to process sensitive data, such as a legitimate vote during an election.
If you do, at a minimum, ensure that no attacker can observe your system during encryption or ciphertext unblinding.
This includes, for example:
- Timing measurements
- Power consumption measurements
- RF emissions measurements
- Running code on the device
Other vulnerabilities may also exist.
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
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 pyivxv-0.0.1a3.tar.gz.
File metadata
- Download URL: pyivxv-0.0.1a3.tar.gz
- Upload date:
- Size: 11.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5e1a213d35cff02ab00adf3e6d829a55916d75a04fc54d01e958b684739ed609
|
|
| MD5 |
7443765583f8b9cc184dcaf6132e8f3f
|
|
| BLAKE2b-256 |
24bd9d0e15831782a944f1d15044bdf152e0d1caf13d9a0b7ccbc019c5d345d3
|
Provenance
The following attestation bundles were made for pyivxv-0.0.1a3.tar.gz:
Publisher:
pypi-publish.yml on takakv/pyivxv
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyivxv-0.0.1a3.tar.gz -
Subject digest:
5e1a213d35cff02ab00adf3e6d829a55916d75a04fc54d01e958b684739ed609 - Sigstore transparency entry: 569776108
- Sigstore integration time:
-
Permalink:
takakv/pyivxv@c70afc08040ba6ea8309f100d8b8defb21b36833 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/takakv
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@c70afc08040ba6ea8309f100d8b8defb21b36833 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file pyivxv-0.0.1a3-py3-none-any.whl.
File metadata
- Download URL: pyivxv-0.0.1a3-py3-none-any.whl
- Upload date:
- Size: 12.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3818b55a5a70b8421fdd3244af21e468ff5857039875683d9b6d0f8207dd6358
|
|
| MD5 |
d0529b9883228385f2c4a67d0c9cf56f
|
|
| BLAKE2b-256 |
fb7603b573e3ee6e9d7a66ea5f9126504b52791e99658b62aca01d91558e80aa
|
Provenance
The following attestation bundles were made for pyivxv-0.0.1a3-py3-none-any.whl:
Publisher:
pypi-publish.yml on takakv/pyivxv
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyivxv-0.0.1a3-py3-none-any.whl -
Subject digest:
3818b55a5a70b8421fdd3244af21e468ff5857039875683d9b6d0f8207dd6358 - Sigstore transparency entry: 569776125
- Sigstore integration time:
-
Permalink:
takakv/pyivxv@c70afc08040ba6ea8309f100d8b8defb21b36833 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/takakv
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@c70afc08040ba6ea8309f100d8b8defb21b36833 -
Trigger Event:
workflow_dispatch
-
Statement type: