Changeset View
Changeset View
Standalone View
Standalone View
src/secp256k1/src/tests.c
| Show First 20 Lines • Show All 4,410 Lines • ▼ Show 20 Lines | |||||
| #ifdef ENABLE_MODULE_MULTISET | #ifdef ENABLE_MODULE_MULTISET | ||||
| # include "modules/multiset/tests_impl.h" | # include "modules/multiset/tests_impl.h" | ||||
| #endif | #endif | ||||
| #ifdef ENABLE_MODULE_RECOVERY | #ifdef ENABLE_MODULE_RECOVERY | ||||
| # include "modules/recovery/tests_impl.h" | # include "modules/recovery/tests_impl.h" | ||||
| #endif | #endif | ||||
| #ifdef ENABLE_MODULE_SCHNORR | |||||
| # include "modules/schnorr/tests_impl.h" | |||||
| #endif | |||||
| int main(int argc, char **argv) { | int main(int argc, char **argv) { | ||||
| unsigned char seed16[16] = {0}; | unsigned char seed16[16] = {0}; | ||||
| unsigned char run32[32] = {0}; | unsigned char run32[32] = {0}; | ||||
| /* find iteration count */ | /* find iteration count */ | ||||
| if (argc > 1) { | if (argc > 1) { | ||||
| count = strtol(argv[1], NULL, 0); | count = strtol(argv[1], NULL, 0); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 108 Lines • ▼ Show 20 Lines | #ifdef ENABLE_MODULE_MULTISET | ||||
| run_multiset_tests(); | run_multiset_tests(); | ||||
| #endif | #endif | ||||
| #ifdef ENABLE_MODULE_RECOVERY | #ifdef ENABLE_MODULE_RECOVERY | ||||
| /* ECDSA pubkey recovery tests */ | /* ECDSA pubkey recovery tests */ | ||||
| run_recovery_tests(); | run_recovery_tests(); | ||||
| #endif | #endif | ||||
| #ifdef ENABLE_MODULE_SCHNORR | |||||
| /* Schnorr signature tests */ | |||||
| run_schnorr_tests(); | |||||
| #endif | |||||
| secp256k1_rand256(run32); | secp256k1_rand256(run32); | ||||
| printf("random run = %02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x\n", run32[0], run32[1], run32[2], run32[3], run32[4], run32[5], run32[6], run32[7], run32[8], run32[9], run32[10], run32[11], run32[12], run32[13], run32[14], run32[15]); | printf("random run = %02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x\n", run32[0], run32[1], run32[2], run32[3], run32[4], run32[5], run32[6], run32[7], run32[8], run32[9], run32[10], run32[11], run32[12], run32[13], run32[14], run32[15]); | ||||
| /* shutdown */ | /* shutdown */ | ||||
| secp256k1_context_destroy(ctx); | secp256k1_context_destroy(ctx); | ||||
| printf("no problems found\n"); | printf("no problems found\n"); | ||||
| return 0; | return 0; | ||||
| } | } | ||||