Repository navigation
Conversation
…rifier Implement sigstore._internal.c2sp.proof with TLogProof parsing, serialization, extra-claim encoding/decoding, and RFC 6962 Merkle inclusion verification. Signed-off-by: Jussi Kukkonen <jkukkonen@google.com> Co-authored-by: Antigravity with Gemini 4 Argon
…mputation Implement sigstore._internal.c2sp.identity for computing domain-separated signature payloads and binary Merkle leaf hashes for public-key and OIDC entries per c2sp.org/identity-transparency/v1. Signed-off-by: Jussi Kukkonen <jkukkonen@google.com> Co-authored-by: Antigravity with Gemini 4 Argon
This slightly duplicates earlier rekor checkpoint code... but since that has some historical baggage I kept this implementation separate. Signed-off-by: Jussi Kukkonen <jkukkonen@google.com> Co-authored-by: Antigravity with Gemini 4 Argon
Member
Author
|
I have some self review notes I will address before making this ready for review |
Address C2SP spec compliance gaps and review findings across proof, checkpoint, and identity modules: - Enforce canonical RFC 4648 Section 3.5 Base64 decoding across tlog-proof, checkpoint root hashes, and note signature lines. - Reject duplicate (name, key_id) signature lines and bound maximum signature count (64) and inclusion proof hash count (64). - Restrict signature type 0x06 / subtree/v1 strictly to ML-DSA-44 and reject timestamp == 0 on ML-DSA-44 checkpoint cosignatures to prevent subtree/checkpoint confusion. - Validate checkpoint origin and cosigner names per tlog-cosignature (valid note name, <= 255 UTF-8 bytes) and guard uint64 bounds before int() / struct.pack() to avoid leaking ValueError or struct.error. - Require witness verifiers to be ML-DSA-44 (0x06) or Ed25519 with cosignature=True (0x04), ignore witness verifiers matching the log's own origin so a log cannot count as its own witness, fail closed on unsupported public key types and curves at NoteVerifier construction, validate key_id length >= 4, and chain verification error causes. - Narrow compute_oidc_leaf_hash to str and reject empty claim keys/values. - Add independent interop test vectors (c2sp.org/signed-note example, live staging ML-DSA-44 checkpoint, and rekor-tiles v2.4.2 identity_v1 leaf hashes), byte-layout tests, extension-line tests, partial (name, key_id) match tests, and negative test coverage. Signed-off-by: Jussi Kukkonen <jkukkonen@google.com> Assisted-by: Antigravity with Gemini
Member
Author
|
Making sure we really follow the specs did make the code a little longer but is likely worth it: there were at least two actual issues in the missing checks. I consider this ready for eview |
jku
marked this pull request as ready for review
November 19, 2026 11:30
This branch has not been deployed
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.
c2sp: Add C2SP tlog-proof, identity-transparency, and checkpoint primitives
Add internal C2SP transparency log primitives under sigstore._internal.c2sp to enable implementation of the rekor-tiles (rekor v2) identity service client.
Most of this is mechanical implementation of a fairly well written released specs, I will try to note the exceptions.
_internal.c2sp.proof: Parser, serializer, extra-claim encoder/decoder (spec: https://c2sp.org/tlog-proof)_internal.c2sp.identity: Signature payload and binary Merkle leaf hash computation for OIDC and public-key entries per c2sp.org/identity-transparency/v1 (this spec is still unreleased WIP: Identity-based transparency log spec C2SP/C2SP#244)_internal.c2sp.checkpoint: SignedCheckpoint and NoteVerifier implementing c2sp.org/tlog-checkpoint and c2sp.org/tlog-cosignature verification -- this is similar to_internal.rekor.checkpointbut I kept it separate as there are some differences that would complicate a shared implementation. (specs: https://c2sp.org/signed-note, https://c2sp.org/tlog-checkpoint, https://c2sp.org/tlog-cosignature)Ambiguities or sigstore specific deviations:
b"\x00" * 32-- this is allowed and is what rekor-tiles doesNo release notes as it's purely internal and not used in the public API yet.
AI assisted: yes.
#1966
Stack created with GitHub Stacks CLI • Give Feedback 💬