pqcrypto
Post-quantum cryptography for Python.
What it is and what it does
PQCrypto wraps CFFI bindings to C implementations of post-quantum cryptographic primitives submitted to the NIST Post-Quantum Cryptography Standardization process. It provides two main cryptographic operations: Key Encapsulation Mechanisms (KEMs) for secure key establishment and digital signature algorithms for authentication and integrity. The library is designed to be composable with existing cryptographic libraries and follows the Unix philosophy of doing one thing well.
The package supports multiple algorithm families including ML-KEM, ML-DSA, Falcon, SPHINCS+, HQC, and McEliece variants. It targets developers building systems that need to be resistant to future quantum computer attacks while remaining interoperable with current communication protocols. Installation is straightforward on common platforms via pre-built wheels, though it requires cffi and a C compiler for platforms without binary distributions.
Use it for:
- Secure key exchange in applications that need to remain confidential against future quantum threats.
- Digital signatures for long-term document authenticity in regulated industries (finance, healthcare, government).
- Hybrid cryptography: combining classical and post-quantum algorithms during a transition period.
- Research and prototyping of quantum-resistant protocols before NIST standards are finalized.
- Building cryptographic systems for infrastructure expected to operate for decades.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides Python bindings to post-quantum cryptographic algorithms (key encapsulation and digital signatures) that resist attacks from both classical and quantum computers.
Yes, if you need post-quantum cryptography today. The library is actively maintained, has no known vulnerabilities, covers common platforms with pre-built wheels, and implements algorithms from the NIST standardization process. Install friction is moderate due to C bindings but manageable. Suitable for production use in applications requiring long-term confidentiality or where quantum threats are a concern.
Install
pqcrypto on PyPI
pip
pip install pqcryptouv
uv add pqcryptopoetry
poetry add pqcryptoInstalling pqcrypto
Before you install
Medium install friction due to compiled C bindings via cffi, but pre-built wheels cover common platforms (macOS, Linux, Windows) and Python versions 3.9 and later. Repository is actively maintained with recent commits.
License in practice
Apache-2.0 permissive license allows commercial and private use with minimal restrictions; you must retain license notices and state changes.
Quickstart
pip install pqcrypto
from pqcrypto.kem.ml_kem_768 import generate_keypair, encrypt, decrypt
public_key, secret_key = generate_keypair()
ciphertext, plaintext = encrypt(public_key)
recovered = decrypt(secret_key, ciphertext)
Requires Python >=3.9; cffi dependency must compile C bindings on platforms without pre-built wheels.
Verify before relying
- Whether all listed KEM and signature algorithms have reached NIST standardization or remain in draft/candidate status.
- Performance characteristics (key size, signature size, operation latency) for each algorithm relative to classical alternatives.
- Interoperability guarantees with other post-quantum libraries or standards bodies beyond NIST submission process.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | 1 — cffi |
| Maintenance | actively maintained — 201 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 92,148/month — #13,473 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pqcrypto-0.4.0-cp310-cp310-macosx_11_0_arm64.whl; pqcrypto-0.4.0-cp310-cp310-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl; pqcrypto-0.4.0-cp310-cp310-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl; pqcrypto-0.4.0-cp310-cp310-musllinux_1_2_aarch64.whl; pqcrypto-0.4.0-cp310-cp310-musllinux_1_2_x86_64.whl; pqcrypto-0.4.0-cp310-cp310-win32.whl; pqcrypto-0.4.0-cp310-cp310-win_amd64.whl; pqcrypto-0.4.0-cp311-cp311-macosx_11_0_arm64.whl; pqcrypto-0.4.0-cp311-cp311-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl; pqcrypto-0.4.0-cp311-cp311-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl; pqcrypto-0.4.0-cp311-cp311-musllinux_1_2_aarch64.whl; pqcrypto-0.4.0-cp311-cp311-musllinux_1_2_x86_64.whl; pqcrypto-0.4.0-cp311-cp311-win32.whl; pqcrypto-0.4.0-cp311-cp311-win_amd64.whl; pqcrypto-0.4.0-cp312-cp312-macosx_11_0_arm64.whl; pqcrypto-0.4.0-cp312-cp312-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl; pqcrypto-0.4.0-cp312-cp312-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl; pqcrypto-0.4.0-cp312-cp312-musllinux_1_2_aarch64.whl; pqcrypto-0.4.0-cp312-cp312-musllinux_1_2_x86_64.whl; pqcrypto-0.4.0-cp312-cp312-win32.whl
Keywords: cryptography, post-quantum, pqclean, security
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
dilithium-pyA pure-Python implementation of ML-DSA (FIPS…
permissive · top 15,000 on PyPI
ff3Implements NIST FF3 and FF3-1 format-preserving…
permissive · top 15,000 on PyPI
pycryptodomexPyCryptodomex provides low-level cryptographic…
permissive · top 1,000 on PyPI
SLH-DSAPure Python implementation of the SLH-DSA…
copyleft · top 15,000 on PyPI
python-olmPython bindings for the Olm cryptographic…
permissive · top 5,000 on PyPI
django-cryptographyWraps Python's cryptography library to add…
permissive · top 15,000 on PyPI
pysetoPySETO implements PASETO (Platform-Agnostic…
permissive · top 15,000 on PyPI
cryptographycryptography provides cryptographic recipes and…
permissive · top 100 on PyPI
josepyImplements the JOSE (JSON Object Signing and…
permissive · top 5,000 on PyPI
PGPyPGPy implements OpenPGP (RFC 4880) in pure…
permissive · top 5,000 on PyPI