dcrd/dcrec/secp256k1
Dave Collins abe43b0928
secp256k1: Prepare v2.0.0.
This updates the dcrec/secp256k1 module dependencies and serves as a
base for dcrec/secp256k1/v2.0.0.

The updated direct dependencies in this commit are as follows:

- github.com/decred/dcrd/chaincfg/chainhash@v1.0.2

The full list of updated direct dependencies since the previous
dcrec/secp256k1/v1.0.2 release are as follows:

- github.com/decred/dcrd/chaincfg/chainhash@v1.0.2
2019-10-07 15:24:46 -05:00
..
schnorr multi: remove unused funcs and vars 2019-09-05 10:13:18 -05:00
bench_test.go secp256k1: Introduce v2 module 2019-06-17 16:15:34 -04:00
btcec_test.go secp256k1: Introduce v2 module 2019-06-17 16:15:34 -04:00
btcec.go multi: Use https links where available. 2019-06-18 14:20:06 -05:00
ciphering_test.go sec256k1: update func signatures. 2017-12-21 19:38:42 -06:00
ciphering.go sec256k1: update func signatures. 2017-12-21 19:38:42 -06:00
doc.go multi: Use https links where available. 2019-06-18 14:20:06 -05:00
example_test.go secp256k1: Introduce v2 module 2019-06-17 16:15:34 -04:00
field_test.go multi: Correct typos. 2019-08-22 10:20:03 -05:00
field.go multi: Correct typos. 2019-08-22 10:20:03 -05:00
genprecomps.go secp256k1: Introduce v2 module 2019-06-17 16:15:34 -04:00
gensecp256k1.go blockchain: Rework to use new db interface. 2016-08-18 15:42:18 -04:00
go.mod secp256k1: Prepare v2.0.0. 2019-10-07 15:24:46 -05:00
go.sum secp256k1: Prepare v2.0.0. 2019-10-07 15:24:46 -05:00
precompute.go secp256k1: Unexport idents that do not need to be. 2017-06-08 11:34:52 -05:00
privkey_test.go sec256k1: update func signatures. 2017-12-21 19:38:42 -06:00
privkey.go multi: Correct typos. 2019-08-16 17:37:58 -05:00
pubkey_test.go multi: cleanup linter warnings 2019-02-13 08:38:25 -05:00
pubkey.go chainec/dcrec: Remove hybrid pubkey support 2018-03-20 17:45:09 -04:00
README.md dcrec: fix examples links. 2019-10-07 09:58:39 -05:00
secp256k1.go Fix and regenerate precomputed secp256k1 curve. 2017-08-18 14:09:28 -04:00
signature_test.go multi: cleanup linter warnings 2019-02-13 08:38:25 -05:00
signature.go multi: Correct typos. 2019-08-22 10:20:03 -05:00

secp256k1

Build Status ISC License GoDoc

Package dcrec implements elliptic curve cryptography needed for working with Decred (secp256k1 only for now). It is designed so that it may be used with the standard crypto/ecdsa packages provided with go. A comprehensive suite of test is provided to ensure proper functionality. Package dcrec was originally based on work from ThePiachu which is licensed under the same terms as Go, but it has signficantly diverged since then. The Decred developers original is licensed under the liberal ISC license.

Although this package was primarily written for dcrd, it has intentionally been designed so it can be used as a standalone package for any projects needing to use secp256k1 elliptic curve cryptography.

Installation and Updating

$ go get -u github.com/decred/dcrd/dcrec

Examples

  • Sign Message Demonstrates signing a message with a secp256k1 private key that is first parsed form raw bytes and serializing the generated signature.

  • Verify Signature Demonstrates verifying a secp256k1 signature against a public key that is first parsed from raw bytes. The signature is also parsed from raw bytes.

  • Encryption Demonstrates encrypting a message for a public key that is first parsed from raw bytes, then decrypting it using the corresponding private key.

  • Decryption Demonstrates decrypting a message using a private key that is first parsed from raw bytes.

License

Package dcrec is licensed under the copyfree ISC License except for dcrec.go and dcrec_test.go which is under the same license as Go.