LLFourn / secp256kfun

A pure-rust secp256k1 library optimised for fun
BSD Zero Clause License
102 stars 29 forks source link

Allow for ordinary (non xonly) tweaking of MuSig keys #95

Closed nickfarrow closed 2 years ago

nickfarrow commented 2 years ago

tweak(tweak, is_xonly) now takes a bool as to whether the new tweak should update the accumulated needs negation. Also adds the remaining tests from the draft BIP.

I changed the name to accum_needs_negation so we can tell the code is using this spec. Not yet added to upcoming FROST PR.

I think we should review the updated logic together before merging.

see https://github.com/jonasnick/bips/blob/musig2/bip-musig2.mediawiki#Tweaking_Definition https://github.com/jonasnick/bips/issues/13

nickfarrow commented 2 years ago

ah I had the title right the first time. Ordinary tweaks are for BIP32, is_xonly=false,