Skip to main content

QIDS — Quantum Digital Signatures Python SDK

PyPI version Python versions License: Proprietary

Quantum Digital Signatures (QDS) & Post-Quantum Security Platform

qids is the official Python SDK for integrating Quantum Digital Signatures into banking transactions, enterprise document signing, and post-quantum zero-trust infrastructure.


What is QIDS?

QIDS signs documents with one-time universal hashing (OTUH), a quantum digital signature scheme. Its forgery bound (about 10⁻³⁷ for a typical document, returned with every signature) is information-theoretic: it assumes nothing about an attacker's computing power, classical or quantum, so Shor's algorithm, which breaks RSA and ECDSA, does not apply.

That bound holds for a one-time key that is uniformly random and secret, so where the key comes from matters:

  • Key from a QKD system (over ETSI GS QKD 014): the guarantee holds end to end.
  • Key from the OS CSPRNG (the default): the guarantee rests on that generator and is computational in practice.

Every signature states which source it used. The gateway deals the verifiers' key shares itself, so it is a trusted dealer: its guarantees are only as strong as the host it runs on.


How It Works (High-Level Architecture)

QIDS operates via a secure 3-stage pipeline:

[ ETSI GS QKD 014 Key Stream / KMS ]
                 │
                 ▼
     ┌───────────────────────┐
     │ 1. Quantum Key Ingest │
     └───────────┬───────────┘
                 │
                 ▼
     ┌───────────────────────┐         Payload + One-Time Tag
     │ 2. Signature Creation ├─────────────────────────────────────────┐
     └───────────────────────┘                                         │
                                                                       ▼
                                                           ┌───────────────────────┐
                                                           │ 3. Fast Verification  │
                                                           │   (~4 ms, measured)   │
                                                           └───────────┬───────────┘
                                                                       │
                                                                       ▼
                                                             [ ACCEPT / REJECT ]
  1. Entropy Ingestion: Syncs quantum key material from carrier-grade QKD links or local secure modules via ETSI GS QKD 014 standards.
  2. One-Time Signature Tagging: Creates cryptographic tags binding document payloads to quantum key states.
  3. Deterministic Verification: Verifiers independently confirm authenticity and non-repudiation using closed-form statistical verification (100% deterministic, zero ML hallucinations). Measured at ~4 ms per verification; see Performance below.

Installation

pip install qids

Requirements: Python 3.10 or higher.


Running QIDS (Docker)

Three ways to run the gateway, all with the same image (deploy/vps/Dockerfile.gateway):

Target File What it runs
Local stack docker-compose.yml The gateway (REST, gRPC, web console), a mock ETSI GS QKD 014 KMS feeding it keys, and Prometheus + Grafana with the QIDS dashboard provisioned.
Internet-facing server deploy/vps/docker-compose.yml The gateway behind Caddy with automatic TLS. See deploy/vps/README.md.
Kubernetes deploy/helm/qids One gateway replica with a persistent volume and its secrets. See the operator guide.

Local stack:

QIDS_METRICS_TOKEN=$(openssl rand -hex 16) docker compose up -d --build
# Gateway + console: http://localhost:8080/dashboard   (REST)  ·  localhost:50051 (gRPC)
# Grafana:           http://localhost:3000   ·   Prometheus: http://localhost:9090

The mock KMS serves CSPRNG keys and says so: its signatures report entropy_source: "ETSI-GS-QKD-014-MOCK" and qkd_backed: false.


Quickstart

High-Level Enterprise Client

from qids import QIDSClient

# Signing happens on the Gateway, which holds the one-time key material.
# Get an API key from <gateway>/signup.
client = QIDSClient(
    node_id="bank_node_alpha",
    qids_service_url="https://your-gateway.example.com",
    api_key="sk_live_...",
)

# 1. Sign a transaction or document payload
payload = b"TRANSFER 1,000,000 USD TO ACCT-48910"
signature = client.sign(
    document_id="DOC-98104",
    payload=payload,
    recipient_ids=["bank_node_beta"],
)

print(f"Signed document {signature.document_id}")
print(f"Generated {len(signature.signature_tags)} recipient tag(s)")

# 2. Designated recipient verifies signature
verification = client.verify(
    document_id=signature.document_id,
    payload=payload,
    sender_id="bank_node_alpha",
    signature_tag=signature.signature_tags[0],
)

print(f"Verdict: {verification.reason} | threat: {verification.threat}")
# Output: Verdict: ok | threat: benign
# A tampered payload returns: reason "digest_mismatch", threat "forgery"

Low-Level Session Execution

A simulation of the full teleportation-based protocol (Alice signs; Bob and Charlie verify), not a network call:

import numpy as np
from qids import QdsSession, ProtocolParams

session = QdsSession(params=ProtocolParams(key_length=1200), rng=np.random.default_rng(7))
result = session.run_benign()

for verifier, verdict in result.verdicts.items():
    print(verifier, verdict.decision)
# bob ACCEPT
# charlie ACCEPT

Core Capabilities

  • Non-repudiation with dispute resolution: every signature has a tenant-scoped audit receipt and Merkle root. Disputes between verifiers go through cross-verification (/api/v1/cross-verify).
  • Measured throughput (developer laptop, full durability, SQLite persistence):
    • Signing engine: about 1,950 signatures/s.
    • HTTP API: about 570 requests/s with 4 gateway processes, about 900 with relaxed fsync.
    • Verification: about 236/s per process.
    • This suits document and transaction signing, not high-frequency trading. Method and history are in the audit.
  • ETSI GS QKD 014: takes keys from any KMS that speaks this API. It has been tested against the bundled mock, not against QKD hardware.
  • REST and gRPC: the same engine, receipts and metrics on both transports.
  • Auditable and deterministic: no AI/ML models anywhere in the verification path.

Multi-Language Ecosystem

QIDS provides client libraries across all major backend and systems languages. Four are signing clients that talk to the Gateway; three are primitive libraries (constant-time comparison, Toeplitz hashing, Wald SPRT) without a signing path:

Language Registry / Install Repository
Python pip install qids PyPI
TypeScript / Node.js npm install qids-sdk npm
Rust (primitives) cargo add qids crates.io
Go go get github.com/Raunakg2005/qids-go@v1.3.4 qids-go
Java com.github.Raunakg2005:qids-java:v1.3.4 (JitPack) qids-java
C / C++ (primitives) make → libqids.a qids-c
Julia (primitives) Pkg.add(url="https://github.com/Raunakg2005/QIDS.jl.git") QIDS.jl

Documentation & Support

Metadata

Release files for qids 1.3.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for qids 1.3.4
File Size Uploaded Provenance Actions
qids-1.3.4.tar.gz 323.8 kB Without provenance Details for qids-1.3.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for qids 1.3.4
File Interpreter ABI Platform Actions
qids-1.3.4-py3-none-any.whl Python 3 none any Details for qids-1.3.4-py3-none-any.whl

Total release size: 603.8 kB

Release files / qids-1.3.4.tar.gz

Download URL qids-1.3.4.tar.gz
Size 323.8 kB
Tags Source
SHA-256 checksum
How to use checksums
57bff00576d36edf541b71404b6289399f0085e7f290e46bea6fa522b294dac3
BLAKE2b-256 checksum
How to use checksums
290ce4d39d33320e965b3331195ee786489b8e07238891f15ae1b27c1bc9b998
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Release files / qids-1.3.4-py3-none-any.whl

Download URL qids-1.3.4-py3-none-any.whl
Size 280.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b454490a2a5caa2c3e92c4d06301d0d91bcb3af53b1281d3fcaa2d8d3bd3abf1
BLAKE2b-256 checksum
How to use checksums
4f6f868285bb0386fb36f51c971b0ba834fecc30d1c841cd1c3a41b542dab342
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Security for qids 1.3.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page