mirror of
https://github.com/luxfi/ai.git
synced 2026-10-30 17:02:43 +00:00
lux/ai had a SECOND attestation system (stubbed NVIDIA nvtrust local verifier + hand-rolled SEV-SNP/TDX byte parsers) parallel to the canonical cc/attest. This decomplects verify from policy: the VERIFY primitive is now the single github.com/luxfi/cc/attest, and only the AI trust-score POLICY lives here. - DELETE pkg/attestation/nvtrust.go: the NvtrustVerifier with its fake verifyCertificateChain/verifySPDMSignature/verifyAgainstRIM and empty nvidiaCCRootCert placeholder. No real crypto was being done. - DELETE the hand-rolled ParseSEVSNPReport/ParseTDXQuote + verifySGX/SEV/TDX quote methods (parallel CPU primitives that duplicated cc/attest). - verify_cc.go (NEW): the bridge to cc/attest. VerifyCPUAttestation delegates CPU TEE verification to cc/attest (real SEV-SNP chain verify; TDX routed; SGX/ARM fail-closed). VerifyGPULocalEvidence runs the cloud-free NVIDIA KindNVTrust verifier (signed-RIM match) and returns a verified GPUAttestation. - attestation.go: KEEPS the AI semantics intact as POLICY ON TOP of the unified verify — trust-score tiers (calculateLocal/SoftwareTrustScore), ModeLocal vs ModeSoftware, IsHardwareCCCapable, DeviceStatus tracking, software-GPU attestation. VerifyGPUAttestation scores a verified attestation (unchanged behaviour ⇒ aivm provider Reputation gating preserved). - go.mod: require the leaf github.com/luxfi/cc (local replace ../cc until tagged). ai gains ZERO luxfi/mpc dependency — confidential-AI stays decoupled from the MPC custody system; attestation is the orthogonal concern both share. Tests: policy tests preserved verbatim; CPU tests reframed to assert real fail-closed delegation; new verify_cc_test proves the KindNVTrust crypto path + trust-score policy end to end. attestation/aivm/cc/rewards all green.