secp256k1

package
v0.0.0-...-9259d71 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2018 License: BSD-2-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const ID = 1
View Source
const Name = "secp256k1"

Variables

This section is empty.

Functions

This section is empty.

Types

type Driver

type Driver struct{}

func (Driver) GenKey

func (d Driver) GenKey() (crypto.PrivKey, error)

Ctypto

func (Driver) PrivKeyFromBytes

func (d Driver) PrivKeyFromBytes(b []byte) (privKey crypto.PrivKey, err error)

func (Driver) PubKeyFromBytes

func (d Driver) PubKeyFromBytes(b []byte) (pubKey crypto.PubKey, err error)

func (Driver) SignatureFromBytes

func (d Driver) SignatureFromBytes(b []byte) (sig crypto.Signature, err error)

type PrivKeySecp256k1

type PrivKeySecp256k1 [32]byte

PrivKey

func (PrivKeySecp256k1) Bytes

func (privKey PrivKeySecp256k1) Bytes() []byte

func (PrivKeySecp256k1) Equals

func (privKey PrivKeySecp256k1) Equals(other crypto.PrivKey) bool

func (PrivKeySecp256k1) PubKey

func (privKey PrivKeySecp256k1) PubKey() crypto.PubKey

func (PrivKeySecp256k1) Sign

func (privKey PrivKeySecp256k1) Sign(msg []byte) crypto.Signature

func (PrivKeySecp256k1) String

func (privKey PrivKeySecp256k1) String() string

type PubKeySecp256k1

type PubKeySecp256k1 [33]byte

Compressed pubkey (just the x-cord), prefixed with 0x02 or 0x03, depending on the y-cord.

func (PubKeySecp256k1) Bytes

func (pubKey PubKeySecp256k1) Bytes() []byte

func (PubKeySecp256k1) Equals

func (pubKey PubKeySecp256k1) Equals(other crypto.PubKey) bool

func (PubKeySecp256k1) KeyString

func (pubKey PubKeySecp256k1) KeyString() string

Must return the full bytes in hex. Used for map keying, etc.

func (PubKeySecp256k1) String

func (pubKey PubKeySecp256k1) String() string

func (PubKeySecp256k1) VerifyBytes

func (pubKey PubKeySecp256k1) VerifyBytes(msg []byte, sig crypto.Signature) bool

type SignatureS

type SignatureS struct {
	crypto.Signature
}

type SignatureSecp256k1

type SignatureSecp256k1 []byte

Signature

func (SignatureSecp256k1) Bytes

func (sig SignatureSecp256k1) Bytes() []byte

func (SignatureSecp256k1) Equals

func (sig SignatureSecp256k1) Equals(other crypto.Signature) bool

func (SignatureSecp256k1) IsZero

func (sig SignatureSecp256k1) IsZero() bool

func (SignatureSecp256k1) String

func (sig SignatureSecp256k1) String() string

Jump to

Keyboard shortcuts

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