You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Make cc-eventlog / verification core usable as a downstream dependency #1515
Context: private-ai-gateway verifies dstack TDX evidence in a Rust gateway, a Rust desktop CLI and a browser TS client, and wants to use upstream code instead of its own RTMR3 event-log verification (Dstack-TEE/private-ai-gateway#531).
Blockers at verifier-v0.6.3:
cc-eventlog depends on serde_jcs 0.2, which unconditionally enables serde_json/float_roundtrip. Cargo feature unification turns it on for the whole downstream build and changes float parsing app-wide. The V2 canonical JSON only has the fixed keys {name, payload, type} with string/hex/u32 values, so it doesn't need serde_jcs, or serde_jcs could sit behind an optional feature.
cc-eventlog / dstack-types / dstack-attest aren't on crates.io, so downstream must use git deps.
dstack-attest can't build for wasm32 or be used verification-only: it pulls in rustix and the guest-side tdx/tpm/nsm/sev-snp attest crates unconditionally, and fetches collateral itself. cc-eventlog alone already builds for wasm32-unknown-unknown.
@phala/dstack-sdkreplayRtmrs replays the advertised digests without recomputing them from event payloads, so it can't be used to verify an untrusted event log.
Ask:
(a) drop or gate serde_jcs in cc-eventlog;
(b) publish cc-eventlog and dstack-types;
(c) a verification-only, wasm-buildable dstack-attest that accepts caller-supplied collateral, ideally with an npm/wasm build;
Thanks for the detailed report. We confirmed all four points. Two extra findings:
dstack-types (a dependency of cc-eventlog) also pulls in serde_jcs unconditionally, so float_roundtrip would still leak if only cc-eventlog were changed. gpu_policy_hash canonicalizes arbitrary JSON, so it does need correctly rounded float parsing; it will move behind a feature instead of being dropped.
replayRtmrs has been removed from the JS SDK on next (0.6.0). Only docs/verification.md is stale. In 0.5.x it must not be used to verify an untrusted event log.
Our plan: only verification-side crates will be published, all with a dstack- prefix. Attestation generation code stays guest-only and unpublished.
Phase 1: what this issue needs
Remove the serde_jcs / float_roundtrip leak: hand-written V2 canonical JSON in cc-eventlog (byte-for-byte tested against serde_jcs) and serde_jcs gated behind a feature in dstack-types. Acceptance: cargo tree -p cc-eventlog -e features shows no float_roundtrip. Your PR for (a) is welcome; please cover dstack-types as well.
Move guest-side code (read_event_log etc.) out of cc-eventlog.
Rename cc-eventlog to dstack-cc-eventlog (the lib name stays cc_eventlog), prepare dstack-types and size-parser for publishing, and add cargo publish --dry-run to CI.
Fix the stale replayRtmrs docs.
After phase 1, a TDX verifier can use dcap-qvl (wasm-capable, takes caller-supplied collateral) plus dstack-cc-eventlog without depending on dstack-attest.
Activity
kvinwang commentedon Nov 18, 2026
Thanks for the detailed report. We confirmed all four points. Two extra findings:
dstack-types(a dependency ofcc-eventlog) also pulls inserde_jcsunconditionally, sofloat_roundtripwould still leak if onlycc-eventlogwere changed.gpu_policy_hashcanonicalizes arbitrary JSON, so it does need correctly rounded float parsing; it will move behind a feature instead of being dropped.replayRtmrshas been removed from the JS SDK onnext(0.6.0). Onlydocs/verification.mdis stale. In 0.5.x it must not be used to verify an untrusted event log.Our plan: only verification-side crates will be published, all with a
dstack-prefix. Attestation generation code stays guest-only and unpublished.Phase 1: what this issue needs
serde_jcs/float_roundtripleak: hand-written V2 canonical JSON incc-eventlog(byte-for-byte tested againstserde_jcs) andserde_jcsgated behind a feature indstack-types. Acceptance:cargo tree -p cc-eventlog -e featuresshows nofloat_roundtrip. Your PR for (a) is welcome; please coverdstack-typesas well.read_event_logetc.) out ofcc-eventlog.cc-eventlogtodstack-cc-eventlog(the lib name stayscc_eventlog), preparedstack-typesandsize-parserfor publishing, and addcargo publish --dry-runto CI.replayRtmrsdocs.After phase 1, a TDX verifier can use
dcap-qvl(wasm-capable, takes caller-supplied collateral) plusdstack-cc-eventlogwithout depending ondstack-attest.Phase 2: verification-only
dstack-attest(tracked separately)nsm_attest::AttestationDocumentintonsm-qvl.sev-snp-qvlaccept caller-supplied collateral, with fetching as an optional feature.dstack-attestintodstack-attest-verify(published) and a guest-sidedstack-attest, then publish the verification crates.An npm/wasm package is out of scope for now.
There's no committed timeline yet. Phase 1 will be prioritized.