skillfed

pqcrypto

Post-quantum cryptography for Python.

pqcrypto v0.4.0 92.1K downloads/30d#13,473 on PyPI95
Permissive license Apache-2.0 Active released

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 pqcrypto

uv

uv add pqcrypto

poetry

poetry add pqcrypto

Installing 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

Development Status :: 4 - BetaIntended Audience :: DevelopersIntended Audience :: Science/ResearchIntended Audience :: System AdministratorsIntended Audience :: Telecommunications IndustryProgramming Language :: CProgramming Language :: Python :: 3Topic :: SecurityTopic :: Security :: CryptographyTopic :: Software DevelopmentTopic :: Software Development :: LibrariesTopic :: Utilities

Tags

post-quantum cryptographyquantum-resistant encryptionPQC algorithms PythonKEM key encapsulationdigital signatures quantum-safeNIST post-quantum standardsML-KEM ML-DSA Falcon
quantum-resistantcryptographynist-standards

More Software Development packages