🛸 Hitchhiker's Guide — Phase 11: Security, Licensing & Protection
Read this if: you can build the platform (Phase 09) but not yet protect and sell it into sovereign/regulated deployments. Defensive/licensing focus; every technique with its defeat condition. Derivations in the WARMUP.
0. The 30-second mental model
On hardware the attacker controls you can raise cost, never achieve impossibility — except with a hardware root of trust (attestation, confidential computing). The stack, weakest→strongest: signed offline licenses + fuzzy fingerprint (economic/legal) → anti-tamper + targeted obfuscation (cost) → attestation + confidential computing (hardware-rooted guarantee). Apply proportionally to the stakes. Never say "uncrackable."
1. Crypto card
| Primitive | Use | Note |
|---|---|---|
| SHA-256 | fingerprint hardware/code | one-way, not secret |
| Ed25519 sign/verify | licenses | private signs, public verifies — public ships safely |
| sign vs encrypt | sign licenses, encrypt weights | license isn't secret, just unforgeable |
| private key | the crown jewel | HSM/KMS, never in repo/ship |
2. Licensing card (Lab 01)
license = { customer, features, max_gpus, expiry, fuzzy_fingerprint, id } + Ed25519 sig
verify (OFFLINE, embedded public key): sig ok? not expired (grace + rollback-resist)?
fingerprint fuzzy-matches? features in scope?
- Fuzzy fingerprint: GPU UUIDs + board + MAC, match ≥N-of-M (NIC swap ok, different machine no). GPU UUIDs hardest to spoof.
- Grace period: bounded window past expiry (avoid outages on renewal lag).
- Clock rollback: monotonic high-water-mark; reject earlier-than-seen time.
- Air-gap activation: fingerprint+nonce out-of-band → signed response back.
- Defeat condition: root + binary → patch the verifier. Licensing = economic+legal deterrent. Attestation is the strong fix.
3. Protection card (Lab 02)
| Technique | Buys | Defeat condition |
|---|---|---|
| integrity self-check | catches casual patching | patch the checker too |
| obfuscation | attacker-hours | CPU runs it → analyst eventually reads it |
| anti-tamper response | speed bump | calibrate; avoid DRM theater (false positives) |
| attestation | hardware-rooted proof of state | trust root must be sound; proves what loaded |
| confidential computing | weights/data secret from host | TEE + attestation gating |
Self-check vs attestation: the difference is who verifies and where the key lives — patchable software vs external verifier + hardware key.
4. Sovereign deployment card (the market)
No phone-home (offline license/activation, local secrets) · supply-chain integrity (signed artifacts, reproducible builds, SBOM) · auditability (tamper-evident logs) · layered protection by stakes. This is what wins defence/finance/healthcare/government deals a cloud-assuming competitor can't.
5. War stories (calibration)
- "We told the customer it was uncrackable" — lost credibility when a researcher patched the check in an afternoon. Now: "raises cost above license price, here are the defeat conditions, attestation for high-stakes."
- "License check locked out a customer who swapped a NIC" — brittle single-hash fingerprint. Fuzzy N-of-M fixed it; support tickets vanished.
- "Clock rollback gave free perpetual licenses" — added the monotonic high-water-mark. Raised cost (they'd have to tamper the store too).
- "Obfuscated everything, builds slow, debugging hell, still RE'd" — obfuscation belongs on specific high-value code, not the whole platform.
- "Sovereign customer needed weights protected from their own admins" — confidential computing (H100 CC) + attestation-gated weight decryption was the only real answer; licensing alone couldn't do it.
6. Exit bar
You can threat-model honestly (raise cost vs hardware guarantee), build a signed offline hardware-bound license with grace + rollback resistance, explain sign-vs-encrypt and key custody, implement and honestly bound anti-tamper, and explain why attestation/confidential computing are the strong tier for sovereign weights and data. You've built the license system and the integrity check. Next: Phase 12 — compose everything (HAL, scheduler, serving, observability, security) into the platform, and lead it.