keytools

package
v0.0.2-alpha Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2018 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CurveEd25519   string = "ed25519"
	CurveSecp256K1 string = "secp256k1"
	MaxMsgLen             = 32
)

Constants shared within subfolders

Variables

This section is empty.

Functions

func GenerateSigningKeyPair

func GenerateSigningKeyPair(publicFileName, privateFileName, curveType string)

GenerateSigningKeyPair generates based on the curveType and writes keys to file paths given.

func SignMessage

func SignMessage(privateKey, message []byte, curveType string, ethereumSign bool) ([]byte, error)

SignMessage signs the message using the private key as the curveType provided. if ethereumSign is true, then the signature format is specific to ethereum.

func VerifyMessage

func VerifyMessage(publicKey, message []byte, signature []byte, curveType string, ethereumVerify bool) bool

VerifyMessage verifies message using the public key as per the curve type. if ethereumVerify is true, ethereum specific verification is done

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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