kyber: go.dedis.ch/kyber/sign Index | Files | Directories

package sign

import "go.dedis.ch/kyber/sign"

Package sign contains useful tools for the different signing algorithms.

Index

Package Files

mask.go policy.go

type CompletePolicy Uses

type CompletePolicy struct {
}

CompletePolicy is the default policy requiring that all participants have cosigned to make a collective signature valid.

func (CompletePolicy) Check Uses

func (p CompletePolicy) Check(m ParticipationMask) bool

Check verifies that all participants have contributed to a collective signature.

type Mask Uses

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

Mask is a bitmask of the participation to a collective signature.

func NewMask Uses

func NewMask(suite pairing.Suite, publics []kyber.Point, myKey kyber.Point) (*Mask, error)

NewMask creates a new mask from a list of public keys. If a key is provided, it will set the bit of the key to 1 or return an error if it is not found.

func (*Mask) CountEnabled Uses

func (m *Mask) CountEnabled() int

CountEnabled returns the number of bit set to 1

func (*Mask) CountTotal Uses

func (m *Mask) CountTotal() int

CountTotal returns the number of potential participants

func (*Mask) IndexOfNthEnabled Uses

func (m *Mask) IndexOfNthEnabled(nth int) int

IndexOfNthEnabled returns the index of the nth enabled bit or -1 if out of bounds.

func (*Mask) Len Uses

func (m *Mask) Len() int

Len returns the length of the byte array necessary to store the bitmask.

func (*Mask) Mask Uses

func (m *Mask) Mask() []byte

Mask returns the bitmask as a byte array.

func (*Mask) Merge Uses

func (m *Mask) Merge(mask []byte) error

Merge merges the given mask to the current one only if the length matches

func (*Mask) NthEnabledAtIndex Uses

func (m *Mask) NthEnabledAtIndex(idx int) int

NthEnabledAtIndex returns the sum of bits set to 1 until the given index. In other words, it returns how many bits are enabled before the given index.

func (*Mask) Participants Uses

func (m *Mask) Participants() []kyber.Point

Participants returns the list of public keys participating.

func (*Mask) Publics Uses

func (m *Mask) Publics() []kyber.Point

Publics returns a copy of the list of public keys.

func (*Mask) SetBit Uses

func (m *Mask) SetBit(i int, enable bool) error

SetBit turns on or off the bit at the given index.

func (*Mask) SetMask Uses

func (m *Mask) SetMask(mask []byte) error

SetMask replaces the current mask by the new one if the length matches.

type ParticipationMask Uses

type ParticipationMask interface {
    // CountEnabled returns the number of participants
    CountEnabled() int
    // CountTotal returns the number of candidates
    CountTotal() int
}

ParticipationMask is an interface to get the total number of candidates and the number of participants.

type Policy Uses

type Policy interface {
    Check(m ParticipationMask) bool
}

Policy represents a fully customizable cosigning policy deciding what cosigner sets are and aren't sufficient for a collective signature to be considered acceptable to a verifier. The Check method may inspect the set of participants that cosigned by invoking cosi.Mask and/or cosi.MaskBit, and may use any other relevant contextual information (e.g., how security-critical the operation relying on the collective signature is) in determining whether the collective signature was produced by an acceptable set of cosigners.

type ThresholdPolicy Uses

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

ThresholdPolicy allows to specify a simple t-of-n policy requring that at least the given threshold number of participants t have cosigned to make a collective signature valid.

func NewThresholdPolicy Uses

func NewThresholdPolicy(thold int) *ThresholdPolicy

NewThresholdPolicy returns a new ThresholdPolicy with the given threshold.

func (ThresholdPolicy) Check Uses

func (p ThresholdPolicy) Check(m ParticipationMask) bool

Check verifies that at least a threshold number of participants have contributed to a collective signature.

Directories

PathSynopsis
anonPackage anon implements cryptographic primitives for anonymous communication.
bdnPackage bdn implements the Boneh-Drijvers-Neven signature scheme which is an implementation of the bls package which is robust against rogue public-key attacks.
blsPackage bls implements the Boneh-Lynn-Shacham (BLS) signature scheme which was introduced in the paper "Short Signatures from the Weil Pairing".
cosiPackage cosi implements the collective signing (CoSi) algorithm as presented in the paper "Keeping Authorities 'Honest or Bust' with Decentralized Witness Cosigning" by Ewa Syta et al.
dssPackage dss implements the Distributed Schnorr Signature protocol from the paper "Provably Secure Distributed Schnorr Signatures and a (t, n) Threshold Scheme for Implicit Certificates".
eddsaPackage eddsa implements the EdDSA signature algorithm according to RFC8032.
schnorrPackage schnorr implements the vanilla Schnorr signature scheme.
tblsPackage tbls implements the (t,n)-threshold Boneh-Lynn-Shacham signature scheme.

Package sign imports 4 packages (graph). Updated 2019-11-22. Refresh now. Tools for package owners.