Implement and test probability distributions used by WTF-PAD.
commit2ccf3268375cd46e8c948e94ba58e0d2f03fe722
authorGeorge Kadianakis <desnacked@riseup.net>
Mon, 26 Nov 2018 23:56:23 +0000 (27 01:56 +0200)
committerGeorge Kadianakis <desnacked@riseup.net>
Wed, 2 Jan 2019 13:25:55 +0000 (2 15:25 +0200)
treea6a820abe9af9a65f7648c2fae8a36ff0d81d607
parent8ad497bb578b13c66489843905764a60545e6388
Implement and test probability distributions used by WTF-PAD.

This project introduces the prob_distr.c subsystem which implements all the
probability distributions that WTF-PAD needs. It also adds unittests for all of
them.

Code and tests courtesy of Riastradh.

Co-authored-by: Taylor R Campbell <campbell+tor@mumble.net>
Co-authored-by: Mike Perry <mikeperry-git@torproject.org>
15 files changed:
src/core/or/circuitpadding.c
src/lib/crypt_ops/crypto_rand.c
src/lib/crypt_ops/crypto_rand.h
src/lib/math/.may_include
src/lib/math/fp.c
src/lib/math/fp.h
src/lib/math/include.am
src/lib/math/prob_distr.c [new file with mode: 0644]
src/lib/math/prob_distr.h [new file with mode: 0644]
src/test/include.am
src/test/prob_distr_mpfr_ref.c [new file with mode: 0644]
src/test/test.c
src/test/test.h
src/test/test_prob_distr.c [new file with mode: 0644]
src/test/test_slow.c