Skip to content

Commit 68b5520

Browse files
Merge #1619: musig: ctimetests: fix _declassify range for generated nonce points
57eda3b musig: ctimetests: fix _declassify range for generated nonce points (Sebastian Falbesoner) Pull request description: As noticed in #1614 (comment), the area marked as non-secret exceeds the nonce_pts array in the second iteration of the for loop. Fix that by passing the correct size to the _declassify call. ACKs for top commit: sipa: utACK 57eda3b real-or-random: utACK 57eda3b Tree-SHA512: ff8074e3d1078d66a52d08c661997856ff586b3b4564a865a75212b32fafd7906d58885371bd63005007fde554ebcad121ab66125abe4331cf0aac63fc018ed0
2 parents f0868a9 + 57eda3b commit 68b5520

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/modules/musig/session_impl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ int secp256k1_musig_nonce_gen_internal(const secp256k1_context* ctx, secp256k1_m
448448
secp256k1_gej nonce_ptj;
449449
secp256k1_ecmult_gen(&ctx->ecmult_gen_ctx, &nonce_ptj, &k[i]);
450450
secp256k1_ge_set_gej(&nonce_pts[i], &nonce_ptj);
451-
secp256k1_declassify(ctx, &nonce_pts[i], sizeof(nonce_pts));
451+
secp256k1_declassify(ctx, &nonce_pts[i], sizeof(nonce_pts[i]));
452452
secp256k1_scalar_clear(&k[i]);
453453
}
454454
/* None of the nonce_pts will be infinity because k != 0 with overwhelming

0 commit comments

Comments
 (0)