Repository navigation
Validate 8-char lowercase hex key hashes across note constructors - #295
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #295 +/- ##
==========================================
+ Coverage 82.57% 91.44% +8.87%
==========================================
Files 5 10 +5
Lines 241 1087 +846
==========================================
+ Hits 199 994 +795
- Misses 30 93 +63
+ Partials 12 0 -12 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
AlCutter
approved these changes
Nov 10, 2026
Several signer and verifier constructors previously checked only that the key ID was 8 characters long, quietly ignoring its value and recomputing the hash from the key material — allowing corrupted, spliced, or non-hex vkeys (including two in our own tests) to pass unnoticed while failing in stricter C2SP implementations. Enforce C2SP signed-note key ID rules across all signer and verifier constructors in formats/note: - Require key IDs (hash16) to be 8 lowercase hexadecimal digits. - Validate that the parsed key ID matches the computed 32-bit key hash in NewMLDSAVerifier, NewSignerForCosignatureV1, NewVerifierForCosignatureV1, and NewRFC6962Verifier.
mhutchinson
force-pushed
the
note-keyhash
branch
from
November 10, 2026 17:00
44b7fac to
c9f261a
Compare
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.
Several signer and verifier constructors previously checked only that the
key ID was 8 characters long, quietly ignoring its value and recomputing
the hash from the key material — allowing corrupted, spliced, or non-hex
vkeys (including two in our own tests) to pass unnoticed while failing in
stricter C2SP implementations.
Enforce C2SP signed-note key ID rules across all signer and verifier
constructors in formats/note:
in NewMLDSAVerifier, NewSignerForCosignatureV1,
NewVerifierForCosignatureV1, and NewRFC6962Verifier.