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.
If the tweak is not x-only (an ordinary tweak), then never negate the aggregate key prior to applying the tweak, nor negate the existing tweak. Also do not update the MuSig keylist's accum_needs_negation.
If the tweak is x-only, then do the negation if required as usual.
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.
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.If the tweak is not x-only (an ordinary tweak), then never negate the aggregate key prior to applying the tweak, nor negate the existing tweak. Also do not update the MuSig keylist's
accum_needs_negation
.If the tweak is x-only, then do the negation if required as usual.
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