dcrd/dcrec/secp256k1
2018-02-18 12:26:52 -06:00
..
schnorr travis: drop docker 2018-02-16 22:06:22 -06:00
bench_test.go secp256k1: Add benchmark for field normalization. 2017-06-08 23:55:26 -05:00
btcec_test.go travis: test in docker container 2018-02-18 10:27:18 -06:00
btcec.go secp256k1: Slightly optimize NAF and add several tests. 2017-06-09 14:00:17 -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 Work on improving the use of analysis tools in goclean.sh 2016-02-12 15:24:32 -05:00
example_test.go sec256k1: update func signatures. 2017-12-21 19:38:42 -06:00
field_test.go secp256k1: Add regression tests for field.go. 2017-08-01 23:22:13 -05:00
field.go secp256k1: Add regression tests for field.go. 2017-08-01 23:22:13 -05:00
genprecomps.go Fix and regenerate precomputed secp256k1 curve. 2017-08-18 14:09:28 -04:00
gensecp256k1.go blockchain: Rework to use new db interface. 2016-08-18 15:42:18 -04: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 sec256k1: update func signatures. 2017-12-21 19:38:42 -06:00
pubkey_test.go sec256k1: update func signatures. 2017-12-21 19:38:42 -06:00
pubkey.go sec256k1: update func signatures. 2017-12-21 19:38:42 -06:00
README.md multi: Update markdown files for GFM changes. 2017-07-16 15:33:12 -05:00
secp256k1.go Fix and regenerate precomputed secp256k1 curve. 2017-08-18 14:09:28 -04:00
signature_test.go sec256k1: update func signatures. 2017-12-21 19:38:42 -06:00
signature.go multi: fix misspell linter warnings 2018-02-18 12:26:52 -06: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.