Data flow
Key hierarchy
All encryption keys derive from a single master key using HKDF-SHA-256. You store and protect one secret — everything else is derived deterministically.- Master key: Generated once with
blindcast keygen. Stored in a secret manager. Never sent to browsers. - Content key: Derived per
contentId. The key server issues this to authenticated viewers. - Segment key (optional): Derived per epoch for key rotation. The manifest includes a new
EXT-X-KEYtag every N segments.
Content IDs
A content ID is an arbitrary string that uniquely identifies a piece of content. It serves two critical purposes:- Key derivation context — the key server uses it as the HKDF
infoparameter: different content ID = different encryption key. Two pieces of content encrypted with the same master key but different content IDs produce completely different ciphertext. - Storage path prefix — by convention, encrypted segments are stored under
content/<contentId>/in S3/R2. The manifestEXT-X-KEYURI also embeds the content ID.
my-video-001, lecture-2026-03). Avoid special characters — the content ID appears in URLs and S3 key paths.
Control plane vs. data plane
The BlindCast Server separates control plane (content management, API keys) from data plane (key derivation, encrypted byte storage):- Control plane handles content registration, API key management, and admin operations. All state lives in Postgres.
- Data plane handles key derivation and presigned URLs. The key server checks the content registry before deriving keys — unregistered or disabled content returns 404.
What each tool does
| Tool | Responsibility | Runs on |
|---|---|---|
| CLI | Generate keys, encrypt segments, upload to S3, run dev server | Your machine or CI |
| Uploader | Encrypt segments in-browser, upload via presigned URLs | Creator’s browser |
| Server | Full backend — content registry, API keys, key derivation, presign, admin dashboard | Docker container |
| Key Server | Standalone key derivation and viewer auth | Docker container or Cloudflare Worker |
| Player | Fetch manifest, get key, decrypt segments, render video | Viewer’s browser |
Next steps
- Quick Start — see encrypted playback in ~10 minutes
- Zero-Knowledge Explained — understand the trust model