pqblocks-core¶
Post-quantum hybrid cryptography core SDK with C shared libraries and policy enforcement.
At a glance
| Area | PQ cryptography |
| Import | import pqblocks_core |
| Command line | library only |
| Version | 0.1.0 (Alpha) |
| Python | >=3.11 |
| Native dependency | liboqs |
| Repository | PQBlocks/hybrid-sdk |
| Licence | Apache-2.0 |
What is pqblocks-core?¶
Post-quantum hybrid cryptography core SDK with C shared libraries and policy enforcement.
Use it for native, high-performance hybrid key encapsulation (ML-KEM-768 + X25519) and composite signatures (ML-DSA-65 + Ed25519) with C-speed bindings and policy governance.
Standards implemented: NIST FIPS 203 (ML-KEM), NIST FIPS 204 (ML-DSA), RFC 7748 (X25519), RFC 8032 (Ed25519), RFC 5869 (HKDF), and draft-ietf-lamps-pq-composite-sigs.
Install¶
PyPI release staged
pqblocks-core installs from its GitHub repository while the PyPI release is staged. The import name and API are identical either way.
Native dependency: liboqs
The post-quantum primitives come from liboqs (Open Quantum Safe). The package README explains how the library is located: install notes.
Quickstart¶
Executed, not just written
This is the quickstart from the package README. It was run against the package source when this page was generated.
import ctypes, os
import pqblocks_core
# Locate the native hybrid KEM library
lib_path = os.path.join(os.path.dirname(pqblocks_core.__file__), "lib", "libpqblocks_kem.so")
lib = ctypes.CDLL(lib_path)
lib.PQBLOCKS_KEM_X25519_MLKEM768_new.restype = ctypes.c_void_p
# Initialize hybrid KEM handle (ML-KEM-768 + X25519)
kem = lib.PQBLOCKS_KEM_X25519_MLKEM768_new()
assert kem is not None
print("PQBlocks hybrid core initialized successfully.")
Examples¶
Runnable scripts in the repository:
Documentation and evidence¶
Every PQBlocks package ships the same evidence set, so each claim can be checked against tests, sources and measurements.
-
What it does, install, usage and API.
-
Correct imports, pitfalls and rules for coding assistants.
-
What it protects, hostile input, constant-time and audit status.
-
Test suites, coverage, vectors and what is not covered.
-
Measured performance, including where it loses.
-
Primary sources and the method-to-code map.
-
Self-verification results, defects found and limits.
-
Worked scenarios and when to pick something else.
-
Every release and what changed.
Related packages in PQ cryptography¶
pqblocks-files: Hybrid post-quantum file encryption: ML-KEM-768 plus X25519 key encapsulation with chunked ChaCha20-Poly1305 in the…pqblocks-jose: Post-quantum hybrid JOSE library supporting ML-KEM and ML-DSA JWE and JWS tokens.pqblocks-primitives: Production-ready integrated post-quantum cryptographic primitives (ML-KEM, ML-DSA, SLH-DSA, and hybrid schemes).