github.com/decred/dcrd/dcrec/secp256k1 (go): Package secp256k1 implements support for the elliptic curves needed for Decred.  Decred uses elliptic curve cryptography using koblitz curves (specifically secp256k1) for cryptographic functions.  See http://www.secg.org/sec2-v2.pdf for details on the standard.  This package provides the data structures and functions implementing the crypto/elliptic Curve interface in order to permit using these curves with the standard crypto/ecdsa package provided with go. Helper functionality is provided to parse signatures and public keys from standard formats.  It was designed for use with dcrd, but should be general enough for other uses of elliptic curve crypto.  It was originally based on some initial work by ThePiachu, but has significantly diverged since then.  This example demonstrates decrypting a message using a private key that is first parsed from raw bytes.   This example demonstrates encrypting a message for a public key that is first parsed from raw bytes, then decrypting it using the corresponding private key.   This example demonstrates signing a message with a secp256k1 private key that is first parsed form raw bytes and serializing the generated signature.   This example demonstrates verifying a secp256k1 signature against a public key that is first parsed from raw bytes.  The signature is also parsed from raw bytes.
Keywords: blockchain|cryptocurrency|dcrd|decred|decred-daemon|decred-nodes|go|golang|p2p|peer-to-peer