p256

package
v0.0.0-...-a323530 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2020 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BytesCombine

func BytesCombine(pBytes ...[]byte) []byte

func CompressPubkey

func CompressPubkey(pubkey *ecdsa.PublicKey) []byte

CompressPubkey encodes a public key to the 33-byte compressed format.

func DecompressPubkey

func DecompressPubkey(pubkey []byte) (*ecdsa.PublicKey, error)

DecompressPubkey parses a public key in the 33-byte compressed format.

func ECRecovery

func ECRecovery(data []byte, rawSign []byte) (*ecdsa.PublicKey, error)

According hash and sign to rccovery publickey

func Sign

func Sign(priv *ecdsa.PrivateKey, hash []byte) ([]byte, error)

p256 Sign with privatekey

func ValidateSignatureValues

func ValidateSignatureValues(v byte, r, s *big.Int, homestead bool) bool

Validate v,r and s is true

func Verify

func Verify(public *ecdsa.PublicKey, hash []byte, sign []byte) bool

p256 Verify with publickey

Types

This section is empty.

Jump to

Keyboard shortcuts

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