mirror of
https://github.com/luxfi/crypto.git
synced 2026-07-27 01:54:50 +00:00
Real parsers for the three production TEE quote formats, decoding the documented binary layouts and verifying the full vendor trust chain (no longer the canonical-model stand-in): - SGX (DCAP v3): header+report body offsets (MRENCLAVE@112, report_data@368); PCK chain→pinned Intel root, PCK signs the QE report, the QE report binds the attestation key (sha256(attestPub‖authData)), the attestation key signs the quote — full DCAP flow. - TDX (DCAP v4): version 4 / tee_type 0x81, MRTD@184, report_data@568; same sigData chain. - SEV-SNP: 1184-byte report, measurement@0x90, report_data@0x50, P-384 VCEK signature@0x2A0 (LE scalars), VCEK→pinned AMD root. All verify the operator-key binding in report_data. 9/9 incl. tampered-measurement (sig fails), unpinned-root (chain fails), unbound-key for each format.