Comments (5)
BCH schnorr is supported as schnorr-legacy:
- https://github.com/bcoin-org/bcrypto/blob/master/lib/js/schnorr-legacy.js
- https://github.com/bcoin-org/bcrypto/tree/master/src/secp256k1/src/modules/schnorrleg
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.
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:
parent commit with merge details:
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.
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.
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.
That's still the legacy bip schnorr. BIP-340 is exposed as require('bcrypto/lib/schnorr')
using libtorsion.
from bcrypto.
Related Issues (20)
- Pre-built binaries ? HOT 2
- bcrypto 5.0.0 fails to install on Windows HOT 5
- Symbol not found: _mpn_zero_p HOT 1
- [security] randomBytes() falling back to Math.random()
- Use of `BCRYPTO_FORCE_BIGINT` may silently error and fallback to JS without BigInt
- bcrypto fails to build on windows HOT 8
- "A dynamic link library (DLL) initialization routine failed" when run in Windows under Electron or PKG HOT 5
- Update secp256k1
- Feature request: ESM support HOT 2
- Typescript support
- Monorepo
- Error when I run `yarn add bcrypto` HOT 6
- Implicitly declaring library function memcpy... on MacOS 10.15.7 HOT 6
- [SECURITY] Timing leaks in lib/native/bn.js HOT 3
- close
- AWS Lambda runtime error: version "GLIBC_2.28" not found HOT 1
- Usage with browsers HOT 4
- bech32m is not replaced with bench32m-browser when using browser HOT 3
- v5.5.0 not found on NPM HOT 1
- why not support nodejs16.x.x on mac m1/2(arm64)?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bcrypto.