cryptimeleon / math

Library providing mathematical basics for (pairing-based) cryptography.
Apache License 2.0
10 stars 2 forks source link

Make HashIntoZn a proper full-domain hash #118

Open JanBobolz opened 3 years ago

JanBobolz commented 3 years ago

Currently, HashIntoZn can never hit n-1 (or other large values). HashThenPrfToZn does a much better job at being statistically close to what we'd expect from a random oracle hash into Zn.

JanBobolz commented 3 years ago

Also, include n into the hash so that we have some sort of domain separation.