stash-encryption

Installation
SKILL.md

CipherStash Stack - Encryption

Comprehensive guide for implementing field-level encryption with @cipherstash/stack. Every value is encrypted with its own unique key via ZeroKMS (backed by AWS KMS). Encryption happens client-side before data leaves the application.

Encrypted columns are EQL v3 concrete Postgres domains (public.eql_v3_text_search, public.eql_v3_integer_ord, ...): each column's query capabilities are fixed by the domain type you pick in the schema, and the Encryption client (typed for an all-v3 schema set) derives precise TypeScript types from that schema — wrong-typed plaintext is a compile error, not a runtime surprise.

EQL v2 is a read-compatibility path only. The v2 schema builders and the @cipherstash/stack/client subpath have been removed; decrypt / decryptModel still read stored v2 payloads so existing deployments keep working — see "Legacy: EQL v2" at the end. Author every schema and every new write with the v3 surface this skill describes.

When to Use This Skill

  • Adding field-level encryption to a TypeScript/Node.js project
  • Defining encrypted table schemas with the types.* domain catalog
  • Encrypting and decrypting individual values or entire models
  • Implementing searchable encryption (equality, free-text, range, encrypted JSON)
  • Bulk encrypting/decrypting large datasets
  • Implementing identity-aware encryption with JWT-based lock contexts
  • Setting up multi-tenant encryption with keysets
  • Rolling encryption out to a production table with live plaintext data
Installs
16
GitHub Stars
155
First Seen
Mar 5, 2026
stash-encryption — cipherstash/stack