-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Properly handle BIP-340
Schnorr signatures with or without BIP-341
taproot tweaked keys
#94
Conversation
…t all possible SignatureType
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still have more to look at, but figured I'd submit what I've already seen. So far, looks good, these are all minor suggestions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This largely looks good. But I think we should add a bit more documentation for the sign functions so that we can easily verify that things are computed correctly. I wasn't entirely sure which procedures I should be following for some of the sign functions, so I also want this so that I can give a more meaningful review.
I know we have the tests but I still think we should have the documentation, plus tests can be "faulty". Not saying that these are, they seem fine.
…-340 and BIP-341 key adjustments
BIP-340
Schnorr signatures without BIP-341
taproot tweaked keysBIP-340
Schnorr signatures with or without BIP-341
taproot tweaked keys
…times need to deref it
…tion without a name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
As a follow-up we should do #24. We can pull in the setup code from the sBTC repo to make that all easy. That way we can be very confident that this works.
In the early days of
sBTC-Alpha
, we had no idea howTaproot
worked. I started by implementingBIP-340
, only to discover that I really needed to implementBIP-341
as well to get tweaked public keys. At that point there was no way to doBIP-340
alone.We discovered recently that TapScript public key spends need to use
BIP-340
withoutBIP-341
, since the whole point of tweaking the keys is to prevent hidden script spends, and we're already inside the script at that point. So this change enables that, from the low levelSigner
/Aggregator
code all the way up to the network packets and state machines.