test: musig: fix dead "aggnonce encodes two points at infinity" check
What changed, and why it matters
This is a one-line fix in a test file. The original code called a function that checks whether a point is infinity but threw away the result, so the check did nothing. The fix wraps it in a CHECK() macro so the test actually verifies the result. It does not change any production code and has no security impact on real users.
No security action required. Treat as normal test improvement.
Security signals we found
No production code modified
No cryptographic logic changed
No input validation or memory safety changes
Test-only assertion correction
Evidence from the diff
In src/modules/musig/tests_impl.h, the MuSig API tests loaded an aggregate nonce and iterated over two points calling secp256k1_ge_is_infinity(&aggnonce_pt[i]) without using the return value. The patch changes the call to CHECK(secp256k1_ge_is_infinity(&aggnonce_pt[i]) == 1), making the test assertion effective. This is purely a test-quality fix; no library behavior changes.
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 fb3a10a..3a30c23 100644
--- a/src/modules/musig/tests_impl.h
+++ b/src/modules/musig/tests_impl.h
@@ -374,7 +374,7 @@ static void musig_api_tests(void) {
secp256k1_ge aggnonce_pt[2];
secp256k1_musig_aggnonce_load(CTX, aggnonce_pt, &aggnonce);
for (i = 0; i < 2; i++) {
- secp256k1_ge_is_infinity(&aggnonce_pt[i]);
+ CHECK(secp256k1_ge_is_infinity(&aggnonce_pt[i]) == 1);
}
}
CHECK(secp256k1_musig_nonce_agg(CTX, &aggnonce, pubnonce_ptr, 2) == 1);
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.