secp256k1

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const PrivateKeyBytes = 32

PrivateKeyBytes is the size of a serialized private key.

Variables

This section is empty.

Functions

func EcRecover

func EcRecover(msg, signature []byte) ([]byte, error)

EcRecover recovers the public key from a message, signature pair.

func GenerateKey

func GenerateKey() ([]byte, error)

GenerateKey creates a new key using secure randomness from crypto.rand.

func GenerateKeyFromSeed

func GenerateKeyFromSeed(seed io.Reader) ([]byte, error)

GenerateKeyFromSeed generates a new key from the given reader.

func PublicKey

func PublicKey(sk []byte) []byte

PublicKey returns the public key for this private key.

func Sign

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

Sign signs the given message, which must be 32 bytes long.

Types

This section is empty.

Jump to

Keyboard shortcuts

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