feat(attester): add pure-Go attester library (attester-go)#98
Merged
Conversation
Collaborator
|
@jialez0 ,您好,您的请求已接收,请耐心等待结果。 |
Collaborator
|
@jialez0 ,您好,未检测到有镜像需要构建,如需重新检测请评论 /start 。 |
Add attestation-agent/attester-go, a pure-Go re-implementation of the `attester` crate that collects TEE evidence with no cgo and no external shared library (in particular without libtdx_attest/DCAP). Evidence is JSON byte-compatible with the Rust attester so it verifies against an unmodified Trustee attestation-service. Platforms: sample, TDX (ConfigFS TSM + GET_REPORT0/QGS over vsock + GET_QUOTE TDVMCALL ioctl, all native), SNP (/dev/sev-guest ioctl), CSV (/dev/csv-guest ioctl, self-contained SM3). Optional NVIDIA GPU evidence behind the `gpu` build tag via go-nvml (dlopen, no hard dependency). Code is organized into an `api` contract package, `internal` helpers (ioctl/eventlog/tsm/sm3/util) and one package per platform under `platform/`, wired by a thin top-level facade. The default build is fully static (CGO_ENABLED=0). TDX has been validated end-to-end on real Intel TDX hardware. Signed-off-by: Jiale Zhang <zhangjiale@linux.alibaba.com>
jialez0
force-pushed
the
feat/attester-go
branch
from
July 15, 2026 11:32
69acb12 to
6c742b2
Compare
Collaborator
|
@jialez0 ,您好,您的请求已接收,请耐心等待结果。 |
Collaborator
|
@jialez0 ,您好,未检测到有镜像需要构建,如需重新检测请评论 /start 。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
attestation-agent/attester-go, a pure-Go re-implementation of theattestercrate. It collects TEE attestation evidence from a confidential guest and produces evidence whose JSON is byte-compatible with the Rust attester, so it verifies against an unmodified Trusteeattestation-service.Why
To let Go programs collect TEE evidence with no cgo and no external shared library — in particular without
libtdx_attest.so/DCAP. Every platform is driven through native kernel interfaces (ConfigFS TSM, ioctl on/dev/tdx_guest,/dev/sev-guest,/dev/csv-guest, vsock). The default build (CGO_ENABLED=0) is a fully static binary with zero platform.sodependencies, so one binary runs across heterogeneous TEE hosts and undetected platforms are simply skipped.Platforms
/sys/kernel/config/tsm/report), primary;GET_REPORT0+ QGS message over vsock (when/etc/tdx-attest.confsets a port);TDX_CMD_GET_QUOTETDVMCALL ioctl (whatlibtdx_attestdoes internally, reimplemented without the library).Plus
GET_REPORT0forBindInitData/GetRuntimeMeasurementand RTMR extend (sysfs +TDX_CMD_EXTEND_RTMRioctl)./dev/sev-guestSNP_GET_EXT_REPORT(report + cert chain)./dev/csv-guestCSV_GET_REPORTwith a self-contained SM3, PEK/serial extraction, optional HSK/CEK download from the Hygon KDS.-tags gpu) — NVIDIA NVML via go-nvml, whichdlopenslibnvidia-mlat runtime (no hard dependency; the binary still starts without a driver).Evidence compatibility
The evidence structs reproduce
serde_json's exact output of the Rust types: fixed[u8; N]render as number arrays ([N]byte, never base64),Vec<u8>fields that must be number arrays use a custom marshaler, newtype wrappers render as bare numbers, SNPcert_typeas bare string /{"OTHER":...}, andOptionfields keep the exactnull/omitted behaviour.Testing
GET_QUOTETDVMCALL ioctl path produces a valid quote, and both the inputreport_dataand the RTMRs read viaGET_REPORT0are verified to be embedded in the produced quote.sev4.0.0 andcsv-rsABIs but have not yet been exercised on real SNP/CSV hardware.Notes
attestation-agent/attester-go; does not touch the existing Rust crates.golang.org/x/sys;go-nvmlis pulled in only under-tags gpu.