Repository navigation
feat(id-core): payload, body, signature and envelope identity separation (#10226) - #11931
Merged
Merged
Conversation
…ion (#10226) PayloadId hashes the exact raw payload under an explicit profile. The canonical Body commits payload ID, length, domain, context, signer, key, suite and signed references (subject, logical graph, predecessor). The Ed25519 signature covers a fixed prefix, the framed domain and canonical_cbor(Body). EnvelopeId hashes the complete canonical envelope (body, payload, signature) and is never embedded in the bytes it hashes. Every V1 field is critical; payload verification goes through the configured profile dispatch. Refs #10226 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Caution Review failedThe pull request is closed.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
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.
Before: id-core had deterministic CBOR (
canonical_cbor) and profile dispatch (hash_profile) but no signed-record type that keeps payload, body, signature and envelope identities apart.After:
signed_envelopedefines four identities over different bytes, none recursive.PayloadIdis the profile hash of the exact raw payload (no prefix for raw BLAKE3). The canonicalBodycommits the payload ID and length, domain, context, signer, key and suite, plus signed references to a subject, aLogicalGraphIdand a predecessorEnvelopeId; it never holds the payload, the signature or its own envelope ID. The signature coversid/signed-body/v1\0 || u32_be(len(domain)) || domain || canonical_cbor(Body).EnvelopeIdhashes the full canonical envelope{body, payload, signature}, so changing the signature changes the ID while the body stays put. Every V1 field is critical (unknown fields reject, absent optionals are omitted, never null), and payload checks go through the configuredProfileDispatch, so an unadmitted profile isunsupported_profile, not a mismatch.How: New module, not yet exported from
lib.rs(slice 9110-02 owns exports), sotests/signed_envelope_identity.rspath-includes it withcanonical_cbor,id_shapeandhash_profile. 13 tests: payload ID golden vectors, exact preimage layout and body field set, envelope ID over complete bytes, predecessor is signed but self ID never is, stable logical graph ID, classed rejections (digest mismatch, length, signature, unsupported profile, invalid UTF-8, key mismatch, suite, unknown field, null optional, missing field, future version, trailing bytes), and proptests for the preimage invariant, signature-change-changes-ID, round trip, and byte corruption.Refs #10226
Generated by Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.