-
Notifications
You must be signed in to change notification settings - Fork 245
COSE receipt verification in C++ API #7494
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
COSE receipt verification in C++ API #7494
Conversation
744b727 to
9698e57
Compare
9698e57 to
d7223d4
Compare
There was a problem hiding this 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 |
d7223d4 to
2f13c2f
Compare
There was a problem hiding this 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.
Co-authored-by: Copilot <[email protected]>
Two items of #7401.
This adds
Hence