deterministic

package
v0.0.0-...-3d164b4 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package deterministic defines an implementation of an insecure, purely deterministic keyvault used by this remote signer server for demonstration purposes.

WARN: This is a toy implementation that returns deterministic BLS12-381 secret+public key pairs, NOT MEANT FOR PRODUCTION.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store struct {
	// contains filtered or unexported fields
}

Store defines a deterministic keyvault, written for demonstrative purposes.

func NewStore

func NewStore(numKeys int) (*Store, error)

NewStore instantiates a deterministic keyvault using a set number of keys.

func (*Store) GetPublicKeys

func (s *Store) GetPublicKeys(context.Context) ([]bls.PublicKey, error)

GetPublicKeys returns all available BLS12-381 public keys in the deterministic keyvault.

func (*Store) GetSecretKey

func (s *Store) GetSecretKey(ctx context.Context, pubKey bls.PublicKey) (bls.SecretKey, error)

GetSecretKey returns the corresponding secret key for a BLS12-381 public key.

Jump to

Keyboard shortcuts

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