boltlabs-inc / tss-ecdsa

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

Consolidate key share interfaces #340

Open marsella opened 1 year ago

marsella commented 1 year ago

Right now, the creation of KeySharePublic and KeySharePrivate happens on-the-fly in a function called new_keyshare, and the fields on those types are public and mutable. It would be better to have private, read-only fields with a validated constructor so that we are more confident that those types are always correct.

Update: the fields are now private, as of #371.

Since the public key share is derived from the private, it makes sense to either derive them together in a single constructor or require that the public type be derived from an existing private instance, as for paillier::{EncryptionKey, DecryptionKey}.

Related issue: #52. PiSch public and private inputs are just key shares.

marsella commented 1 year ago

This is mostly a duplicate of #207.