Documentation ¶
Overview ¶
Package sign contains useful tools for the different signing algorithms.
Index ¶
- type CompletePolicy
- type Mask
- func (m *Mask) CountEnabled() int
- func (m *Mask) CountTotal() int
- func (m *Mask) IndexOfNthEnabled(nth int) int
- func (m *Mask) Len() int
- func (m *Mask) Mask() []byte
- func (m *Mask) Merge(mask []byte) error
- func (m *Mask) NthEnabledAtIndex(idx int) int
- func (m *Mask) Participants() []kyber.Point
- func (m *Mask) Publics() []kyber.Point
- func (m *Mask) SetBit(i int, enable bool) error
- func (m *Mask) SetMask(mask []byte) error
- type ParticipationMask
- type Policy
- type ThresholdPolicy
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CompletePolicy ¶
type CompletePolicy struct { }
CompletePolicy is the default policy requiring that all participants have cosigned to make a collective signature valid.
func (CompletePolicy) Check ¶
func (p CompletePolicy) Check(m ParticipationMask) bool
Check verifies that all participants have contributed to a collective signature.
type Mask ¶
type Mask struct {
// contains filtered or unexported fields
}
Mask is a bitmask of the participation to a collective signature.
func NewMask ¶
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 ¶
CountEnabled returns the number of bit set to 1
func (*Mask) CountTotal ¶
CountTotal returns the number of potential participants
func (*Mask) IndexOfNthEnabled ¶
IndexOfNthEnabled returns the index of the nth enabled bit or -1 if out of bounds.
func (*Mask) NthEnabledAtIndex ¶
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 ¶
Participants returns the list of public keys participating.
type ParticipationMask ¶
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 ¶
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 ¶
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 ¶
func NewThresholdPolicy(thold int) *ThresholdPolicy
NewThresholdPolicy returns a new ThresholdPolicy with the given threshold.
func (ThresholdPolicy) Check ¶
func (p ThresholdPolicy) Check(m ParticipationMask) bool
Check verifies that at least a threshold number of participants have contributed to a collective signature.
Directories ¶
Path | Synopsis |
---|---|
Package anon implements cryptographic primitives for anonymous communication.
|
Package anon implements cryptographic primitives for anonymous communication. |
Package bdn implements the Boneh-Drijvers-Neven signature scheme which is an implementation of the bls package which is robust against rogue public-key attacks.
|
Package bdn implements the Boneh-Drijvers-Neven signature scheme which is an implementation of the bls package which is robust against rogue public-key attacks. |
Package bls implements the Boneh-Lynn-Shacham (BLS) signature scheme which was introduced in the paper "Short Signatures from the Weil Pairing".
|
Package bls implements the Boneh-Lynn-Shacham (BLS) signature scheme which was introduced in the paper "Short Signatures from the Weil Pairing". |
Package 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.
|
Package 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. |
Package dss implements the Distributed Schnorr Signature protocol from the paper "Provably Secure Distributed Schnorr Signatures and a (t, n) Threshold Scheme for Implicit Certificates".
|
Package dss implements the Distributed Schnorr Signature protocol from the paper "Provably Secure Distributed Schnorr Signatures and a (t, n) Threshold Scheme for Implicit Certificates". |
Package eddsa implements the EdDSA signature algorithm according to RFC8032.
|
Package eddsa implements the EdDSA signature algorithm according to RFC8032. |
Package schnorr implements the vanilla Schnorr signature scheme.
|
Package schnorr implements the vanilla Schnorr signature scheme. |
Package tbls implements the (t,n)-threshold Boneh-Lynn-Shacham signature scheme.
|
Package tbls implements the (t,n)-threshold Boneh-Lynn-Shacham signature scheme. |