secp256k1-zkp icon indicating copy to clipboard operation
secp256k1-zkp copied to clipboard

Musig: Minor comment corrections

Open siv2r opened this issue 1 year ago • 3 comments

Changes:

  • PartialSigVerify mistakenly refers to pubnonce as aggnonce.
    • Edit: Just noticed that this correction was already pointed out here: https://github.com/bitcoin-core/secp256k1/pull/1479#discussion_r1731398318
  • KeyAgg comments inconsistently use both x and pk to refer to the public key argument. Updated to use only pk.

siv2r avatar Aug 28 '24 14:08 siv2r

https://github.com/BlockstreamResearch/secp256k1-zkp/blob/6152622613fdf1c5af6f31f74c427c4e9ee120ce/src/modules/musig/session_impl.h#L579-L587

I'm not sure why pk.y is being normalized here. Shouldn't cache_i.pk.y be normalized instead? That's the one passed to the fe_is_odd function, which requires the field element to be normalized.

Just a side note: all tests still pass even after removing this function call (line 579).

siv2r avatar Aug 28 '24 14:08 siv2r

Thanks, I think all the corrections were either addressed or pointed out in the PR to upstream libsecp256k1.

jonasnick avatar Aug 29 '24 10:08 jonasnick

I think it's best if we merge the PR in upstream libsecp first and then merge the changes to this repo.

jonasnick avatar Aug 29 '24 10:08 jonasnick

I think it's best if we merge the PR in upstream libsecp first and then merge the changes to this repo.

Yes, this can be closed then. Updating to the upstream musig module is tracked in #301.

real-or-random avatar Nov 05 '24 18:11 real-or-random