github.com/BlockABC/godash@v0.0.0-20191112120524-f4aa3a32c566/btcec/README.md (about)

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