ecdsa

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCurveHalfOrdersAt

func GetCurveHalfOrdersAt(c elliptic.Curve) *big.Int

func GetSHA256HASH

func GetSHA256HASH(data string) []byte

func IsLowS

func IsLowS(k *ecdsa.PublicKey, s *big.Int) (bool, error)

IsLow checks that s is a low-S

func LoadPrivateKey

func LoadPrivateKey(privateKey string) (*ecdsa.PrivateKey, error)

func LoadPrivateKeyByFile

func LoadPrivateKeyByFile(file string) (*ecdsa.PrivateKey, error)

func LoadPublicKey

func LoadPublicKey(cert string) (*ecdsa.PublicKey, error)

func LoadPublicKeyByFile

func LoadPublicKeyByFile(file string) (*ecdsa.PublicKey, error)

func LoadPublicKeyNotCert

func LoadPublicKeyNotCert(cert string) (*ecdsa.PublicKey, error)

func NewEcdsaR1Handle

func NewEcdsaR1Handle(pub, pri string) (*ecdsaHandle, error)

func SignECDSA

func SignECDSA(k *ecdsa.PrivateKey, digest []byte) (signature []byte, err error)

func ToLowS

func ToLowS(k *ecdsa.PublicKey, s *big.Int) (*big.Int, bool, error)

func UnmarshalECDSASignature

func UnmarshalECDSASignature(raw []byte) (*big.Int, *big.Int, error)

func VerifyECDSA

func VerifyECDSA(k *ecdsa.PublicKey, signature, digest []byte) (bool, error)

Types

type ECDSASignature

type ECDSASignature struct {
	R, S *big.Int
}

Jump to

Keyboard shortcuts

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