Add and use richer interfaces for signer/subtreesigner.#264
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #264 +/- ##
==========================================
- Coverage 82.57% 76.58% -6.00%
==========================================
Files 5 8 +3
Lines 241 696 +455
==========================================
+ Hits 199 533 +334
- Misses 30 90 +60
- Partials 12 73 +61 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
roger2hk
left a comment
There was a problem hiding this comment.
Add new unit tests to cover the newly added NewMLDSASigner, NewMLDSAVerifier, or the algMLDSA44 case in NewSignerForCosignatureV1.
|
|
||
| // SubtreeSigner is a signer that can produce both note and subtree signatures. | ||
| type SubtreeSigner struct { | ||
| type subtreeSigner struct { |
There was a problem hiding this comment.
| type subtreeSigner struct { | |
| // subtreeSigner is a concrete implementation of the extended SubtreeSigner interface above. | |
| type subtreeSigner struct { |
This allows other implementations, e.g. signers backend by HSMs, to be used across the transparency-dev repos, where formats/note Signers are used.
876cd9a to
34d6663
Compare
Maybe I'm not understanding, but this fairly unrelated to the PR, which is just abstracting an interface... Those c'tors were already present, and there are also already tests for Happy to double back and add more tests later if you think they're necessary, though. |
This allows custom out-of-tree implementations, e.g. signers backend by HSMs, to be used across the transparency-dev repos, where formats/note
Signers are used.This is a breaking change, but likely to pass un-noticed in most uses of these signers/verifiers, but locations which create new signers and returned pointers to these type will need a small tweak to fix.