mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-24 15:10:44 +01:00
A decentralized bitcoin exchange network
Implement low-R nonce grinding with the class 'LowRSigningKey', which always produces low-R signatures, consistent with the behaviour of Bitcoin Core/Knots (post-2018), Sparrow, Coldcard and possibly other wallets with recent updates, for hopefully improved privacy and slightly lower and more predictable tx fees. Canonical DER-encoded signatures are usually either 71 or 70 bytes (starting with hex 3045 or 3044 resp.), with roughly 50-50 odds, depending on whether they are high-R or low-R. (Less than 1% of the time, they will be shorter than 70 bytes, because of the variable length bigint R & S encodings.) So trying different nonces for low-R saves half-a-byte on average, at the cost of doubling the average signing time. To this end, provide the class 'CountingHMacDSAKCalculator' to supply a custom nonce to 'o.b.c.s.ECDSASigner'. The first invocation of the k-calculator instance matches the output of the RFC 6979 compliant Bouncy Castle version, but subsequent invocations increment an internal counter supplied as additional data/entropy to the HMAC, as mentioned in section 3.6 of the RFC, until a low-R signature results. In this way, a deterministic signing algorithm exactly matching that of (post-2018 versions of) Bitcoin Core results. Also add unit tests, with test vectors taken from the RFC (which only covers the NIST curves, unfortunately, not secp256k1), and test vectors generated from signed txs created by the 'bitcoin-tx' command. |
||
---|---|---|
.github | ||
.idea | ||
apitest | ||
assets | ||
btcnodemonitor | ||
build-logic | ||
cli | ||
code-coverage-report | ||
common | ||
core | ||
daemon | ||
desktop | ||
docs | ||
gradle | ||
inventory | ||
p2p | ||
persistence | ||
platform | ||
proto | ||
regtest | ||
restapi | ||
scripts | ||
seednode | ||
statsnode | ||
.editorconfig | ||
.gitattributes | ||
.gitignore | ||
.travis.yml | ||
Bisq1_icon.svg | ||
build.gradle | ||
CODEOWNERS | ||
CONTRIBUTING.md | ||
gradle.properties | ||
gradlew | ||
gradlew.bat | ||
LICENSE | ||
Makefile | ||
pull_request_template.md | ||
README.md | ||
settings.gradle |
What is Bisq?
Bisq is a safe, private and decentralized way to exchange bitcoin for national currencies and other digital assets. Bisq uses peer-to-peer networking and multi-signature escrow to facilitate trading without a third party. Bisq is non-custodial and incorporates a human arbitration system to resolve disputes.
To learn more, see the doc and video at https://bisq.network/intro.
Get started using Bisq
Follow the step-by-step instructions at https://bisq.network/get-started.
Contribute to Bisq
See CONTRIBUTING.md and the developer docs.