params

package
v1.8.2 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Box

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

Box is a container for TSS key generation parameters. Box lets to get its content as well as to destroy it.

This type is useful for passing pre-parameters around for retried key generation attempts. Generating pre-parameters is very expensive and we do not want to re-generate them for every key generation retry attempt. On the other hand, pre-parameters can't be reused once they were used for communication with other clients.

For this reason, instead of passing raw pre-parameters to key generation, we can pass a box. When the node shares its pre parameters with other nodes, box content should be destroyed. Until then, it's fine to pass the box around and consume its content for any calculations needed between retried key-generation attempts.

func NewBox

func NewBox(params *keygen.LocalPreParams) *Box

NewBox creates a new PreParamsBox with the provided key generation pre-params inside.

func (*Box) Content

func (b *Box) Content() (*keygen.LocalPreParams, error)

Content gets the box content or error if the content has been previously destroyed.

func (*Box) DestroyContent

func (b *Box) DestroyContent()

DestroyContent destroys the box content so that all further calls to Content() function will fail.

func (*Box) IsEmpty

func (b *Box) IsEmpty() bool

IsEmpty returns true if the box content has been destroyed. Otherwise, returns false.

Jump to

Keyboard shortcuts

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