Skip to content

Server-side crypto invariants #562

Description

@codebestia

Write apps/backend/docs/concepts-crypto-invariants.md covering lib/ciphertextInvariant.ts and lib/signalInvariants.ts — the guards that keep the server from ever accepting or storing material it must not hold, and the security-ci job that regression-tests them.

Acceptance criteria:

  • States the invariants plainly: the server stores ciphertext only, and never accepts session state, ratchet state, or private keys on any inbound payload
  • Documents findForbiddenSessionStateField and the rejected field names, and that rejection happens before any database lookup
  • Explains why the relevant Zod schemas are .strict() — a non-strict schema silently strips a forbidden field instead of rejecting the request
  • Documents the security-ci regression job that keeps these enforced

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions