Skip to content

Commit 33cb3c2

Browse files
committed
Add secret key extraction from keypair to constant time tests
1 parent 36d9dc1 commit 33cb3c2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/valgrind_ctime_test.c

+6
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,12 @@ int main(void) {
140140
ret = secp256k1_keypair_xonly_tweak_add(ctx, &keypair, msg);
141141
VALGRIND_MAKE_MEM_DEFINED(&ret, sizeof(ret));
142142
CHECK(ret == 1);
143+
144+
VALGRIND_MAKE_MEM_UNDEFINED(key, 32);
145+
VALGRIND_MAKE_MEM_UNDEFINED(&keypair, sizeof(keypair));
146+
ret = secp256k1_keypair_sec(ctx, key, &keypair);
147+
VALGRIND_MAKE_MEM_DEFINED(&ret, sizeof(ret));
148+
CHECK(ret == 1);
143149
#endif
144150

145151
#ifdef ENABLE_MODULE_SCHNORRSIG

0 commit comments

Comments
 (0)