Right now, ZK proof challenges are plain BigNumbers. They should have their own type with constructors and clear usage.
Here are some initial tasks; this issue is low priority at time of writing so the ideal shape for the module might change once we actually get around to it.
[ ] Make a Challenge type. This could be in zkp/mod.rs or in its own module under zkp.
[ ] Implement AsRef<BigNumber> on it
[ ] Update all the es and challenges in the proofs to be of the Challenge type
[ ] Move the challenge_from_transcript functions to be constructors on the Challenge type
[ ] Update multiply_and_add and multiply_by_scalar functions to take AsRef<BigNumber> instead of straight &BigNumber.
[ ] Update combine function to take a challenge instead of a BigNumber
Right now, ZK proof challenges are plain
BigNumber
s. They should have their own type with constructors and clear usage.Here are some initial tasks; this issue is low priority at time of writing so the ideal shape for the module might change once we actually get around to it.
Challenge
type. This could be in zkp/mod.rs or in its own module underzkp
.AsRef<BigNumber>
on ite
s andchallenge
s in the proofs to be of theChallenge
typechallenge_from_transcript
functions to be constructors on theChallenge
typemultiply_and_add
andmultiply_by_scalar
functions to takeAsRef<BigNumber>
instead of straight&BigNumber
.combine
function to take a challenge instead of aBigNumber