Open junderw opened 4 years ago
Hi Jonathan, as I understand Schnorr signing will be added back to bitcoin-core/secp256k1 as module? Currently I work on fanatid/fcrypto -- bindings (n-api) & wasm based on bitcoin-core/secp256k1, if this will include Schnorr signing in future, do you still need it in elliptic?
TBH I would love to remove the dependency of native JS and have all crypto operations be through WASM, but a few things:
fcrypto sounds like a good way to include Schnorr into BitcoinJS though... we might need to rework the API a bit to handle async loading... I was thinking v6 might contain some early experimental Taproot schemes as Payment APIs.
But I still think that Schnorr would be useful in Native JS for old browser support.
we might need to rework the API a bit to handle async loading...
Yeah, I'm not sure that what I have now is the best, but I this is just early stage. I even would not like announce it, but you create the issue :laughing:
Browsers from stone age... it's should be possible convert wasm to asm.js, but performance and overall? Not sure about it, but this can be option.
I think for now we will:
Moving forward, WASM is definitely something we want to use. But for now the cost of catching up with and updating the library to utilize the newest WASM developments seems like too much of a commitment at this point.
So I will move forward with implementing in elliptic.
Looking at the secp256k1 pull request, these are the things I will need to implement: (explained in BIP340)
@indutny maybe you only want 3? I could move 2 and 1 downstream to tiny-secp256k1, but 2 might be useful.
Just keep me updated on what you want, and I should have a preliminary PR up by next week.
Looking into it more TaggedHash is also needed in order to implement... Perhaps this should all be implemented in tiny-secp256k1........... or make a separate module...
@fanatid I am going to move forward with taproot implementation.
If you have any time to work on this we should coordinate.
Thanks.
Taproot and related Bitcoin protocols will require Schnorr signing.
Thanks, Jon (BitcoinJS)
CC: @fanatid