whitelist: document the degenerate W = -P_i destination

This commit is contained in:
DarkWindman
2026-08-10 16:55:05 +03:00
parent 7ea12c2dca
commit 598e22dcde
2 changed files with 12 additions and 0 deletions

View File

@@ -117,6 +117,9 @@ static int secp256k1_whitelist_compute_keys_and_message(const secp256k1_context*
/* compute tweaked keys */
secp256k1_gej_set_ge(&tweaked_gej, &offline_ge);
secp256k1_gej_add_ge_var(&tweaked_gej, &tweaked_gej, &subkey_ge, NULL);
/* Fails only for the degenerate destination W = -P_i, where the ring
* key intentionally collapses to Q_i. See the rationale on
* secp256k1_whitelist_verify in include/secp256k1_whitelist.h. */
secp256k1_whitelist_tweak_pubkey(hash_ctx, &tweaked_gej);
secp256k1_gej_add_ge_var(&keys[i], &tweaked_gej, &online_ge, NULL);
}