bitcoin, lightning and nostr cryptographic primitives. a drop-in replacement for btcec
Go to file
mleku 7ebd97c72c updating deps 2024-03-08 22:53:42 +00:00
chaincfg moved domain name 2024-02-18 20:50:51 +00:00
chainhash moved domain name 2024-02-18 20:50:51 +00:00
ecdsa moved domain name 2024-02-18 20:50:51 +00:00
hex eliminate redundant schnorr signature stuff 2024-01-24 09:56:44 +00:00
musig2 moved domain name 2024-02-18 20:50:51 +00:00
schnorr moved domain name 2024-02-18 20:50:51 +00:00
secp256k1 moved domain name 2024-02-18 20:50:51 +00:00
taproot moved domain name 2024-02-18 20:50:51 +00:00
wire moved domain name 2024-02-18 20:50:51 +00:00
.gitignore updating deps 2024-03-08 22:53:42 +00:00
LICENCE first commit 2023-10-03 02:46:24 -01:00
README.md eliminate redundant schnorr signature stuff 2024-01-24 09:56:44 +00:00
bench_test.go moved domain name 2024-02-18 20:50:51 +00:00
btcec.go moved domain name 2024-02-18 20:50:51 +00:00
btcec_test.go eliminate redundant schnorr signature stuff 2024-01-24 09:56:44 +00:00
ciphering.go moved domain name 2024-02-18 20:50:51 +00:00
ciphering_test.go eliminate redundant schnorr signature stuff 2024-01-24 09:56:44 +00:00
curve.go moved domain name 2024-02-18 20:50:51 +00:00
doc.go eliminate redundant schnorr signature stuff 2024-01-24 09:56:44 +00:00
error.go moved domain name 2024-02-18 20:50:51 +00:00
field.go moved domain name 2024-02-18 20:50:51 +00:00
field_test.go moved domain name 2024-02-18 20:50:51 +00:00
fuzz_test.go moved domain name 2024-02-18 20:50:51 +00:00
go.mod updating deps 2024-03-08 22:53:42 +00:00
go.sum updating deps 2024-03-08 22:53:42 +00:00
modnscalar.go moved domain name 2024-02-18 20:50:51 +00:00
pubkey.go moved domain name 2024-02-18 20:50:51 +00:00
pubkey_test.go eliminate redundant schnorr signature stuff 2024-01-24 09:56:44 +00:00
sec2-v2.pdf first commit 2023-10-03 02:46:24 -01:00
seckey.go moved domain name 2024-02-18 20:50:51 +00:00

README.md

mleku.online/git/ec

This is a full drop-in replacement for github.com/btcsuite/btcd/btcec eliminating the import from the Decred repository, and including the chainhash helper functions, needed for hashing messages for signatures.

The decred specific tests also have been removed, as well as all tests that use blake256 hashes as these are irrelevant to bitcoin and nostr. Some of them remain present, commented out, in case it is worth regenerating the vectors based on sha256 hashes, but on first blush it seems unlikely to be any benefit.

This includes the old style compact secp256k1 ECDSA signatures, that recover the public key rather than take a key as a parameter as used in Bitcoin transactions, the new style Schnorr signatures, and the Musig2 implementation.

BIP 340 Schnorr signatures are implemented except for the nonstandard message length tests, that nobody uses anyway.

The remainder of this document is from the original README.md.


Package ec implements elliptic curve cryptography needed for working with Bitcoin. It is designed so that it may be used with the standard crypto/ecdsa packages provided with Go.

A comprehensive suite of testis provided to ensure proper functionality.

Package btcec was originally based on work from ThePiachu which is licensed under the same terms as Go, but it has signficantly diverged since then. The btcsuite developers original is licensed under the liberal ISC license.

Installation and Updating

$ go install -u -v mleku.online/git/ec