Quantum Zero-Knowledge Proof protocol with BB84 simulation and Aadhaar integration (Rust-powered)
Project description
qzkp
Quantum Zero-Knowledge Proof protocol with BB84 simulation and Aadhaar identity verification -- powered by Rust.
Install
pip install qzkp
Quick start
from qzkp import QZKPProtocol, QAadhaarProtocol, ServiceProvider, BB84QKD
# QZKP proof: same secret => valid
proto = QZKPProtocol("shared_secret", "shared_secret", 32, 0.025)
result = proto.run_protocol()
print(result["verification_status"]) # True
print(result["qber"]) # ~0.02-0.09
# QZKP proof: different secrets => invalid
proto2 = QZKPProtocol("secret_a", "secret_b", 32, 0.025)
result2 = proto2.run_protocol()
print(result2["verification_status"]) # False
# Aadhaar authentication
aadhaar = QAadhaarProtocol(
aadhaar_id="1234-5678-9012",
master_secret="my_secret",
attributes={"name": "Alice", "age": "25"},
)
challenge = aadhaar.request_authentication("Gov Portal", "identity_verification")
proof, qzkp_result = aadhaar.generate_proof(challenge)
verifier = ServiceProvider("Gov Portal")
print(verifier.verify_proof(proof)) # True
# BB84 key distribution
bb84 = BB84QKD(100, 0.02)
keys = bb84.generate_key()
print(keys["error_rate"]) # < 0.11
Reproducibility
All methods accept an optional seed parameter for deterministic results:
result = proto.run_protocol(seed=42)
License
MIT
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 Distributions
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 qzkp-0.1.0.tar.gz.
File metadata
- Download URL: qzkp-0.1.0.tar.gz
- Upload date:
- Size: 19.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f691df3672bc34a16dae9db90c6109bdc7e683485616d74b86f8a38c5de28a0c
|
|
| MD5 |
921099ddfd07526ddbe45420bf3248cb
|
|
| BLAKE2b-256 |
3268ddb3ae56e019dc6896e192a4291290da590f74485f1b81502864c3b5241e
|
Provenance
The following attestation bundles were made for qzkp-0.1.0.tar.gz:
Publisher:
release.yml on vrag99/QZKP-simulation
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
qzkp-0.1.0.tar.gz -
Subject digest:
f691df3672bc34a16dae9db90c6109bdc7e683485616d74b86f8a38c5de28a0c - Sigstore transparency entry: 1573615748
- Sigstore integration time:
-
Permalink:
vrag99/QZKP-simulation@0197812a3b1e89f66ddce7ebfd4471f9dd919295 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/vrag99
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0197812a3b1e89f66ddce7ebfd4471f9dd919295 -
Trigger Event:
push
-
Statement type:
File details
Details for the file qzkp-0.1.0-cp313-cp313-win_amd64.whl.
File metadata
- Download URL: qzkp-0.1.0-cp313-cp313-win_amd64.whl
- Upload date:
- Size: 179.4 kB
- Tags: CPython 3.13, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2ca850cb57ed32044375ee89f0a36bf8c5f660abd45361341d3617b9287fb5c9
|
|
| MD5 |
7aabb18a38eb92311a039ac0b1c53f20
|
|
| BLAKE2b-256 |
8ff1f005e627ccd1b936c4c3abd81ee26be0d3b500c17d0f9bbf15e73cb180d4
|
Provenance
The following attestation bundles were made for qzkp-0.1.0-cp313-cp313-win_amd64.whl:
Publisher:
release.yml on vrag99/QZKP-simulation
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
qzkp-0.1.0-cp313-cp313-win_amd64.whl -
Subject digest:
2ca850cb57ed32044375ee89f0a36bf8c5f660abd45361341d3617b9287fb5c9 - Sigstore transparency entry: 1573615825
- Sigstore integration time:
-
Permalink:
vrag99/QZKP-simulation@0197812a3b1e89f66ddce7ebfd4471f9dd919295 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/vrag99
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0197812a3b1e89f66ddce7ebfd4471f9dd919295 -
Trigger Event:
push
-
Statement type:
File details
Details for the file qzkp-0.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: qzkp-0.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 321.3 kB
- Tags: CPython 3.13, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
43027f1de1b86d47e8a53bda5e21dd0259918d1a77fc51782818a3c6a7357fcc
|
|
| MD5 |
47abdb5295765ff329a5f09ee87b1501
|
|
| BLAKE2b-256 |
243c38c720f010a466f32363bf6874520dac6bdbc3254ef2f78b2a89f9b1dfa2
|
Provenance
The following attestation bundles were made for qzkp-0.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
release.yml on vrag99/QZKP-simulation
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
qzkp-0.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
43027f1de1b86d47e8a53bda5e21dd0259918d1a77fc51782818a3c6a7357fcc - Sigstore transparency entry: 1573615791
- Sigstore integration time:
-
Permalink:
vrag99/QZKP-simulation@0197812a3b1e89f66ddce7ebfd4471f9dd919295 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/vrag99
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0197812a3b1e89f66ddce7ebfd4471f9dd919295 -
Trigger Event:
push
-
Statement type:
File details
Details for the file qzkp-0.1.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: qzkp-0.1.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 315.8 kB
- Tags: CPython 3.13, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
29a02e46c1976adf7bfceb536395f343533657098cca3ffa724784fcee25af74
|
|
| MD5 |
80267f29d3632976fbb2620faf051456
|
|
| BLAKE2b-256 |
3ce34b9807bb74ae9c985a50bd75b290658606e88785f960b4ba3a0044dc08b3
|
Provenance
The following attestation bundles were made for qzkp-0.1.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:
Publisher:
release.yml on vrag99/QZKP-simulation
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
qzkp-0.1.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl -
Subject digest:
29a02e46c1976adf7bfceb536395f343533657098cca3ffa724784fcee25af74 - Sigstore transparency entry: 1573615877
- Sigstore integration time:
-
Permalink:
vrag99/QZKP-simulation@0197812a3b1e89f66ddce7ebfd4471f9dd919295 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/vrag99
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0197812a3b1e89f66ddce7ebfd4471f9dd919295 -
Trigger Event:
push
-
Statement type:
File details
Details for the file qzkp-0.1.0-cp313-cp313-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.
File metadata
- Download URL: qzkp-0.1.0-cp313-cp313-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
- Upload date:
- Size: 552.2 kB
- Tags: CPython 3.13, macOS 10.12+ universal2 (ARM64, x86-64), macOS 10.12+ x86-64, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aeb70cc0f2253dbc609e29d5c8e40d34c8ecde3bb54741d695a3d19414d9d6ca
|
|
| MD5 |
f5057b9660a841956f1a3db8c3b19053
|
|
| BLAKE2b-256 |
4210b06590a3137c6c8f7f9667343db3819b6c07e7e5b7a51fbb6605e1f95feb
|
Provenance
The following attestation bundles were made for qzkp-0.1.0-cp313-cp313-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl:
Publisher:
release.yml on vrag99/QZKP-simulation
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
qzkp-0.1.0-cp313-cp313-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl -
Subject digest:
aeb70cc0f2253dbc609e29d5c8e40d34c8ecde3bb54741d695a3d19414d9d6ca - Sigstore transparency entry: 1573615910
- Sigstore integration time:
-
Permalink:
vrag99/QZKP-simulation@0197812a3b1e89f66ddce7ebfd4471f9dd919295 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/vrag99
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0197812a3b1e89f66ddce7ebfd4471f9dd919295 -
Trigger Event:
push
-
Statement type: