Repository navigation
Expand file tree
/
Copy pathllms.txt
More file actions
93 lines (78 loc) · 9.11 KB
/
Copy pathllms.txt
File metadata and controls
93 lines (78 loc) · 9.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<!-- Generated by dart run tool/visibility/generate_visibility.dart. Edit tool/visibility/visibility_manifest.json instead. -->
# pqforge
> Post-quantum encryption, signing, hybrid sessions, gigabyte-scale streaming, and a CLI for Dart, Flutter, and Serverpod — built on pqcrypto ML-KEM/ML-DSA/SLH-DSA.
> Version 0.4.14; MIT licensed.
pqforge turns the pqcrypto ML-KEM (FIPS 203), ML-DSA (FIPS 204), and SLH-DSA (FIPS 205) primitives into application-ready cryptography: KEM-DEM envelopes, RFC 9180 HPKE, X-Wing (draft-connolly-cfrg-xwing-kem-11, not a .pqf algorithm), AES-256-GCM and ChaCha20-Poly1305 AEAD, an RFC 8439 ChaCha20 keystream, X25519/X448/Ed25519/Ed448/ECDSA-P256/ECDSA-P384/ECDSA-P521/RSA hybrids and signatures, P-256/P-384 ECDH for TLS hybrid groups and P-521 ECDH for HPKE, X.509 certificates and PKCS#10 requests that OpenSSL req reads, bounded-memory gigabyte streaming, multi-recipient envelopes, Argon2id-wrapped key custody, named recipes, and a universal CLI. SLH-DSA is composed into keygen, custody, and detached sign/verify; envelopes and hybrid-sign remain ML-DSA-only. compose-sign is an opt-in 2-leg or 3-leg signature. PqEcdsaP521 is not the P-521 HPKE share and not a TLS group. The core is pure Dart and web-safe — no dart:ffi.
## Start Here
- Website: https://turkananation.github.io/pqforge/
- Repository: https://github.com/turkananation/pqforge
- Package: https://pub.dev/packages/pqforge
- API docs: https://pub.dev/documentation/pqforge/latest/
- Wiki: https://github.com/turkananation/pqforge/wiki
- Lab: Yardenah PQ (https://yardenah.com)
- Built on pqcrypto: https://pub.dev/packages/pqcrypto
## Built On pqcrypto
pqforge is the application layer built on top of pqcrypto. pqcrypto provides the post-quantum primitives; pqforge provides everything you need to ship a feature with them.
- pqcrypto (primitives): pqcrypto is the primitives package: 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 exposes raw key generation, encapsulation/decapsulation, and sign/verify over byte arrays.
- pqforge (composition): pqforge is the composition package: KEM-DEM envelopes, RFC 9180 HPKE, X-Wing (draft-connolly-cfrg-xwing-kem-11, not a .pqf algorithm), AES-256-GCM/ChaCha20-Poly1305 AEAD, an RFC 8439 ChaCha20 keystream, X25519/X448/Ed25519/Ed448/ECDSA-P256/ECDSA-P384/ECDSA-P521/RSA, P-256/P-384 ECDH for TLS hybrid groups and P-521 ECDH for HPKE, X.509 and PKCS#10, bounded-memory streaming, multi-recipient envelopes, Argon2id key custody, named recipes (files, folders, text, media, email, documents, webhooks, tokens, records, logs, artifacts, identity bindings), compose-sign, and a CLI. It composes pqcrypto SLH-DSA into keygen, custody, and detached sign/verify; envelopes and hybrid-sign remain ML-DSA-only. compose-sign can take one SLH-DSA leg when that key is passed.
- pqcrypto package: https://pub.dev/packages/pqcrypto
- pqcrypto repository: https://github.com/turkananation/pqcrypto
## Key Boundary
- pqforge composes pqcrypto ML-KEM/ML-DSA with AEAD, KDF, custody, recipes, and CLI workflows, and composes SLH-DSA into keygen and detached sign/verify.
- It is not a validated cryptographic module.
- It does not provide:
- CMVP/FIPS 140 module validation
- A hard constant-time guarantee for Dart runtimes
- A hard memory-erasure guarantee
- Public-key trust, identity vetting, or legal e-signature policy
- Replay stores, authorization policy, TLS, or secure infrastructure operations
- RC4 or unauthenticated encryption
- BoringSSL HPKE for X448, P-521, PSK, or HKDF-SHA512
- An OpenSSL HPKE claim for X25519, P-256, or P-384
- X-Wing as a FIPS construction, an authenticated HPKE KEM, a .pqf or .pqfs algorithm, or a BoringSSL or OpenSSL interop claim
- PQXDH and the Sparse Post-Quantum Ratchet (exported scaffolds that throw; XEdDSA and the ML-KEM Braid incremental interface are absent). A libsignal byte match or a FIPS-validated Double Ratchet
- A WebPKI trust store, AIA, OCSP fetching, or certificate transparency
- ECDSA-P521 as a TLS group or as the HPKE P-521 KEM. PqEcdsaP521 only signs
- SHA-1 as a signature or as the hash for a new protocol. PqBytes.sha1 is only the RFC 3174 digest
## Never Say
- FIPS validated
- FIPS 140 validated
- CMVP validated
- certified
- hard constant-time Dart guarantee
- hard memory-erasure guarantee
- ML-KEM alone is secure transport
- AES signs documents
- RC4 is supported
## Recipes
- Local File Vault: encryptFileBytes, decryptFileBytes, encryptAsync, PqEnvelope (developer machines, backup jobs, admin laptops, server batch jobs).
- Folder Archive: encryptFolderEntry, decryptFolderEntry (case files, release bundles, evidence folders, internal archives).
- Folder Pack Archive: PqForgePackService (package:pqforge/pqforge_io.dart) (many small files, site exports, evidence bundles, dataset shards).
- Large Files And Media Streaming: PqForgeStreamCipher.encryptFile, decryptStream (package:pqforge/pqforge_io.dart) (gigabyte media, datasets, disk images, backups, VM snapshots).
- Multi-Recipient Envelopes: encryptAsync, PqMultiRecipient, PqRecipientSpec (shared vaults, team archives, escrow, break-glass recipients).
- Text Snippets: sealText, openText, signText, verifyText (notes, secrets, prompts, policy snippets, short messages).
- Media Assets: sealMedia, openMedia, signMedia, verifyMedia (photos, audio, video, PDFs, campaign media, identity images).
- Document Signing: signDocument, verifyDocument (contracts, reports, certificates, approvals, policy documents).
- Hybrid And Classical Signatures: PqForgeHybridSigner, PqForgeSignatureComposer, PqEcdsaP256, PqEcdsaP384, PqEcdsaP521, PqEd25519, PqEd448, PqRsa, PqX509, dualSign, dualVerify (release artifacts, firmware, long-lived approvals, dual-trust signing).
- Webhook Integrity: signWebhook, verifyWebhook (payment callbacks, audit delivery, server-to-server events).
- Signed Tokens: issueToken, verifyToken (API capabilities, admin actions, short-lived grants).
- Private Email Payloads: sealEmail, openEmail (encrypted mail bodies, secure notifications, outbound archive mail).
- Government And Medical Records: encryptRecord, appendSignedLogEntry (public-sector records, patient records, registry payloads).
- Software Artifacts: signArtifact, verifyArtifact (release bundles, firmware, packages, configuration rollouts).
- Hybrid Server Sessions: PqForgeHybridKeyAgreement, PqForgeSecureSession (Serverpod, API services, local agents, backend handshakes).
## Docs
- [README](https://github.com/turkananation/pqforge/blob/main/README.md): High-signal overview, badges, quickstarts, recipe map, and validation commands.
- [Documentation Index](https://github.com/turkananation/pqforge/blob/main/doc/INDEX.md): Canonical map of every doc, the package surface, and the visibility generator.
- [CLI Guide](https://github.com/turkananation/pqforge/blob/main/doc/CLI.md): Full command-line usage: wrapped keys, files, folders, text, media, streaming, pack, multi-recipient, hybrid, and signatures.
- [Project Catalog](https://github.com/turkananation/pqforge/blob/main/doc/cookbook/PROJECT_CATALOG.md): Applications and domains that map to pqforge recipes.
- [Recipe Cookbook](https://github.com/turkananation/pqforge/blob/main/doc/cookbook/README.md): Named recipe docs for safe application composition.
- [API Reference](https://github.com/turkananation/pqforge/blob/main/doc/API.md): Facade methods, hybrid tier, secure sessions, AEAD engines, types, and CLI summary.
- [Hybrid Audit](https://github.com/turkananation/pqforge/blob/main/doc/HYBRID_AUDIT.md): Coverage audit against pqcrypto: composed ML-KEM/ML-DSA, SLH-DSA keygen and detached signatures, and explicit rejections.
- [Performance And Hybrid CLI](https://github.com/turkananation/pqforge/blob/main/doc/technical/PERFORMANCE_AUDIT_AND_HYBRID_CLI.md): As-built throughput, memory, and engine/cipher recommendations with measured numbers.
- [Envelope Formats](https://github.com/turkananation/pqforge/blob/main/doc/architecture/ENVELOPE_FORMATS.md): The .pqf one-shot and .pqfs streaming container layouts and AAD binding.
- [Threat Model](https://github.com/turkananation/pqforge/blob/main/doc/security/THREAT_MODEL.md): Assets, adversaries, what the package defends, and what the application must own.
- [Key Custody](https://github.com/turkananation/pqforge/blob/main/doc/architecture/KEY_CUSTODY.md): Wrapped key storage and pluggable custody model.
- [HPKE](https://github.com/turkananation/pqforge/blob/main/doc/protocols/HPKE.md): RFC 9180 HPKE: modes, suites, seal/open/export, and the BoringSSL interop boundary. X-Wing is the additional KEM in XWING.md.
- [X-Wing](https://github.com/turkananation/pqforge/blob/main/doc/protocols/XWING.md): draft-connolly-cfrg-xwing-kem-11 as PqXWing and HpkeKem.xWing (0x647A). Not the custom hybrid and not a .pqf algorithm.
- [Signatures](https://github.com/turkananation/pqforge/blob/main/site/content/signatures.md): Opt-in dual and triple signature legs. Does not replace HPKE, certificates, ECDH, or envelope signatures.
- [Claim Boundary](https://github.com/turkananation/pqforge/blob/main/doc/security/CLAIM_BOUNDARY.md): Allowed and forbidden claims for package consumers and agents.