witnet / vrf-rs

Verifiable Random Function (VRF) library written in Rust
MIT License
90 stars 37 forks source link

fix: set n to correct value #8

Closed tmpolaczyk closed 5 years ago

tmpolaczyk commented 5 years ago

Previously n was set to 2, which led to truncating message hashes to 0 bytes. This lead to false positives when verifying vrf proofs for different messages.

Now n is set to 128, so the message hash is truncated to 16 bytes.

Added test.

tmpolaczyk commented 5 years ago

@mariocao Ok, fixed the tests.