internal

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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")
)

ErrInvalid defines error message

Functions

func BaseMul

func BaseMul(scalar []byte) (*big.Int, *big.Int)

BaseMul base mul

func CurveScalarMult

func CurveScalarMult(Bx, By *big.Int, scalar []byte) (*big.Int, *big.Int)

CurveScalarMult Curve Scalar Mult

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, rand io.Reader) ([]byte, error)

Sign return

Types

This section is empty.

Jump to

Keyboard shortcuts

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