secp256k1

package
v0.9.22 Latest Latest
Warning

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

Go to latest
Published: May 17, 2015 License: LGPL-2.1-or-later 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

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

func GeneratePubKey

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

func Stop()

func VerifyPubkeyValidity

func VerifyPubkeyValidity(pubkey []byte) error

func VerifySeckeyValidity

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

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