boltlabs-inc / tss-ecdsa

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

Add storage-required methods to private types #429

Closed marsella closed 1 year ago

marsella commented 1 year ago

We require the calling application to securely store private types returned from each subprotocol and clearly annotate them, but we don't provide any methods for serializing or converting to and from bytes on those types:

It might be wise to do some careful serialization -- like, rather than just slapping derive(Serialize) on all of these, we can have specific types, and we might want to do e.g. length encoding or additional validation (for example, the private key share should be <q).

Also, for testing that secure storage works correctly, it would be helpful to be able to compare different instances of the private types (e.g. PartialEq, Eq).

indomitableSwan commented 1 year ago

I think we should make this ticket a priority ticket. And yes, I agree that we should do a custom serialization for these types.