Skip to content

Conversation

@maxtropets
Copy link
Collaborator

@maxtropets maxtropets commented Nov 30, 2025

Two items of #7401.

This adds

  • a (private) unified C++ API for decoding COSE-formatted CCF receipts.
  • a public C++ API to verify COSE-receipt against the current service identity
    • as explained in the umbrella ticket, this will be advanced once pulling up previous identities on the startup gets resolved.

Hence

  • decoding + unit test
  • verifying + end to end test: extended merkle-proof one, now verifies receipt and all its proofs (+cddl)

@maxtropets maxtropets self-assigned this Nov 30, 2025
@maxtropets maxtropets force-pushed the f/cose-receipts-verify-api branch 2 times, most recently from 744b727 to 9698e57 Compare November 30, 2025 19:33
@maxtropets maxtropets force-pushed the f/cose-receipts-verify-api branch from 9698e57 to d7223d4 Compare November 30, 2025 19:42
@maxtropets maxtropets changed the title [WIP] COSE receipt verification in C++ API COSE receipt verification in C++ API Nov 30, 2025
@maxtropets maxtropets marked this pull request as ready for review November 30, 2025 19:48
@maxtropets maxtropets requested a review from a team as a code owner November 30, 2025 19:48
Copilot AI review requested due to automatic review settings November 30, 2025 19:48
@maxtropets maxtropets added the run-long-test Run Long Test job label Nov 30, 2025
Copilot finished reviewing on behalf of maxtropets November 30, 2025 19:50
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds C++ APIs for decoding and verifying COSE-formatted CCF receipts. It introduces a private unified C++ API for decoding receipts and a public API to verify receipts against the current service identity.

Key Changes:

  • New decode_ccf_receipt() function for parsing COSE receipts with Merkle proof validation
  • New public verify_cose_receipt() API for signature verification against network identity
  • Extended end-to-end tests to verify receipts and validate CDDL compliance for all proofs

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/node/cose_common.h Implements COSE receipt decoding with Merkle proof parsing and root recomputation
src/node/historical_queries_utils.cpp Implements public verification API using decoded receipts
src/node/node_state.h Updates to use new decoding API instead of extracting issuer/subject directly
include/ccf/historical_queries_utils.h Exposes public verify_cose_receipt() API
samples/apps/logging/logging.cpp Adds /log/public/verify_cose_receipt endpoint
tests/e2e_logging.py Extends test to verify COSE receipts with positive and negative test cases
src/crypto/test/cose.cpp Adds unit test for receipt decoding
doc/schemas/app_openapi.json Adds OpenAPI schema for new endpoint
CHANGELOG.md Documents the new API

@maxtropets maxtropets force-pushed the f/cose-receipts-verify-api branch from d7223d4 to 2f13c2f Compare November 30, 2025 19:52
@maxtropets maxtropets removed the run-long-test Run Long Test job label Dec 5, 2025
@maxtropets maxtropets requested a review from Copilot December 5, 2025 15:46
Copilot finished reviewing on behalf of maxtropets December 5, 2025 15:50
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.

@maxtropets maxtropets merged commit 1d929c0 into microsoft:main Dec 8, 2025
17 checks passed
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.

3 participants