COSE receipt verification in C++ API #7494
Merged
Merged
Conversation
744b727 to
9698e57
Compare
13 tasks
9698e57 to
d7223d4
Compare
Contributor
There was a problem hiding this comment.
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 |
d7223d4 to
2f13c2f
Compare
achamayou
reviewed
Dec 1, 2025
achamayou
reviewed
Dec 1, 2025
achamayou
reviewed
Dec 1, 2025
eddyashton
reviewed
Dec 2, 2025
eddyashton
reviewed
Dec 2, 2025
eddyashton
reviewed
Dec 2, 2025
eddyashton
reviewed
Dec 2, 2025
eddyashton
reviewed
Dec 2, 2025
achamayou
reviewed
Dec 5, 2025
achamayou
reviewed
Dec 5, 2025
achamayou
reviewed
Dec 5, 2025
achamayou
reviewed
Dec 5, 2025
achamayou
reviewed
Dec 5, 2025
achamayou
reviewed
Dec 5, 2025
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
achamayou
approved these changes
Dec 8, 2025
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.
Two items of #7401.
This adds
Hence