Skip to main content

Post-quantum (ML-DSA-87 / Falcon) cryptographic tokens — Python client for the Sigvault REST server.

Project description

sigvault

PyPI Python versions Apache-2.0

Python client for Sigvault — post-quantum (ML-DSA-87, Falcon-512/1024) cryptographic tokens over a zero-dependency REST API.

  • Stdlib-only. No requests, no httpx, no compiled wheels. One universal wheel, works on Python 3.8+ everywhere (Linux, macOS, Windows, WASM, Alpine).
  • Talks to qv-server — the same sovereign Node server available as a Docker image at ghcr.io/007krcs/qv-server:4.2.

Install

pip install sigvault

Run the server

docker run -p 7433:7433 \
  -e QV_MASTER_KEY_HEX=$(openssl rand -hex 32) \
  ghcr.io/007krcs/qv-server:4.2

30-second demo

from sigvault import QVClient

qv = QVClient("http://localhost:7433")

key = qv.keygen(label="demo")
iss = qv.issue(
    key_id=key["keyId"],
    claims={"sub": "user-123", "role": "admin"},
    ttl=3600,
)

out = qv.verify(key_id=key["keyId"], token=iss["token"])
assert out["claims"]["sub"] == "user-123"

Error handling

from sigvault import QVClient, QVVerifyError, QVHTTPError

qv = QVClient("http://localhost:7433")
try:
    qv.verify(key_id=key_id, token=tampered_token)
except QVVerifyError as e:
    # Signature / expiry / replay / revocation failure.
    ...
except QVHTTPError as e:
    # Server returned 4xx/5xx for non-verification reasons.
    print(e.status, e.code, e.message)

License

Apache-2.0.

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

sigvault-4.3.1.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

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

sigvault-4.3.1-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file sigvault-4.3.1.tar.gz.

File metadata

  • Download URL: sigvault-4.3.1.tar.gz
  • Upload date:
  • Size: 8.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for sigvault-4.3.1.tar.gz
Algorithm Hash digest
SHA256 e038f72e72867622f1cfce4c1976fb81be780e859185d68cf74fe751e1890b00
MD5 577e4eaa437910ae9415da73fad2451c
BLAKE2b-256 a8edb7937dbb9f04bea28f2578a7cd439da4bdea3c1b960a8dc6258e840101e4

See more details on using hashes here.

File details

Details for the file sigvault-4.3.1-py3-none-any.whl.

File metadata

  • Download URL: sigvault-4.3.1-py3-none-any.whl
  • Upload date:
  • Size: 9.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for sigvault-4.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 15db9772aad54f0520286868553f6ee0375d91945e4478b0eafe4f2455b6a96b
MD5 f75ceb3c6f924eb0395c9a0c644dbb5d
BLAKE2b-256 6927d370ef1bcec8d5465de60fb4610e5cd7506ef522feba8e944105ad996e21

See more details on using hashes here.

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