signlib

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodePrivateKey

func DecodePrivateKey(pemEncoded string) (*ecdsa.PrivateKey, error)

func DecodePublicKey

func DecodePublicKey(pemEncoded string) (*ecdsa.PublicKey, error)

func EncodePrivateKey

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

func EncodePublicKey

func EncodePublicKey(publicKey *ecdsa.PublicKey) (string, error)

func GeneratePrivateKey

func GeneratePrivateKey() (*ecdsa.PrivateKey, error)

GeneratePrivateKey : ecdsa.PrivateKey

func GeneratePublicKey

func GeneratePublicKey(privateKey *ecdsa.PrivateKey) *ecdsa.PublicKey

GeneratePublicKey :

func VerifyMessage

func VerifyMessage(message string, publicKey *ecdsa.PublicKey, signature Signature) (bool, error)

VerifyMessage : Verifies signatures generated using golang's ecdsa function

Types

type Signature

type Signature struct {
	R *big.Int
	S *big.Int
}

Signature :

func SignMessage

func SignMessage(message string, privateKey *ecdsa.PrivateKey) (Signature, error)

SignMessage : Generates a valid digital signature for golang's ecdsa library

Jump to

Keyboard shortcuts

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