Closed maurges closed 1 year ago
I see you added a lot of docs. Is it a right time to add #[forbid(missing_docs)]
to the top of lib.rs
or not yet?
Found another case of non-determinism that slipped me by, and fixed it. Should be completely ready now
Oh god, and now CI fails with that exact test, what happened
I'm not sure what happened there with CI. I debugged it locally, and the proofs are computed deterministically
I recommend you to use rand_dev in tests rather than OsRng
. It prints seed to stdout when constructed, so you can locally reproduce whatever issue you have on CI (assuming tests are 100% deterministic with fixed randomness source)
Owners: survived
=)) Good crate though, will use it
The problem with determinism here is that it's easy to accidentally use functions from unknown_order that use OsRng implicitly.
it's easy to accidentally use functions from unknown_order that use OsRng
Should we then add a script that grep
s BigNumber::prime
and others bad functions and fails CI if it found any of them in the project?
So still unresolved things in this PR
#![forbid(missing_docs)]
rand_dev
)
BigNumber::prime
in CI and recommend using their appropriate alternatives like BigNumber::prime_from_rng
If you don't want to resolve any of them within this PR, please just open an issue so we could keep track of them.
I think all those 4 changes are out of scope of this MR at least, yes. Let me make the issues for them
See #9, #10, #11
Great, thanks!
In the initial implementation I forgot that the notation for
y <- +-a
means thaty <- [0; 2a]
. This patch changes the generation functions to account for thatWhile making this change, I also refactored tests and added a new category of tests: check that the probablity to reject a correct proof is similar to the one in paper. This helps to show that the change above didn't break security (at least completely)