All posts · · 4 min read
Keep the enclave small
Every line inside the box costs more to write, more to change and more to verify — and each change invalidates the measurement your customers pinned. The split between the confidential core and the ordinary product is the highest-leverage decision in the design.
The first confidential architecture most teams draw puts the product inside the enclave. The web tier, the database, the dashboard, the jobs — all of it, because all of it touches the data eventually.
It is the expensive answer, and it is usually the wrong one. Not because an enclave is slow, but because of what living inside one costs you afterwards.
What a line of code costs inside the box§
- Every change changes the measurement. The measurement is what your customers pinned. A copy fix in a template ships a new PCR0, and every counterparty who verifies has to accept a new expected value. That is a release process with other companies' security teams in it.
- The environment is hostile to ordinary software. On Nitro there is no persistent storage, no interactive access and no network of its own — every byte crosses a vsock proxy you maintain. Keeping a state a restart survives means sealed keys or a KMS integration.
- The audit surface is the whole thing. The value of the box is that someone reads the code inside it. Ten thousand lines make that a project nobody finishes; two hundred make it an afternoon.
The split§
Put in the enclave what is true of both: code you would be willing to publish, over data you are not allowed to read. Everything else stays outside.
| Inside | Outside |
|---|---|
| The decision: the score, the match, the payout rule, the signature | The site, sign-up, sessions, the dashboard |
| Decryption of what the counterparty sent | Storage of the ciphertext, the queue, retries |
| The key that only this code may use | Billing, quotas, emails, the audit trail |
| The one value that comes back out | Everything the customer looks at |
The shape follows: the outside holds ciphertext and metadata, hands the enclave a job, and receives a small, deliberate answer. In Synsema that last part is not a convention — the response is a public sink, so anything private that is not explicitly declassified never leaves:
let score be private(payload["score"], "applicant")
let approved be score >= CUTOFF
give declassify(approved, "the yes/no is what the lender asked for; the score stays inside")
One value, one sentence saying why it may be published, and that sentence is listed by synsema code check --json before anything runs. A small enclave has a short list, and a short list is a security review your customer can actually read.
Rollover: plan it before the first customer§
Because the measurement is pinned, shipping is different inside the box:
1. Publish the new program_sha and the expected measurement before the rollout, wherever customers look for it. 2. Run the old and the new version side by side during the window. Clients that pinned the old measurement keep working; clients that adopt the new value move over. 3. Retire the old one on a date you announced. This is API deprecation, with cryptography instead of a version header.
Teams that skipped this discover it the first time a security fix has to ship on a Friday.
Where each half runs§
The enclave runs where you chose — Nitro, a confidential VM, dstack, or anchored to a chain; that is the previous post. The rest is ordinary software with an unusual neighbour, and it needs exactly what any product needs: HTTPS, sessions, a database, secrets that are never printed, scheduled jobs, a dashboard, billing.
That is what this platform does. syn deploy puts the public tier online with a certificate, an audit trail of every capability the program used, and secrets stored sealed — and it does it in one command, so the interesting half of your week goes to the two hundred lines that live in the box.
The two halves talk over ordinary HTTPS, with one addition: before the outside tier sends a job in, it verifies the enclave's identity document and pins the key from it. Twenty lines, the same language, no SDK — the shape is in the manual.
The rule of thumb§
If you cannot say, in one sentence per value, what comes out of the enclave and why — the box is too big. Shrink it until you can. Every hour spent doing that is repaid in the release process, in the audit, and in the conversation where a customer's security team asks what exactly they are trusting.