genkey

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2021 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeKeypair

func DecodeKeypair(pkeystr string, skeySeedstr string) (ed25519.PublicKey, ed25519.PrivateKey)

DecodeKeypair decodes base64 encoded pkey and skey

func EncodeKeypair

func EncodeKeypair(pkey ed25519.PublicKey, skey ed25519.PrivateKey) (string, string)

EncodeKeypair encodes both pkey and skey using base64 and returns two strings

func GenerateKeypair

func GenerateKeypair() (ed25519.PublicKey, ed25519.PrivateKey)

GenerateKeypair generates ed25519 keypair, created it to be some higher level of abstraction

func ValidateKeypairsEquality

func ValidateKeypairsEquality(pair1 Keypair, pair2 Keypair)

ValidateKeypairsEquality checks if key are equal, key means pkey or skey, it must have Equal() property which returns boolean

func ValidateSigningPublicKey

func ValidateSigningPublicKey(pkey ed25519.PublicKey, skey ed25519.PrivateKey)

ValidateSigningPublicKey signs public key using private key and validates signature using public key

func ValidateSigningRandomMessage

func ValidateSigningRandomMessage(pkey ed25519.PublicKey, skey ed25519.PrivateKey)

ValidateSigningRandomMessage signs public key using private key and validates signature using public key

Types

type Keypair

type Keypair struct {
	PublicKey  ed25519.PublicKey
	PrivateKey ed25519.PrivateKey
}

Keypair contains both ed25519 pkey and skey

Jump to

Keyboard shortcuts

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