boltlabs-inc / tss-ecdsa

An implementation of a threshold ECDSA signature scheme
Other
11 stars 5 forks source link

Add support recoverable signatures. #512

Closed gatoWololo closed 6 months ago

gatoWololo commented 7 months ago

Implements method to compute recoverable signatures. Closes Issue #508.

Tested by adding recoverable signature function call to sign unit tests. Adds documentation for the threaded example CLI.

gatoWololo commented 7 months ago

Some additional information for the reviewer. Please see #508 for the original idea. We purposely chose to implement this as an additional method on our Signature type. The alternative approach would have been change the output type on:

impl ProtocolParticipant for SignParticipant {
    type Input = Input;
    type Output = Signature;

From Signature to some new type, RecoverableSignature, this would have forced the caller to always create a RecoverableSignature. We like the generality of this library though, so we chose to still create a Signature and leave the recoverable ID as "opt-in"

gatoWololo commented 6 months ago

Just need to remember that when this gets called the recovery ID at least needs to be concatenated with the signature.

Right, I haven't seen a standardized format to include the signature + recovery ID. So I leave them as separate values so that the caller can choose how to handle this.