tbdn

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2020 License: Apache-2.0, BSD-2-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Recover

func Recover(suite pairing.Suite, public *share.PubPoly, msg []byte, sigs [][]byte, t, n int) ([]byte, error)

Recover reconstructs the full BDN signature S = x * H(m) from a threshold t of signature shares Si using Lagrange interpolation. The full signature S can be verified through the regular BDN verification routine using the shared public key X. The shared public key can be computed by evaluating the public sharing polynomial at index 0.

func Sign

func Sign(suite pairing.Suite, private *share.PriShare, msg []byte) ([]byte, error)

Sign creates a threshold BDN signature Si = xi * H(m) on the given message m using the provided secret key share xi.

func Verify

func Verify(suite pairing.Suite, public *share.PubPoly, msg, sig []byte) error

VerifySigShare checks the given threshold BDN signature Si on the message m using the public key share Xi that is associated to the secret key share xi. This public key share Xi can be computed by evaluating the public sharing polynomial at the share's index i.

Types

type SigShare

type SigShare []byte

sigShare encodes a threshold BDN signature share Si = i || v where the 2-byte big-endian value i corresponds to the share's index and v represents the share's value. The signature share Si is a point on curve G1.

func (SigShare) Index

func (s SigShare) Index() (int, error)

Index returns the index i of the TBDN share Si.

func (*SigShare) Value

func (s *SigShare) Value() []byte

Value returns the value v of the TBDN share Si.

Jump to

Keyboard shortcuts

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