The keygen Output type added in #355 is currently a type that can only be constructed inside the tss-ecda library. However, that doesn't map correctly to how it will be used. In practice, the calling application has to take the output, separate it into public and private parts, and store those two chunks differently. When the calling application tries to use the key (e.g. for presign), they'll need to retrieve the stored parts and put them back together into the output, which we pass as input to Presign.
[x] Add methods to break down and create Output (from_parts and into_parts). Document them carefully, including warnings about storage requirements on the private parts
[x] Add validation to Output (e.g. private corresponds to one of the public fields) and remove the corresponding check in presign::Input. Update / move around tests accordingly.
[x] Specifically, add a test that you can't create a keygen::Output that doesn't have a valid private/public pair, and one that says the participants need to be unique (you might change the behavior of the simulate functions to enforce this, too, and remove the corresponding check + test in presign input).
Related issue: #406 does the same thing for auxinfo.
The keygen
Output
type added in #355 is currently a type that can only be constructed inside the tss-ecda library. However, that doesn't map correctly to how it will be used. In practice, the calling application has to take the output, separate it into public and private parts, and store those two chunks differently. When the calling application tries to use the key (e.g. for presign), they'll need to retrieve the stored parts and put them back together into the output, which we pass as input toPresign
.Output
(from_parts
andinto_parts
). Document them carefully, including warnings about storage requirements on the private partsOutput
(e.g. private corresponds to one of the public fields) and remove the corresponding check inpresign::Input
. Update / move around tests accordingly.keygen::Output
that doesn't have a valid private/public pair, and one that says the participants need to be unique (you might change the behavior of thesimulate
functions to enforce this, too, and remove the corresponding check + test in presign input).Related issue: #406 does the same thing for auxinfo.