Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qzkp-0.1.0.tar.gz (19.9 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

qzkp-0.1.0-cp313-cp313-win_amd64.whl (179.4 kB view details)

Uploaded CPython 3.13Windows x86-64

qzkp-0.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (321.3 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

qzkp-0.1.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (315.8 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ ARM64

qzkp-0.1.0-cp313-cp313-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (552.2 kB view details)

Uploaded CPython 3.13macOS 10.12+ universal2 (ARM64, x86-64)macOS 10.12+ x86-64macOS 11.0+ ARM64

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

Hashes for qzkp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f691df3672bc34a16dae9db90c6109bdc7e683485616d74b86f8a38c5de28a0c
MD5 921099ddfd07526ddbe45420bf3248cb
BLAKE2b-256 3268ddb3ae56e019dc6896e192a4291290da590f74485f1b81502864c3b5241e

See more details on using hashes here.

Provenance

The following attestation bundles were made for qzkp-0.1.0.tar.gz:

Publisher: release.yml on vrag99/QZKP-simulation

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for qzkp-0.1.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 2ca850cb57ed32044375ee89f0a36bf8c5f660abd45361341d3617b9287fb5c9
MD5 7aabb18a38eb92311a039ac0b1c53f20
BLAKE2b-256 8ff1f005e627ccd1b936c4c3abd81ee26be0d3b500c17d0f9bbf15e73cb180d4

See more details on using hashes here.

Provenance

The following attestation bundles were made for qzkp-0.1.0-cp313-cp313-win_amd64.whl:

Publisher: release.yml on vrag99/QZKP-simulation

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file qzkp-0.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for qzkp-0.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 43027f1de1b86d47e8a53bda5e21dd0259918d1a77fc51782818a3c6a7357fcc
MD5 47abdb5295765ff329a5f09ee87b1501
BLAKE2b-256 243c38c720f010a466f32363bf6874520dac6bdbc3254ef2f78b2a89f9b1dfa2

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file qzkp-0.1.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for qzkp-0.1.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 29a02e46c1976adf7bfceb536395f343533657098cca3ffa724784fcee25af74
MD5 80267f29d3632976fbb2620faf051456
BLAKE2b-256 3ce34b9807bb74ae9c985a50bd75b290658606e88785f960b4ba3a0044dc08b3

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

File hashes

Hashes for qzkp-0.1.0-cp313-cp313-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 aeb70cc0f2253dbc609e29d5c8e40d34c8ecde3bb54741d695a3d19414d9d6ca
MD5 f5057b9660a841956f1a3db8c3b19053
BLAKE2b-256 4210b06590a3137c6c8f7f9667343db3819b6c07e7e5b7a51fbb6605e1f95feb

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page