Repository navigation
pqforge vs pqcrypto
pqforge and pqcrypto are sibling Dart
packages that solve different layers of the same problem. They are designed
to be used together: pqforge depends on pqcrypto and never reimplements the
post-quantum primitives.
-
pqcryptois the primitives. Pure-Dart NIST FIPS 203 ML-KEM, FIPS 204 ML-DSA, and FIPS 205 SLH-DSA (all 12 parameter sets), plus SHA-2 and SHA-3/SHAKE, with zero runtime dependencies. It gives you raw key generation, encapsulation/decapsulation, and sign/verify over byte arrays. -
pqforgeis the application toolkit. It turns ML-KEM, ML-DSA, and SLH-DSA into encrypted files, folders, text, media, signed documents, webhooks, tokens, hybrid sessions, wrapped key custody, streaming, multi-recipient envelopes, and a CLI. SLH-DSA is composed intokeygenand detachedsign/verify, including tokens, signed logs, and identity bindings; envelopes andhybrid-signremain ML-DSA-only.compose-signcan take one SLH-DSA leg when that key is passed.
| You want to… | Use |
|---|---|
Call ML-KEM / ML-DSA / SLH-DSA directly over Uint8List
|
pqcrypto |
| Build your own protocol from the raw KEM/signature | pqcrypto |
| Encrypt a file, folder, or gigabyte media stream | pqforge |
| Sign a document, release artifact, webhook, or token | pqforge |
| Add an X25519/Ed25519/ECDSA-P256 hybrid leg | pqforge |
| Opt into ECDSA-P384 or ECDSA-P521, or compose 2–3 signature legs |
pqforge (keygen --classical, compose-sign) |
| Seal with RFC 9180 HPKE, including X448 and P-521 | pqforge |
| Wrap secret keys with a passphrase (Argon2id + AES-GCM) | pqforge |
| Encrypt once for many recipients | pqforge |
| Ship a CLI to ops or a release pipeline | pqforge |
If you only need the algorithms, depend on pqcrypto and stop there. If you
need to ship a feature, reach for pqforge.
pqcrypto deliberately stops at the post-quantum primitives. pqforge supplies
the rest of the stack a real application needs:
-
KEM-DEM envelopes —
.pqfone-shot and.pqfsstreaming containers. -
Symmetric AEAD — AES-256-GCM and ChaCha20-Poly1305, on a pure-Dart
(PointyCastle) or native (
package:cryptography) engine. -
Classical hybrid tier — X25519 key agreement, Ed25519 and ECDSA-P256
signatures, P-256/P-384 ECDH (
PqNistEcdh) for TLS hybrid groups, combined with ML-KEM/ML-DSA so security holds if either the post-quantum or the classical assumption survives. X448 and P-521 ECDH are HPKE shares, not TLS groups. ECDSA-P384 and ECDSA-P521 are signature opt-ins.PqEcdsaP521is not the P-521 HPKE share. SLH-DSA is a composed detached-signature family, not ahybrid-signleg. It can be one opted-in leg ofcompose-sign. - Key custody — Argon2id + AES-256-GCM wrapped keys (PBKDF2 under FIPS mode) and pluggable stores.
-
Streaming and packing — bounded-memory gigabyte files and one-archive
folder
pack/unpack. - Named recipes — documents, text, media, email, records, logs, artifacts, identity bindings.
- A universal CLI plus AOT release binaries.
- Both are pure Dart and web-safe — neither ships
dart:ffiin its published package, so both run on the Dart VM, Flutter, and the web. - Both prove byte-compatibility with the system OpenSSL using a separate,
publish_to: nonedev-only interop harness that is never shipped. - Both refuse RC4 and unauthenticated encryption.
pqforge's post-quantum security claim is inherited from pqcrypto.
pqforge is not a CMVP/FIPS 140 validated module, and neither package provides
public-key trust, identity vetting, replay protection, authorization policy, or
TLS — those remain the application's responsibility. See
Claim Boundary.
-
pqcryptoon pub.dev: https://pub.dev/packages/pqcrypto -
pqcryptorepository: https://github.com/turkananation/pqcrypto -
pqforgecoverage audit againstpqcrypto: HYBRID_AUDIT.md