secp256k1

package
v1.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 2, 2015 License: GPL-3.0 Imports: 5 Imported by: 0

README

secp256k1-go

golang secp256k1 library

Implements cryptographic operations for the secp256k1 ECDSA curve used by Bitcoin.

Installing

GMP library headers are required to build. On Debian-based systems, the package is called libgmp-dev.

sudo apt-get install libgmp-dev

Now compiles with cgo!

Test

To run tests do

go tests

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateKeyPair added in v0.9.39

func GenerateKeyPair() ([]byte, []byte)

func GeneratePubKey added in v0.9.39

func GeneratePubKey(seckey []byte) ([]byte, error)

func RecoverPubkey

func RecoverPubkey(msg []byte, sig []byte) ([]byte, error)

recovers the public key from the signature recovery of pubkey means correct signature

func Sign

func Sign(msg []byte, seckey []byte) ([]byte, error)

func Stop added in v0.9.39

func Stop()

func VerifyPubkeyValidity added in v0.9.39

func VerifyPubkeyValidity(pubkey []byte) error

func VerifySeckeyValidity added in v0.9.39

func VerifySeckeyValidity(seckey []byte) error

func VerifySignature

func VerifySignature(msg []byte, sig []byte, pubkey1 []byte) error

for compressed signatures, does not need pubkey

func VerifySignatureValidity added in v0.9.39

func VerifySignatureValidity(sig []byte) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL