Add exhaustive tests for group arithmetic, signing, and ecmult on a small group

If you compile without ./configure --enable-exhaustive-tests=no,
this will create a binary ./exhaustive_tests which will execute
every function possible on a group of small order obtained by
moving to a twist of our curve and locating a generator of small
order.

Currently defaults to order 13, though by changing some #ifdefs
you can get a couple other ones. (Currently 199, which will take
forever to run, and 14, which won't work because it's composite.)

TODO exhaustive tests for the various modules
This commit is contained in:
Andrew Poelstra
2016-07-07 10:11:30 +00:00
parent 20b8877be1
commit 83836a9547
9 changed files with 360 additions and 30 deletions

View File

@@ -13,7 +13,9 @@
#include "libsecp256k1-config.h"
#endif
#if defined(USE_SCALAR_4X64)
#if defined(EXHAUSTIVE_TEST_ORDER)
#include "scalar_low.h"
#elif defined(USE_SCALAR_4X64)
#include "scalar_4x64.h"
#elif defined(USE_SCALAR_8X32)
#include "scalar_8x32.h"