Skip to content

feat!(attestation): report the DCAP collateral a verification consumed - #85

Open
samlaf wants to merge 1 commit into
flashbots:mainfrom
SeismicSystems:sei-208/pr1-report-verified-collateral
Open

feat!(attestation): report the DCAP collateral a verification consumed#85
samlaf wants to merge 1 commit into
flashbots:mainfrom
SeismicSystems:sei-208/pr1-report-verified-collateral

Conversation

@samlaf

@samlaf samlaf commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Fixes half of #84. Verifying archived evidence against a pinned bundle at an explicit instant, the other half, follows separately.

TLDR is that we need to archive the collateral needed to reverify a quote at a later time (so we can reverify the quotes from the genesis machines on our chain). This PR is only the part that returns the archive. A separate PR needs to follow that allows passing the archived collateral as input. Kept separate because I found it hard to review both changes in one, and both introduce separate API breaking changes, so easier to keep them separate imo.

LLM Summary

The crate is usable as a relying party for a one-time event rather than a live handshake: evidence is verified once against a measurement policy and archived as permanent provenance. Nothing reported which collateral bundle a verification used, so there was nothing to archive alongside the evidence it verified.

Fetching a second copy next to the verification is the obvious workaround, and it is subtly wrong. A PCCS cache refresh between the two fetches makes the archived bundle a bundle rather than the bundle the verification consumed, and for provenance that distinction is the whole point.

Verification now returns VerifiedAttestation: the measurements, the collateral it consumed, and the instant every freshness check was evaluated at. The public entry points return Option

  • None when the evidence carried no attestation and none was expected, the one case with no bundle and no instant to report. Nesting the absence in one Option keeps the three fields from ever disagreeing.

One type serves every platform. A GCP TDX quote is a DCAP quote, and Azure wraps one in an HCL report and a vTPM attestation, so a verification always consumes exactly one collateral bundle, whichever platform produced the evidence. Azure holds its vTPM leg to the instant its DCAP leg reported, so verified_at is the single instant behind every freshness check rather than one per leg.

That instant is the other half of what archiving buys: with the bundle, the same evidence and the same instant give the same answer forever. QuoteCollateralV3 is re-exported so callers can keep the bundle without taking a direct dependency on dcap-qvl.

The return type of verify_attestation and verify_attestation_sync changes from Option to Option. Both in-tree callers discard the value, so neither needed a change.

The crate is usable as a relying party for a one-time event rather than
a live handshake: evidence is verified once against a measurement
policy and archived as permanent provenance. Nothing reported which
collateral bundle a verification used, so there was nothing to archive
alongside the evidence it verified.

Fetching a second copy next to the verification is the obvious
workaround, and it is subtly wrong. A PCCS cache refresh between the
two fetches makes the archived bundle *a* bundle rather than *the*
bundle the verification consumed, and for provenance that distinction
is the whole point.

Verification now returns VerifiedAttestation: the measurements, the
collateral it consumed, and the instant every freshness check was
evaluated at. The public entry points return Option<VerifiedAttestation>
- None when the evidence carried no attestation and none was expected,
the one case with no bundle and no instant to report. Nesting the
absence in one Option keeps the three fields from ever disagreeing.

One type serves every platform. A GCP TDX quote is a DCAP quote, and
Azure wraps one in an HCL report and a vTPM attestation, so a
verification always consumes exactly one collateral bundle, whichever
platform produced the evidence. Azure holds its vTPM leg to the instant
its DCAP leg reported, so verified_at is the single instant behind every
freshness check rather than one per leg.

That instant is the other half of what archiving buys: with the bundle,
the same evidence and the same instant give the same answer forever.
QuoteCollateralV3 is re-exported so callers can keep the bundle without
taking a direct dependency on dcap-qvl.

The return type of verify_attestation and verify_attestation_sync
changes from Option<MultiMeasurements> to Option<VerifiedAttestation>.
Both in-tree callers discard the value, so neither needed a change.

Addresses the reporting half of flashbots#84. Verifying archived evidence
against a pinned bundle at an explicit instant, the other half,
follows separately.
@samlaf samlaf changed the title attestation!: report the DCAP collateral a verification consumed feat!(attestation): report the DCAP collateral a verification consumed Aug 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant