recoverable

package
v0.0.17 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCurve  = errors.New("unsupport curve")
	ErrPubKey = errors.New("no valid solution for pubkey found")
)

ErrCurve .

Functions

func Recover

func Recover(curve elliptic.Curve, sig *sign.Signature, hash []byte) (*ecdsa.PublicKey, bool, error)

Recover recover public key from sig and hash

func RecoverWithNonce

func RecoverWithNonce(curve elliptic.Curve, sig *sign.Signature, hash []byte, nonce int) (*ecdsa.PublicKey, bool, error)

RecoverWithNonce .

func Sign

func Sign(privateKey *ecdsa.PrivateKey, hash []byte, compressed bool) (*sign.Signature, error)

Sign .

func SignWithNonce

func SignWithNonce(privateKey *ecdsa.PrivateKey, hash []byte, nonce int, compressed bool) (*sign.Signature, error)

SignWithNonce .

Types

type Cofactor

type Cofactor interface {
	H() int
}

Cofactor elliptic.CurveParams extend interface

Jump to

Keyboard shortcuts

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