mirror of
https://github.com/luxfi/cc.git
synced 2026-09-24 00:24:54 +00:00
b9686b583757d91e0891c1b8534ebbc590a0720b
Fold Dispatch's hard Kind switch into the init() registry SGX introduced.
The registry (registry map, registerVerifier, RegisteredVerifier) moves out
of sgx.go into verifier.go as framework; Dispatch becomes one registry
lookup, fail-closed (ErrUnsupportedKind) for an unregistered Kind. The
switch — including Nitro's added case — is deleted: there is now exactly one
routing path.
Each Kind file is self-contained: its string const, its Verifier impl, its
per-call options, and its 'func init() { registerVerifier(...) }' live
together. SEVSNP/TDX/NVTrust/Nitro consts move out of verifier.go beside
their verifiers (SGX already did this); NVTrust's per-call WithNVTrustRIM /
WithNVTrustTrustRoots move to nvtrust.go for symmetry with WithNitro*. The
shared config keeps the per-Kind per-call policy fields (kdsGetter is shared
by SEV+TDX; nvtrust RIM/roots; nitro roots/PCRs/maxAge); NVTrust's
deployment trust anchors stay on the struct via NewNVTrust. NVTrust
registers its fail-closed zero value, matching prior Dispatch semantics.
registerVerifier panics on a duplicate Kind — a duplicate registration is a
programmer error that must fail loud at startup, never silently shadow a
verifier on the trust path.
doc.go: drop the now-false TDX/NVTrust STUB labels (both real), document all
five shipped Kinds + the registry + the pending ARMCCA slot, and the TDX
MRTD+RTMR measurement fold. verifier_test.go: retire the stub tests (done by
the TDX merge) and add TestRegistry_RoutesEveryKind asserting registry
routing for all five Kinds and fail-closed for the unregistered armcca slot.
go build/vet/test + go test -race ./attest/... all green; gofmt clean.
luxfi/cc — Confidential Compute attestation
github.com/luxfi/cc is the single, vendor-neutral attestation verifier
for the Lux confidential-compute control plane. It is an orthogonal leaf:
the MPC custody system (luxfi/mpc), the TEE custody extension (luxfi/tee),
and the confidential-AI / proof-of-AI system (luxfi/ai) all depend on it,
and it depends on none of them. There is exactly one attestation verifier;
hardware platforms are orthogonal Kinds behind one Verify interface.
Packages
| Import | Purpose |
|---|---|
github.com/luxfi/cc/attest |
The Verifier interface, VerifiedReport, Option, and Dispatch(kind, evidence, opts...). One entry point per hardware Kind. |
github.com/luxfi/cc/attest/nvidia |
NVIDIA GPU primitives: GPU evidence parser, signed-RIM verifier + measurement matcher, and the NRAS remote-attestation JWS client. Backend for KindNVTrust. |
Kinds (orthogonal hardware platforms)
KindSEVSNP— AMD SEV-SNP CPU. PRODUCTION. Live VCEK fetch from the AMD KDS, full ARK→ASK→VCEK chain + report-signature verification (google/go-sev-guest).KindTDX— Intel TDX CPU. Stub (ErrNotImplemented, fail-loud). Tracked forgo-tdx-guest+ Intel PCS.KindNVTrust— NVIDIA GPU confidential compute. PRODUCTION local-RIM mode (cloud-free): verifies the NVIDIA-signed Reference Integrity Manifest against an operator-pinned key, then matches every reported GPU measurement to the signed golden value. No NVIDIA cloud dependency. The remote NVIDIA Remote Attestation Service (NRAS) JWS path is the lower-levelnvidia.NRASClientprimitive for deployments that accept a cloud anchor.
Invariants
- No insecure mode. A verify with no trust anchor is refused, never
best-effort.
KindNVTrustrefuses an empty RIM or empty trust-root set. - One
VerifiedReporttype shared across all consumers — required so thekms.CompositeAttestationrelease-gate interface has a single, unambiguous signature acrossluxfi/mpc,luxfi/tee, andluxfi/ai. (nil, err)means refuse. No partial reports on error.- Tests never hit the network. AMD KDS responses are replayed from
attest/testdata; NVIDIA RIM fixtures are signed in-test.
Build
export SDKROOT="$(xcrun --show-sdk-path)" # macOS
GOWORK=off go build ./...
GOWORK=off go test ./...
Languages
Go
100%