Registry / auth-security / spsdk-pqc

spsdk-pqc

JSON →
library0.7.1pypypi✓ verified 79d ago

A plugin for NXP's SPSDK that provides post-quantum cryptography support, including key generation, signing, and verification using algorithms like Dilithium, Falcon, and SPHINCS+. Current version 0.6.8, requires Python >=3.9. Released as part of SPSDK Plugins, with new versions approximately every 2-3 months.

pip install spsdk-pqc
INSTALL
IMPORT
SIG · SPSDK-PQC
S
spsdk-pqc
auth-securitypythonv0.7.1
Install
14.2s avg
Import
Disk
170MB
Pass rate
6/ 10
Env Coverage6 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.7.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✕ build_error
✓ 16.5s
py 3.11
✕ build_error
✓ 16.5s
py 3.12
✕ build_error
✓ 18.3s
py 3.13
✕ build_error
✓ 16.7s
py 3.9
✓ —
✓ 2.8s
170MB installed
● package 170MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

PQCAlgorithm
from spsdk_pqc import PQCAlgorithm
from spsdk_pqc import PQCProvider
DilithiumPrivateKey
from spsdk_pqc import DilithiumPrivateKey
MLDSAPrivateKey
from spsdk_pqc import MLDSAPrivateKey

Initialize PQCProvider, generate a Dilithium2 key pair, sign a message, and verify the signature.

from spsdk_pqc import PQCProvider from spsdk import SpsdkError provider = PQCProvider() # Generate a Dilithium2 key pair private_key, public_key = provider.generate_keypair('Dilithium2') print('Public key:', public_key.hex()) # Sign a message message = b'Test message' signature = provider.sign(private_key, message) print('Signature:', signature.hex()) # Verify is_valid = provider.verify(public_key, message, signature) print('Verification:', is_valid)
Debug
Known issues
gotchaThe library wraps liboqs, which must be installed separately or the Python package may fail at runtime with 'OQS library not found'.
fix
Install liboqs system-wide (e.g., apt install liboqs-dev) or use a precompiled wheel that bundles it.
affects: >=0.3.0
breakingIn SPSDK Plugins 3.0.0, the import path changed from spsdk.pqc to spsdk_pqc. Old imports will break.
fix
Change 'from spsdk.pqc import ...' to 'from spsdk_pqc import ...'
affects: <=0.5.3 -> >=0.6.0
Upgrade
Version history
0.7.1latest on PyPI · released Jun 19, 2026
Audit
Dependencies
spsdkrequiredCore SPSDK framework required for all operations
liboqsoptionalC library for post-quantum algorithms, wrapped by spsdk-pqc
Agent activity
38 hits · last 30 days
node
32
OpenAI (training)
1
Resources
spsdk-pqc — pip install spsdk-pqc · libregistry