vault

package
v1.5.5-testnet Latest Latest
Warning

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

Go to latest
Published: May 19, 2023 License: Apache-2.0, MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CryptoSafe

type CryptoSafe interface {
	// SignPartial returns the partial signature
	SignPartial(msg []byte) ([]byte, error)
}

CryptoSafe holds the cryptographic information to generate a partial beacon

type Vault

type Vault struct {
	*crypto.Scheme
	// contains filtered or unexported fields
}

Vault stores the information necessary to validate partial beacon, full beacons and to sign new partial beacons (it implements CryptoSafe interface). Vault is thread safe when using the methods.

func NewVault

func NewVault(currentGroup *key.Group, ks *key.Share, sch *crypto.Scheme) *Vault

func (*Vault) GetGroup

func (v *Vault) GetGroup() *key.Group

GetGroup returns the current group

func (*Vault) GetInfo

func (v *Vault) GetInfo() *chain.Info

func (*Vault) GetPub

func (v *Vault) GetPub() *share.PubPoly

func (*Vault) Index

func (v *Vault) Index() int

Index returns the index of the share

func (*Vault) SetInfo

func (v *Vault) SetInfo(newGroup *key.Group, ks *key.Share)

func (*Vault) SignPartial

func (v *Vault) SignPartial(msg []byte) ([]byte, error)

SignPartial implemements the CryptoSafe interface

Jump to

Keyboard shortcuts

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