Post-Quantum Cryptography Toolkit
pqc lets you:
- Manage post-quantum cryptography keys.
- Encrypt data with ML-KEM envelopes.
- Sign artifacts with ML-DSA or SLH-DSA.
- Inspect TLS endpoints across classical, hybrid and standalone PQ configurations.
- Score migration readiness.
- Produce signed audit and transparency evidence.
- Run local or remote key operations through
pqcd.
- Experiment with post-quantum cryptography certificate and signature profiles.
Use it to turn a post-quantum cryptography migration plan into working systems:
generate keys, rotate versions, protect data, inspect real endpoints, and
preserve repeatable evidence for engineering, vendor, and compliance reviews.
The evidence package provides strict verification
and required multiple signatures. Its separate v2 format binds the payload,
metadata and complete signer policy. Verification needs public material only.
Central key services, authentication, authorization, certificate issuance and
service audit belong to OpenBao. This toolkit supplies cryptographic operations,
assessment and portable evidence; Keyman supplies PKCS#11 token operations.
See architecture and scope for the integration boundary.
Release v1.0.1
v1.0.1 expands migration
probe coverage on Go 1.27.4 while retaining CIRCL, existing key/envelope formats
and managed transport defaults.
- Select explicit groups and TLS versions with
tls inspect and tls readiness.
- Build comparison plans with repeatable
--profile ID:GROUP:VERSION selections,
including classical TLS 1.2, hybrid TLS 1.3 and standalone ML-KEM-1024.
- Carry standalone KEM observations through migration reports, gates, CBOM and
signed evidence; distinguish inconclusive probes from absent algorithm support.
- Exercise native ML-DSA certificate validation and document its cross-library
negotiation limits. The optional OpenSSL observer continues to cover affected
paths and capture the selected handshake signature.
Building from source now requires Go 1.27.4 or newer. See the
migration workflow,
TLS inspection options and
validation record.
v1.0.0 baseline
v1.0.0 brings integrated
OpenSSL authentication observation, migration gates/CBOM/signed evidence, and
experimental MTC browser acceptance and rejection tests with explicit wire and
trust scope. See authentication observation.
The portable Go build remains independent of OpenSSL; its optional helper is built
locally from source.
This major release establishes the integrated migration and evidence workflow as
the release baseline.
Migration v2 documents require a v2-capable reader; v1 observations remain readable.
Experimental certificate profiles retain their documented version and trust scope.
The preceding v0.3.0 added:
- ML-KEM-1024 envelopes with HKDF-SHA384 and AES-256-GCM, preserving existing
ML-KEM-768 ciphertext compatibility.
- Versioned PQC and CNSA algorithm assessments for keys and TLS observations.
- Required hybrid PQ key exchange for CLI/daemon transport, with classical
fallback disabled when requested.
- Separate authentication findings so hybrid key exchange does not imply
post-quantum certificate authentication or CNSA compliance.
Readiness scores now account for authentication gaps and selected cryptographic
policies. See policy rules and compatibility.
Migration updates
TLS inspection now captures verified certificate paths, including unsent roots,
and reports the announced March 15, 2027 Chrome P-256 CA restriction separately
from PQ/CNSA assessments. The toolkit’s own managed client/daemon TLS permits
P-384 as its only classical fallback. Inspection can explicitly probe legacy
X25519/P-256 configurations without changing that transport policy.
See December 2026 migration guidance for CIRG’s
recommendations, browser-rule scope and transport compatibility details.
Integrated migration workflow
- Repeat bounded TLS probe matrices and compare saved observations.
- Reassess pinned PQ/CNSA and browser rules without overwriting original findings.
- Export CycloneDX 1.6 CBOM and sign portable evidence with required ML-DSA and
SLH-DSA signatures; verify offline using separately trusted public material.
- Test real ML-DSA certificate/TLS authentication and pinned experimental MTC
proofs, with explicit limits on what each test establishes.
- Run release assurance checks, build checksummed candidates and generate CI
provenance; use the prepared external-review package for independent review.
Start with the migration workflow,
authentication interoperability, and
authentication validation and
earlier migration validation. See security scope
and the external review package; no independent audit
has been completed for this increment.
Install
Requires Go 1.27.4 or newer. CI and release builds use the version declared in go.mod.
The Go 1.27 upgrade retains CIRCL, existing key/envelope formats and managed TLS
defaults. See TLS inspection for native capabilities and
the features currently exposed by this project.
For migration coverage, tls inspect and tls readiness accept explicit
--group and --tls-version selections. migration plan accepts repeatable
--profile ID:GROUP:VERSION options to compare classical, hybrid and standalone
PQ configurations. For example, --profile pure:MLKEM1024:1.3 selects a standalone
probe; it does not change transport defaults. Native ML-DSA probing has
documented negotiation limits; the optional
OpenSSL observer continues to cover affected certificate paths and observe the
selected handshake signature.
go install github.com/helsingin/pqc/cmd/pqc@latest
go install github.com/helsingin/pqc/cmd/pqcd@latest
From a local checkout:
make build
Manage Keys
pqc keys create --type ml-kem-768 --id service-a
pqc keys create --type ml-kem-1024 --id service-high
pqc keys create --type ml-dsa-65 --id signer-a
pqc keys rotate --id service-a
pqc keys list
pqc keys public --id signer-a
Encrypt Data
pqc encrypt --key service-a < message.json > message.pqc
pqc decrypt < message.pqc > message.out
Sign Artifacts
pqc sign --key signer-a artifact.tar > artifact.sig
pqc verify --key signer-a artifact.tar artifact.sig
Inspect TLS
pqc tls inspect example.com:443
pqc tls readiness example.com:443
pqc tls inspect --crypto-policy cnsa2-2026-v1 example.com:443
Cryptographic assessment reports key exchange, certificate keys, issuer signatures,
and authentication coverage separately. See cryptographic policies
for policy versions, limitations, and required-PQ transport.
Score Readiness
pqc inventory scan --store ./dev-keys --target example.com:443
pqc readiness scan --store ./dev-keys --target example.com:443
Produce Evidence
pqc keys create --type ml-dsa-65 --id audit-signer --audit-log ./audit.jsonl
pqc audit checkpoint --audit ./audit.jsonl --sign-key audit-signer
pqc transparency checkpoint --sign-key audit-signer --target example.com:443
Run A Key Service
pqcd --addr 127.0.0.1:8080 --token "$PQC_API_TOKEN"
pqc keys list --remote http://127.0.0.1:8080 --token "$PQC_API_TOKEN"
For HTTPS transport that requires hybrid PQ key exchange:
pqcd --addr 127.0.0.1:8443 --token "$PQC_API_TOKEN" \
--tls-cert server.pem --tls-key server-key.pem --tls-require-pqc
pqc keys list --remote https://localhost:8443 --token "$PQC_API_TOKEN" \
--tls-ca ca.pem --tls-require-pqc
Supply a server certificate valid for the hostname and its trusted CA. This mode
rejects classical-only key exchange; it does not require PQ certificate authentication.
Experiment With Certificate And Signature Profiles
pqc profiles list
pqc profiles show x509-ml-dsa
pqc issue --profile mtc --sign-key signer-a --subject example.com --dns example.com
pqc verify-artifact artifact.json
Documentation
Notes
- Current post-quantum cryptography primitives:
ML-KEM-768, ML-KEM-1024, ML-DSA-65,
ML-DSA-87, SLH-DSA-SHA2-192s, and SLH-DSA-SHA2-256s.
- The implementation uses Cloudflare CIRCL for post-quantum cryptography
primitives and the Go standard library for HKDF and AES-GCM.
- Treat this as a migration and integration toolkit, not a replacement for
hardened production key custody, access control, or incident response design.
License
Apache-2.0. See LICENSE.
评论