Skip to content

feat(id-core): payload, body, signature and envelope identity separation (#10226) - #11931

Merged
dezren39 merged 1 commit into
mainfrom
feat-10226-envelope-identities
Nov 18, 2026
Merged

dezren39 merged 1 commit into
mainfrom
feat-10226-envelope-identities

Conversation

@dezren39

@dezren39 dezren39 commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

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_envelope defines four identities over different bytes, none recursive. PayloadId is the profile hash of the exact raw payload (no prefix for raw BLAKE3). The canonical Body commits the payload ID and length, domain, context, signer, key and suite, plus signed references to a subject, a LogicalGraphId and a predecessor EnvelopeId; it never holds the payload, the signature or its own envelope ID. The signature covers id/signed-body/v1\0 || u32_be(len(domain)) || domain || canonical_cbor(Body). EnvelopeId hashes 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 configured ProfileDispatch, so an unadmitted profile is unsupported_profile, not a mismatch.

How: New module, not yet exported from lib.rs (slice 9110-02 owns exports), so tests/signed_envelope_identity.rs path-includes it with canonical_cbor, id_shape and hash_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


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

…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>
@dezren39
dezren39 requested a review from a team as a code owner November 18, 2026 21:38
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-18T21:39:32.813088Z e6af7ca PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@dezren39
dezren39 merged commit f0fe493 into main Nov 18, 2026
@dezren39
dezren39 deleted the feat-10226-envelope-identities branch November 18, 2026 21:38
@coderabbitai

coderabbitai Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Explain Change →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

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.

2 participants