There's currently a public Input type in the interactive sign module that doesn't have a constructor. We'll need to make one for the public API to be usable.
The input type holds a Sha256 message digest and a presign input. However, I think the correct API for the constructor should take
A "raw" message (&[u8]), which we then hash into a sha2::Sha256 type
A keygen::Output and
An auxinfo::Output, which we then use to make the presign input.
I think this will make more sense to an external user, who doesn't necessarily care about presign and only knows that they ran keygen and auxinfo already. It also saves us from re-implementing all the validation on the presign input.
[x] Make the constructor
[x] Test it? There's no new validation to do here so perhaps just a happy test is fine.
[x] If the constructor + tests are getting long, put them in their own module
There's currently a public
Input
type in the interactive sign module that doesn't have a constructor. We'll need to make one for the public API to be usable.The input type holds a
Sha256
message digest and a presign input. However, I think the correct API for the constructor should take&[u8]
), which we then hash into asha2::Sha256
typekeygen::Output
andauxinfo::Output
, which we then use to make the presign input.I think this will make more sense to an external user, who doesn't necessarily care about presign and only knows that they ran keygen and auxinfo already. It also saves us from re-implementing all the validation on the presign input.