cuck.stream is an invite-only, security-first webmail prototype for a trusted circle. The server stores mailbox contents as encrypted objects and should not need your mailbox private key. By cucks, for cucks.
core pieces: Go backend, PostgreSQL metadata, filesystem ciphertext object store, plain HTML/CSS/vanilla JS frontend, Go/WASM crypto helper, localhost dev listeners, project-local data.
| web app | ........................... | cmd/cuckmail serves pages/APIs on a loopback dev address; Go templates + static assets embedded/served from internal/web. |
| database | ........................... | PostgreSQL stores accounts, invites, aliases, folders, message metadata, sessions, challenges, audit events, tokens/queues. Private dev DB scripts use project-local .dev/. |
| object store | ........................... | internal/storage writes encrypted envelope bytes under the data directory; ordinary mailbox flows use ciphertext objects. |
| crypto | ........................... | Argon2id, TOTP, ML-DSA-87 auth signatures (CIRCL), ML-KEM-1024 (Go stdlib) + X448 hybrid key agreement, HKDF, AES-256-GCM envelope encryption, identity backup sealing. |
| mailbox | ........................... | internal/mailbox handles folders, encrypted message/summaries, quota accounting, move/delete/flags/export, raw ciphertext access for gateway paths. |
| smtp/imap | ........................... | localhost SMTP ingestion abstraction and IMAP ciphertext gateway. Useful for dev/testing; not mainstream-client transparent E2E mail. |
| password | ........................... | strong passphrase required (16+ chars). hashed with Argon2id; parameters configurable. |
| totp | ........................... | mandatory RFC 6238-compatible TOTP. QR/manual enrollment, replay/step checks, recovery-code path. |
| signature | ........................... | ML-DSA-87 signs a server-issued single-use challenge bound to scope/account/protocol/expiry. private auth key stays client-side. |
| sessions | ........................... | HttpOnly/SameSite cookies, CSRF tokens for state changes, session expiry, admin sessions separate from user sessions. |
| keys | ........................... | client generates ML-DSA-87 auth + ML-KEM-1024+X448 mailbox keys. server stores public keys; mailbox private key is for client decryption. |
| envelope | ........................... | CME1 envelope: version/suite/key ID, hybrid encapsulation data, salt/nonce/wrapped CEK, content nonce/ciphertext/tag. per-message CEK, authenticated encryption. |
| storage | ........................... | encrypted message objects and encrypted summaries stored as ciphertext files/objects. metadata in DB. exports can return ciphertext bundles for user download. |
| limits | ........................... | 256 MiB hard quota per account. deletion removes active objects/metadata paths; backup/retention semantics are operational concerns. |
Admin can create/revoke invitations, suspend/activate/delete accounts, view operational status, SMTP/IMAP state, and audit metadata. Admin has no mailbox decryption function. User features include aliases, folders, message view/delete/export, quota, and encrypted compose flows.
Project docs in repo: README.md, docs/SECURITY_RESEARCH.md, docs/THREAT_MODEL.md, docs/ARCHITECTURE.md, docs/DEVELOPMENT.md.