Implement Serialize
and Deserialize
traits for "Output" types?
#525
Labels
enhancement
New feature or request
Serialize
and Deserialize
traits for "Output" types?
#525
We currently have some "output" types which are the outputs of running our sub-protocols, e.g.
keygen::Output
andauxinfo::Output
. These types do no currently implement theSerialize
andDeserialize
traits. It is still possible to serialize/deserialize these types.For example:
This
keygen::Output
type does not implementSerialize
, but the sub-typeKeySharePublic
does. MeanwhileKeySharePrivate
can be serialized by calling theinto_bytes
method.While this works, it is quite painful to work with these types. It would be a lot more convenient to implement serialize/deserialize for these types.
It seems not implementing serialize/deserialize was done on purpose for this type. I believe the argument is: Developers should explicitly call the serialize method (into_bytes) as a type of misuse resistance. I don't believe this buys us much though...
The text was updated successfully, but these errors were encountered: