@suaveplan/crypto-cipher - AEAD cipher primitives with per-primitive selector layout: aes-256-gcm, chacha20-poly1305, xchacha20-poly1305. Noble + native impls selected at build time via crypto.config.ts. Nonces are caller-supplied; primitives never generate them internally.
Summary
Low-level AEAD (Authenticated Encryption with Associated Data) cipher primitives for the @suaveplan/crypto stack. Provides three algorithms — AES-256-GCM, ChaCha20-Poly1305, and XChaCha20-Poly1305 — each as a standalone subpath export for tree-shaking. Nonces are always caller-supplied: the package validates nonce length but never generates randomness internally, keeping the CSPRNG boundary in the caller's control. Implementation flavour ('noble' vs 'native') is selected at build time via crypto.config.ts; all Phase 0 implementations route to @noble/ciphers. Use @suaveplan/crypto for the high-level façade that combines nonce generation, engine selection, and structured error handling; use this package only when you need to supply your own cipher engine implementation.
Documentation tree
- codes — (no submodules)
- codes — (no submodules)
- crypto-cipher-error — (no submodules)
- crypto-cipher-error — (no submodules)
- aes-256-gcm — (no submodules) - aes-256-gcm.select — _(no s…
- aes-256-gcm.select — (no submodules)
- aes-256-gcm.select — (no submodules)
- aes-256-gcm.native — (no submodules)
- aes-256-gcm.native — (no submodules)
- aes-256-gcm.noble — (no submodules)
- aes-256-gcm.noble — (no submodules)
- aes-256-gcm — (no submodules) - aes-256-gcm.select — _(no s…
- aes-256-gcm.select — (no submodules)
- chacha20-poly1305 — (no submodules) - chacha20-poly1305.select — …
- chacha20-poly1305.select — (no submodules)
- chacha20-poly1305.select — (no submodules)
- chacha20-poly1305.native — (no submodules)
- chacha20-poly1305.native — (no submodules)
- chacha20-poly1305.noble — (no submodules)
- chacha20-poly1305.noble — (no submodules)
- chacha20-poly1305 — (no submodules) - chacha20-poly1305.select — …
- chacha20-poly1305.select — (no submodules)
- xchacha20-poly1305 — (no submodules) - xchacha20-poly1305.native — …
- xchacha20-poly1305.native — (no submodules)
- xchacha20-poly1305.native — (no submodules)
- xchacha20-poly1305.noble — (no submodules)
- xchacha20-poly1305.noble — (no submodules)
- xchacha20-poly1305.select — (no submodules)
- xchacha20-poly1305.select — (no submodules)
- xchacha20-poly1305 — (no submodules) - xchacha20-poly1305.native — …
- xchacha20-poly1305.native — (no submodules)
- streaming-aead — (no submodules)
- streaming-aead — (no submodules)
- streaming-aead-aes-gcm — (no submodules)
- streaming-aead-aes-gcm — (no submodules)
- streaming-aead-xchacha20 — (no submodules)
- streaming-aead-xchacha20 — (no submodules)
- chacha20-poly1305.select — (no submodules)- chacha20-poly1305.select — (no submodules)- chacha20-poly1305.native — (no submodules)- chacha20-poly1305.native — (no submodules)- chacha20-poly1305.noble — (no submodules)- chacha20-poly1305.noble — (no submodules)- chacha20-poly1305 — (no submodules)- chacha20-poly1305.select — <…
- xchacha20-poly1305.native — (no submodules)- xchacha20-poly1305.native — (no submodules)- xchacha20-poly1305.noble — (no submodules)- xchacha20-poly1305.noble — (no submodules)- xchacha20-poly1305.select — (no submodules)- xchacha20-poly1305.select — (no submodules)- xchacha20-poly1305 — (no submodules)- xchacha20-poly1305.native —…
- aes-256-gcm.select — (no submodules)- aes-256-gcm.select — (no submodules)- aes-256-gcm.native — (no submodules)- aes-256-gcm.native — (no submodules)- aes-256-gcm.noble — (no submodules)- aes-256-gcm.noble — (no submodules)- aes-256-gcm — (no submodules)- aes-256-gcm.select — _(no…
- chacha20-poly1305.select — (no submodules)- chacha20-poly1305.select — (no submodules)- chacha20-poly1305.native — (no submodules)- chacha20-poly1305.native — (no submodules)- chacha20-poly1305.noble — (no submodules)- chacha20-poly1305.noble — (no submodules)- chacha20-poly1305 — (no submodules)- chacha20-poly1305.select — …
- xchacha20-poly1305.native — (no submodules)- xchacha20-poly1305.native — (no submodules)- xchacha20-poly1305.noble — (no submodules)- xchacha20-poly1305.noble — (no submodules)- xchacha20-poly1305.select — (no submodules)- xchacha20-poly1305.select — (no submodules)- xchacha20-poly1305 — (no submodules)- xchacha20-poly1305.native — <!-- begin:auto-docs --…
Primitives
aes-256-gcm— NIST SP 800-38D, 12-byte nonce, 16-byte tag (appended).chacha20-poly1305— RFC 8439, 12-byte nonce, 16-byte tag (appended).xchacha20-poly1305— IETF draft-irtf-cfrg-xchacha, 24-byte nonce, 16-byte tag.
Subpath exports
@suaveplan/crypto-cipher/aes-256-gcm@suaveplan/crypto-cipher/chacha20-poly1305@suaveplan/crypto-cipher/xchacha20-poly1305
Implementation flavour ('noble' vs 'native') is selected at build time via
crypto.config.ts. All Phase 0 impls route to @noble/ciphers.