fiatjaf / scoin

simple bitcoin helpers for scala
Apache License 2.0
5 stars 1 forks source link

Musig2 - a barely working implementation #14

Closed VzxPLnHqr closed 1 year ago

VzxPLnHqr commented 1 year ago

Implementation of Musig2 according to https://github.com/jonasnick/bips/blob/musig2-squashed/bip-musig2.mediawiki

It passes the various test vectors presented in the specification, but right now it does not do a very good job of propagating an error up in a manner that the caller of the library will know "why" a musig session failed. Nevertheless, it is still usable as-is, at least for proof-of-concept types of things.

Eventually we should make the errors more helpful, so until that time it is probably not wise to use in production or if there is concern that one or more signers is a troll.

Documentation in the code is currently quite sparse, but I lean towards merging now and we can add more documentation when/if we start wanting to actually use these Musig2 functions.