secp256k1

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrivKeyFromBytes

func PrivKeyFromBytes(curve *secp256k1.BitCurve, privKey []byte) (*PrivateKey, *PublicKey)

PrivKeyFromBytes returns the PrivateKey and PublicKey corresponding to privKey

func S256

func S256() *secp256k1.BitCurve

S256 returns set of parameters for secp256k1

Types

type PrivateKey

type PrivateKey ecdsa.PrivateKey

PrivateKey is the private key

func NewPrivateKey

func NewPrivateKey(curve *secp256k1.BitCurve) (*PrivateKey, error)

NewPrivateKey returns a new private key

func (*PrivateKey) PubKey

func (priv *PrivateKey) PubKey() *PublicKey

PubKey returns the public key corresponding to the private key

func (*PrivateKey) Serialize

func (priv *PrivateKey) Serialize() []byte

Serialize returns the byte slice of the private key

type PublicKey

type PublicKey ecdsa.PublicKey

PublicKey is the public key

func ParsePubKey

func ParsePubKey(pubkeyBytes []byte, curve *secp256k1.BitCurve) (*PublicKey, error)

ParsePubKey parses a byte slice into a PublicKey

func (*PublicKey) SerializeCompressed

func (pub *PublicKey) SerializeCompressed() []byte

SerializeCompressed returns the compressed form of the public key

Jump to

Keyboard shortcuts

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