Documentation ¶
Index ¶
- Variables
- func CompressPubKey(pub *ecdsa.PublicKey) []byte
- func Ecrecover(hash, sig []byte) ([]byte, error)
- func GenerateKey() (*ecdsa.PrivateKey, error)
- func Keccak256(v ...[]byte) []byte
- func MarshallPrivateKey(priv *ecdsa.PrivateKey) ([]byte, error)
- func MarshallPublicKey(pub *ecdsa.PublicKey) []byte
- func ParseCompressedPubKey(d []byte) (*ecdsa.PublicKey, error)
- func ParsePrivateKey(buf []byte) (*ecdsa.PrivateKey, error)
- func ParsePublicKey(buf []byte) (*ecdsa.PublicKey, error)
- func RecoverPubkey(signature, hash []byte) (*ecdsa.PublicKey, error)
- func Sign(priv *ecdsa.PrivateKey, hash []byte) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var S256 = btcec.S256()
S256 is the secp256k1 elliptic curve
Functions ¶
func CompressPubKey ¶
func GenerateKey ¶
func GenerateKey() (*ecdsa.PrivateKey, error)
GenerateKey generates a new key based on the secp256k1 elliptic curve.
func MarshallPrivateKey ¶
func MarshallPrivateKey(priv *ecdsa.PrivateKey) ([]byte, error)
func MarshallPublicKey ¶
MarshallPublicKey marshalls a public key on the secp256k1 elliptic curve.
func ParsePrivateKey ¶
func ParsePrivateKey(buf []byte) (*ecdsa.PrivateKey, error)
func ParsePublicKey ¶
ParsePublicKey parses bytes into a public key on the secp256k1 elliptic curve.
func RecoverPubkey ¶
RecoverPubkey verifies the compact signature "signature" of "hash" for the secp256k1 curve.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.