sign_offline

package
v0.0.0-...-35ce414 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Alice

type Alice[A any, B any] struct {
	// contains filtered or unexported fields
}

func NewAlice

func NewAlice[A any, B any](curve *curves.Curve, output *dkg.Output, sender MTASender[A, B]) *Alice[A, B]

NewAlice creates a party that can participate in protocol runs of DKLs sign, in the role of Alice.

func (*Alice[A, B]) Output

func (alice *Alice[A, B]) Output() *AliceOutput

func (*Alice[A, B]) Step2

func (alice *Alice[A, B]) Step2(commitment schnorr.Commitment, a A) (curves.Point, curves.Scalar, curves.Scalar, *schnorr.Proof, B)

func (*Alice[A, B]) Step4

func (alice *Alice[A, B]) Step4(proof *schnorr.Proof)

type AliceOutput

type AliceOutput struct {
	R       curves.Scalar
	X1      curves.Scalar
	K1      curves.Scalar
	PkJoint curves.Point
}

type Bob

type Bob[A any, B any] struct {
	// contains filtered or unexported fields
}

func NewBob

func NewBob[A any, B any](curve *curves.Curve, output *dkg.Output, receiver MTAReceiver[A, B]) *Bob[A, B]

NewBob creates a party that can participate in protocol runs of DKLs sign, in the role of Bob. This party receives the signature at the end.

func (*Bob[A, B]) Output

func (bob *Bob[A, B]) Output() *BobOutput

func (*Bob[A, B]) Step1

func (bob *Bob[A, B]) Step1() (schnorr.Commitment, A)

func (*Bob[A, B]) Step3

func (bob *Bob[A, B]) Step3(q1 curves.Point, r1 curves.Scalar, cc curves.Scalar, proof *schnorr.Proof, b B) *schnorr.Proof

type BobOutput

type BobOutput struct {
	R       curves.Scalar
	K2      curves.Scalar
	X2      curves.Scalar
	R1      curves.Scalar
	PkJoint curves.Point
}

type MTAReceiver

type MTAReceiver[A any, B any] interface {
	Init(curves.Scalar) A
	Multiply(B) curves.Scalar
}

type MTASender

type MTASender[A any, B any] interface {
	Update(curves.Scalar, A) (curves.Scalar, B)
}

Jump to

Keyboard shortcuts

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