Repository navigation
Add GenerateCosignatureV1Key and NewStrictVerifierForCosignatureV1 - #299
Open
mhutchinson wants to merge 1 commit into
Open
mhutchinson wants to merge 1 commit into
mhutchinson wants to merge 1 commit into
Conversation
Callers had no direct way to generate Ed25519 cosignature/v1 (0x04) key pairs without converting plain Ed25519 keys, and policy parsing had to inspect raw vkey bytes itself to reject non-cosignature witness keys because the existing verifier constructor also accepted plain Ed25519 keys. - Add GenerateCosignatureV1Key for direct key type 0x04 generation, matching GenerateMLDSAKey and golang.org/x/mod/sumdb/note.GenerateKey. - Add NewStrictVerifierForCosignatureV1 accepting only dedicated C2SP cosignature key types (0x04 and 0x06) while keeping NewVerifierForCosignatureV1 backwards-compatible with 0x01 vkeys. - Switch policy.TLogPolicy.Unmarshal to NewStrictVerifierForCosignatureV1, removing its manual witness key-type check TODO.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #299 +/- ##
==========================================
+ Coverage 82.57% 92.18% +9.61%
==========================================
Files 5 10 +5
Lines 241 1113 +872
==========================================
+ Hits 199 1026 +827
- Misses 30 87 +57
+ Partials 12 0 -12 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Callers had no direct way to generate Ed25519 cosignature/v1 (0x04) key pairs without converting plain Ed25519 keys, and policy parsing had to inspect raw vkey bytes itself to reject non-cosignature witness keys because the existing verifier constructor also accepted plain Ed25519 keys.