Skip to content
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

btcec: Implement Schnorr signatures #1212

Closed
stevenroose opened this issue Jul 7, 2018 · 7 comments · Fixed by #1777
Closed

btcec: Implement Schnorr signatures #1212

stevenroose opened this issue Jul 7, 2018 · 7 comments · Fixed by #1777

Comments

@stevenroose
Copy link
Contributor

stevenroose commented Jul 7, 2018

According to the proposed BIP: https://github.com/sipa/bips/blob/bip-schnorr/bip-schnorr.mediawiki

I was thinking that it would make sense for btcec to be a separate repo. It could have a separate branch where we can support experimental crypto that is not accepted standard yet, like CT-related things, f.e. The upcoming versioning improvements in Go should make it less of an issue to have it as a separate repo as well.

@Roasbeef
Copy link
Member

What's the gain to extract btcec to a diff repo? In the past it was, but then we combined everything into a single repo as otherwise PR's touching diff packages was a major pain.

@stevenroose
Copy link
Contributor Author

In the past it was, but then we combined everything into a single repo as otherwise PR's touching diff packages was a major pain.

That issue should be resolved with a good dependency manager. dep or vgo will most probably make that a non-issue. I would think an argument in favor is that it allows for easier experimentation with not-yet-softforked crypto stuffs without bothering btcd development.

Also, cryptographic primitives that are related to Bitcoin, but not consensus-critical, could be added there, but btcd doesn't need them. F.e. tools to construct Schnorr multisigs or discrete log contracts. Basically all layer 2 crypto that btcd doesn't necessarily need.

@hbakhtiyor
Copy link

https://github.com/hbakhtiyor/schnorr/ implemented, feedback appreciate

@benjiqq
Copy link

benjiqq commented Feb 25, 2020

@stevenroose agreed, separate crypto package would be nice. any new thoughts, also with regards to schnorr?

@gcsfred2
Copy link

PR's touching diff packages is a major pain. Consider adding Schnorr and/or EdDSA to btcsuite/btcd (
btcec).

@Roasbeef
Copy link
Member

The main blocker here that we were working on was to first switch over all field operations to used fixed sized limbs rather than big ints, as we'll gain quite a performance increase in the process. Once that's in place, the next step would be to implement proper constant time signing using the field elements (which #1667 doesn't use).

@Roasbeef
Copy link
Member

The related project dcrd has implemented a lot of what we'll need for this, so we can either use their modules directly or copy things over. They have a schnorr implementation as well, but it deviates from BIP 340.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants