dkgencryptkey

package
v2.5.0-beta0 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Key

type Key struct {
	PublicKey kyber.Point
	// contains filtered or unexported fields
}

func FromEncryptedJSON

func FromEncryptedJSON(keyJSON []byte, password string) (Key, error)

FromEncryptedJSON returns a dkgencryptkey.KeyV2 from encrypted data in go-ethereum keystore format.

func MustNewXXXTestingOnly

func MustNewXXXTestingOnly(sk *big.Int) Key

MustNewXXXTestingOnly creates a new DKGEncrypt key from the given secret key. NOTE: for testing only.

func New

func New() (Key, error)

New returns a new dkgencryptkey key

func (Key) GoString

func (k Key) GoString() string

GoString implements fmt.GoStringer

func (Key) ID

func (k Key) ID() string

ID returns the ID of this key

func (Key) KyberPoint

func (k Key) KyberPoint() kyber.Point

KyberPoint returns the public key as a kyber.Point object

func (Key) KyberScalar

func (k Key) KyberScalar() kyber.Scalar

KyberScalar returns the private key as a kyber.Scalar object

func (Key) PublicKeyString

func (k Key) PublicKeyString() string

PublicKeyString returns the hex representation of this key's public key

func (Key) Raw

func (k Key) Raw() Raw

Raw returns the key raw data

func (Key) String

func (k Key) String() string

String returns the string representation of this key

func (Key) ToEncryptedJSON

func (k Key) ToEncryptedJSON(password string, scryptParams utils.ScryptParams) (export []byte, err error)

ToEncryptedJSON exports this key into a JSON object following the format of EncryptedDKGEncryptKeyExport

type Raw

type Raw []byte

func (Raw) GoString

func (r Raw) GoString() string

func (Raw) Key

func (r Raw) Key() Key

func (Raw) String

func (r Raw) String() string

Jump to

Keyboard shortcuts

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