keygen

package
v0.0.0-...-70e5bc8 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: Apache-2.0 Imports: 8 Imported by: 2

Documentation

Overview

Package keygen provides functions for generating Upspin key pairs and writing them to files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromSecret

func FromSecret(curveName, secret string) (public, private, secretStr string, err error)

FromSecret generates a key pair with the given curve and secret seed.

func Generate

func Generate(curveName string) (public, private, secretStr string, err error)

Generate generates a random key pair on the given curve.

func SaveKeys

func SaveKeys(where string, rotate bool, newPublic, newPrivate, secretStr string) error

SaveKeys writes the provided public and private keys to the given directory, rotating them if requested by appending the old secret to secret2.upspinkey. If secretStr is non-empty it is appended as a comment to the private key. If rotate is false and there are existing keys, SaveKeys returns an error. If rotate is true and there are no existing keys, SaveKeys returns an error.

func ValidSecretSeed

func ValidSecretSeed(seed string) bool

ValidSecretSeed reports whether a seed conforms to the proquint format.

Types

This section is empty.

Jump to

Keyboard shortcuts

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