frost

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

README

frost

import "github.com/coinbase/kryptology/pkg/ted25519/frost"

Index

type ChallengeDerive

type ChallengeDerive interface {
    DeriveChallenge(msg []byte, pubKey curves.Point, r curves.Point) (curves.Scalar, error)
}

type Ed25519ChallengeDeriver

type Ed25519ChallengeDeriver struct{}
func (Ed25519ChallengeDeriver) DeriveChallenge
func (ed Ed25519ChallengeDeriver) DeriveChallenge(msg []byte, pubKey curves.Point, r curves.Point) (curves.Scalar, error)

type Round1Bcast

Round1Bcast contains values to be broadcast to all players after the completion of signing round 1.

type Round1Bcast struct {
    Di, Ei curves.Point
}

type Round2Bcast

Round2Bcast contains values that will be broadcast to other signers after completion of round 2.

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

type Round3Bcast

Round3Bcast contains the output of FROST signature, i.e., it contains FROST signature (z,c) and the corresponding message msg.

type Round3Bcast struct {
    R    curves.Point
    Z, C curves.Scalar
    // contains filtered or unexported fields
}

type Signer

Signer is a tSchnorr player performing the signing operation.

type Signer struct {
    // contains filtered or unexported fields
}
func NewSigner
func NewSigner(info *frost.DkgParticipant, id, thresh uint32, lcoeffs map[uint32]curves.Scalar, cosigners []uint32, challengeDeriver ChallengeDerive) (*Signer, error)

NewSigner create a signer from a dkg participant Note that we can pre-assign Lagrange coefficients lcoeffs of each cosigner. This optimizes performance. See paragraph 3 of section 3 in the draft - https://tools.ietf.org/pdf/draft-komlo-frost-00.pdf

func (*Signer) SignRound1
func (signer *Signer) SignRound1() (*Round1Bcast, error)
func (*Signer) SignRound2
func (signer *Signer) SignRound2(msg []byte, round2Input map[uint32]*Round1Bcast) (*Round2Bcast, error)

SignRound2 implements FROST signing round 2.

func (*Signer) SignRound3
func (signer *Signer) SignRound3(round3Input map[uint32]*Round2Bcast) (*Round3Bcast, error)

Generated by gomarkdoc

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChallengeDerive

type ChallengeDerive interface {
	DeriveChallenge(msg []byte, pubKey curves.Point, r curves.Point) (curves.Scalar, error)
}

type Ed25519ChallengeDeriver

type Ed25519ChallengeDeriver struct{}

func (Ed25519ChallengeDeriver) DeriveChallenge

func (ed Ed25519ChallengeDeriver) DeriveChallenge(msg []byte, pubKey curves.Point, r curves.Point) (curves.Scalar, error)

type Round1Bcast

type Round1Bcast struct {
	Di, Ei curves.Point
}

Round1Bcast contains values to be broadcast to all players after the completion of signing round 1.

type Round2Bcast

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

Round2Bcast contains values that will be broadcast to other signers after completion of round 2.

type Round3Bcast

type Round3Bcast struct {
	R    curves.Point
	Z, C curves.Scalar
	// contains filtered or unexported fields
}

Round3Bcast contains the output of FROST signature, i.e., it contains FROST signature (z,c) and the corresponding message msg.

type Signer

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

Signer is a tSchnorr player performing the signing operation.

func NewSigner

func NewSigner(info *frost.DkgParticipant, id, thresh uint32, lcoeffs map[uint32]curves.Scalar, cosigners []uint32, challengeDeriver ChallengeDerive) (*Signer, error)

NewSigner create a signer from a dkg participant Note that we can pre-assign Lagrange coefficients lcoeffs of each cosigner. This optimizes performance. See paragraph 3 of section 3 in the draft - https://tools.ietf.org/pdf/draft-komlo-frost-00.pdf

func (*Signer) SignRound1

func (signer *Signer) SignRound1() (*Round1Bcast, error)

func (*Signer) SignRound2

func (signer *Signer) SignRound2(msg []byte, round2Input map[uint32]*Round1Bcast) (*Round2Bcast, error)

SignRound2 implements FROST signing round 2.

func (*Signer) SignRound3

func (signer *Signer) SignRound3(round3Input map[uint32]*Round2Bcast) (*Round3Bcast, error)

Jump to

Keyboard shortcuts

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