boltlabs-inc / tss-ecdsa

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

Improve code quality on keygen output type #252

Closed marsella closed 1 year ago

marsella commented 1 year ago

The output type for keygen is currently a tuple (Vec<KeySharePublic>, KeySharePrivate). However, we use this output in a few specific ways:

  1. We use the whole thing as input to presign
  2. We put together the public key shares to reconstruct the public key
  3. Eventually (in #242), we'll use the public key shares as input to auxinfo

Since these uses are fairly constrained and they have to be done by the calling application, we should put them together in a nice, named, documented interface. This can live in the keygen module (probably keygen/participant.rs) but should be pub use'd in the main lib.rs.

marsella commented 1 year ago

Note on the last point about pub use -- we're talking in the example PR about changing the format of public types for the user. I'm not sure that we will actually have a decision by the time this PR gets addressed, but FYI.