Git Product home page Git Product logo

Comments (5)

chjj avatar chjj commented on July 23, 2024

BCH schnorr is supported as schnorr-legacy:

I pulled in the latest secp256k1 used on bitcoin for the last release (though it obviously doesn't include the new schnorr yet). There shouldn't be any conflicts with the legacy schnorr. It will remain as an "extension" to the ecdsa api.

The new bip schnorr will have its own API, looking something like this (not exposed yet): https://github.com/bcoin-org/bcrypto/blob/master/lib/js/schnorr.js

from bcrypto.

pinheadmz avatar pinheadmz commented on July 23, 2024

Yeah I've been using the JS for bip-schnorr this week.

If you're interested, sipa has a Taproot branch with a compatible secp:

sipa/bitcoin@11a286c

parent commit with merge details:

sipa/bitcoin@d5cd9db

Almost all those commits came from master branch of https://github.com/bitcoin-core/secp256k1

The top 13 or so 32-byte-schnorr-y commits were pulled from Jonas' working branch:

https://github.com/jonasnick/secp256k1/commits/schnorrsig-backup38

from bcrypto.

chjj avatar chjj commented on July 23, 2024

Yeah, I've looked at Jonas' PR on the secp25k1 repo, but even if that gets merged, I don't think we should pull it in until it's actually running on bitcoin. I think that should maybe be our policy around libsecp256k1 (not to merge any updates until they're live on bitcoin mainnet). Normally I'm okay with adding an extra custom module, but the new bip-schnorr requires a lot of changes to the code besides just one module.

For the last secp256k1 tree I merged in, I made it a point to make sure it was actually live on mainnet. I pulled in the exact same commit as well.

On the topic of maintaining consensus, one thing we do differ with bitcoin on is compile time options. For the last release, I decided to build libsecp256k1 with libgmp and endomorphism enabled. This speeds up performance by a lot, but we are technically running different code than bitcoin core. The performance benefits are very attractive though.

from bcrypto.

pinheadmz avatar pinheadmz commented on July 23, 2024

I'm confused again by recent updates:

https://github.com/bcoin-org/bcrypto/blob/master/src/secp256k1/include/secp256k1_schnorrleg.h

This looks like 32-byte x-only bip340 pubkeys but I was thinking "legacy" referred to the bitcoin cash, 33-byte pubkey scheme.

from bcrypto.

chjj avatar chjj commented on July 23, 2024

That's still the legacy bip schnorr. BIP-340 is exposed as require('bcrypto/lib/schnorr') using libtorsion.

from bcrypto.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.