Skip to content

Commit

Permalink
Add secret key extraction from keypair to constant time tests
Browse files Browse the repository at this point in the history
  • Loading branch information
elichai committed Dec 19, 2020
1 parent 36d9dc1 commit 33cb3c2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/valgrind_ctime_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 33cb3c2

Please sign in to comment.