secp256k1

package
v0.9.35-0...-34b622a Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2016 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	N     *big.Int
	HalfN *big.Int
)

holds ptr to secp256k1_context_struct (see secp256k1/include/secp256k1.h)

View Source
var (
	ErrInvalidMsgLen       = errors.New("invalid message length for signature recovery")
	ErrInvalidSignatureLen = errors.New("invalid signature length")
	ErrInvalidRecoveryID   = errors.New("invalid signature recovery id")
)

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)

RecoverPubkey returns the the public key of the signer. msg must be the 32-byte hash of the message to be signed. sig must be a 65-byte compact ECDSA signature containing the recovery id as the last element.

func Sign

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

func VerifySeckeyValidity

func VerifySeckeyValidity(seckey []byte) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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