Add secret key extraction from keypair to constant time tests

This commit is contained in:
Elichai Turkel 2020-12-19 10:56:51 +02:00
parent 36d9dc1e8e
commit 33cb3c2b1f
No known key found for this signature in database
GPG Key ID: 9383CDE9E8E66A7F
1 changed files with 6 additions and 0 deletions

View File

@ -140,6 +140,12 @@ int main(void) {
ret = secp256k1_keypair_xonly_tweak_add(ctx, &keypair, msg);
VALGRIND_MAKE_MEM_DEFINED(&ret, sizeof(ret));
CHECK(ret == 1);
VALGRIND_MAKE_MEM_UNDEFINED(key, 32);
VALGRIND_MAKE_MEM_UNDEFINED(&keypair, sizeof(keypair));
ret = secp256k1_keypair_sec(ctx, key, &keypair);
VALGRIND_MAKE_MEM_DEFINED(&ret, sizeof(ret));
CHECK(ret == 1);
#endif
#ifdef ENABLE_MODULE_SCHNORRSIG