• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..13-May-2020-

README.mdH A D13-May-20202.8 KiB6950

bench_test.goH A D13-May-20204.9 KiB146105

btcec.goH A D13-May-202037.5 KiB977496

btcec_test.goH A D13-May-202028.9 KiB890748

ciphering.goH A D13-May-20206.1 KiB217128

ciphering_test.goH A D13-May-20205.9 KiB175149

doc.goH A D13-May-2020947 221

example_test.goH A D13-May-20204.8 KiB169108

field.goH A D13-May-202051.4 KiB1,353724

field_test.goH A D13-May-202031.5 KiB968762

genprecomps.goH A D13-May-20201.8 KiB6445

gensecp256k1.goH A D13-May-20205.9 KiB204115

precompute.goH A D13-May-20201.9 KiB6846

privkey.goH A D13-May-20202.2 KiB7442

privkey_test.goH A D13-May-20201.2 KiB5644

pubkey.goH A D13-May-20205.8 KiB195129

pubkey_test.goH A D13-May-20209.2 KiB297278

secp256k1.goH A D13-May-20201.1 MiB112

signature.goH A D13-May-202016.2 KiB541331

signature_test.goH A D13-May-202023.8 KiB696616

README.md

1btcec
2=====
3
4[![Build Status](https://travis-ci.org/btcsuite/btcd.png?branch=master)](https://travis-ci.org/btcsuite/btcec)
5[![ISC License](http://img.shields.io/badge/license-ISC-blue.svg)](http://copyfree.org)
6[![GoDoc](https://godoc.org/github.com/btcsuite/btcd/btcec?status.png)](http://godoc.org/github.com/btcsuite/btcd/btcec)
7
8Package btcec implements elliptic curve cryptography needed for working with
9Bitcoin (secp256k1 only for now). It is designed so that it may be used with the
10standard crypto/ecdsa packages provided with go.  A comprehensive suite of test
11is provided to ensure proper functionality.  Package btcec was originally based
12on work from ThePiachu which is licensed under the same terms as Go, but it has
13signficantly diverged since then.  The btcsuite developers original is licensed
14under the liberal ISC license.
15
16Although this package was primarily written for btcd, it has intentionally been
17designed so it can be used as a standalone package for any projects needing to
18use secp256k1 elliptic curve cryptography.
19
20## Installation and Updating
21
22```bash
23$ go get -u github.com/btcsuite/btcd/btcec
24```
25
26## Examples
27
28* [Sign Message](http://godoc.org/github.com/btcsuite/btcd/btcec#example-package--SignMessage)
29  Demonstrates signing a message with a secp256k1 private key that is first
30  parsed form raw bytes and serializing the generated signature.
31
32* [Verify Signature](http://godoc.org/github.com/btcsuite/btcd/btcec#example-package--VerifySignature)
33  Demonstrates verifying a secp256k1 signature against a public key that is
34  first parsed from raw bytes.  The signature is also parsed from raw bytes.
35
36* [Encryption](http://godoc.org/github.com/btcsuite/btcd/btcec#example-package--EncryptMessage)
37  Demonstrates encrypting a message for a public key that is first parsed from
38  raw bytes, then decrypting it using the corresponding private key.
39
40* [Decryption](http://godoc.org/github.com/btcsuite/btcd/btcec#example-package--DecryptMessage)
41  Demonstrates decrypting a message using a private key that is first parsed
42  from raw bytes.
43
44## GPG Verification Key
45
46All official release tags are signed by Conformal so users can ensure the code
47has not been tampered with and is coming from the btcsuite developers.  To
48verify the signature perform the following:
49
50- Download the public key from the Conformal website at
51  https://opensource.conformal.com/GIT-GPG-KEY-conformal.txt
52
53- Import the public key into your GPG keyring:
54  ```bash
55  gpg --import GIT-GPG-KEY-conformal.txt
56  ```
57
58- Verify the release tag with the following command where `TAG_NAME` is a
59  placeholder for the specific tag:
60  ```bash
61  git tag -v TAG_NAME
62  ```
63
64## License
65
66Package btcec is licensed under the [copyfree](http://copyfree.org) ISC License
67except for btcec.go and btcec_test.go which is under the same license as Go.
68
69