tests: compare full MuSig aggregate nonce
What changed, and why it matters
This is a tiny test-only change. It makes one unit test compare the full 66-byte MuSig aggregate nonce output instead of only the first 33 bytes. It does not change any production code, cryptographic behavior, or library API.
No action required; this is a benign test improvement. Treat as routine quality/test coverage update.
Security signals we found
No strong security signals were identified.
Evidence from the diff
In src/modules/musig/tests_impl.h, the musig_test_vectors_nonceagg test was using secp256k1_memcmp_var(…, 33) to compare only half of the serialized aggregate nonce against expected test vectors. The patch changes the length to sizeof(aggnonce66), i.e., the full 66-byte serialized aggregate nonce. This is a test-hardening fix with no runtime security impact.
Changed components
src/modules/musig/tests_impl.hInspect captured patch +1 / −1
diff --git a/src/modules/musig/tests_impl.h b/src/modules/musig/tests_impl.h
index cc64491..fb3a10a 100644
--- a/src/modules/musig/tests_impl.h
+++ b/src/modules/musig/tests_impl.h
@@ -862,7 +862,7 @@ static void musig_test_vectors_nonceagg(void) {
}
CHECK(secp256k1_musig_nonce_agg(CTX, &aggnonce, pubnonce_ptr, 2));
CHECK(secp256k1_musig_aggnonce_serialize(CTX, aggnonce66, &aggnonce));
- CHECK(secp256k1_memcmp_var(aggnonce66, c->expected, 33) == 0);
+ CHECK(secp256k1_memcmp_var(aggnonce66, c->expected, sizeof(aggnonce66)) == 0);
}
for (i = 0; i < ARRAY_SIZE(vector->error_case); i++) {
const struct musig_nonce_agg_test_case *c = &vector->error_case[i];
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.