package cosi
import "go.dedis.ch/dela/cosi"
Package cosi defines a collective signing protocol abstraction. A set of participants will work with each others to sign a unique message collectively in the sense that the protocol produces a single signature that will verify the full, or partial, aggregated public key.
Related Papers:
Enhancing Bitcoin Security and Performance with Strong Consistency via Collective Signing (2016) https://www.usenix.org/system/files/conference/usenixsecurity16/sec16_paper_kokoris-kogias.pdf
On the Security of Two-Round Multi-Signatures (2019) https://eprint.iacr.org/2018/417.pdf
Documentation Last Review: 05.10.2020
Index ¶
- func RegisterMessageFormat(name serde.Format, f serde.FormatEngine)
- type Actor
- type CollectiveSigning
- type MessageFactory
- func NewMessageFactory(msg serde.Factory, sig crypto.SignatureFactory) MessageFactory
- func (f MessageFactory) Deserialize(ctx serde.Context, data []byte) (serde.Message, error)
- type MsgKey
- type Reactor
- type SigKey
- type SignatureRequest
- type SignatureResponse
- type Threshold
Functions ¶
func RegisterMessageFormat ¶
func RegisterMessageFormat(name serde.Format, f serde.FormatEngine)
RegisterMessageFormat registers the format for the given format name.
Types ¶
type Actor ¶
type Actor interface { // Sign collects the signature of the collective authority and creates an // aggregated signature. Sign(ctx context.Context, msg serde.Message, ca crypto.CollectiveAuthority) (crypto.Signature, error) }
Actor provides a primitive to sign a message.
type CollectiveSigning ¶
type CollectiveSigning interface { // GetSigner returns the individual signer assigned to the instance. One // should not use it to verify a collective signature but only for identity // verification. GetSigner() crypto.Signer // GetPublicKeyFactory returns the aggregate public key factory. GetPublicKeyFactory() crypto.PublicKeyFactory // GetSignatureFactory returns the aggregate signature factory. GetSignatureFactory() crypto.SignatureFactory // GetVerifierFactory returns a factory that can create a verifier to check // the validity of a signature. GetVerifierFactory() crypto.VerifierFactory // SetThreshold updates the threshold required by a collective signature. SetThreshold(Threshold) // Listen starts the collective signing so that it will answer to requests. Listen(Reactor) (Actor, error) }
CollectiveSigning is the interface that provides the primitives to sign a message by members of a network.
type MessageFactory ¶
type MessageFactory struct {
// contains filtered or unexported fields
}
MessageFactory is the message factory for the flat collective signing RPC.
- implements serde.Factory
func NewMessageFactory ¶
func NewMessageFactory(msg serde.Factory, sig crypto.SignatureFactory) MessageFactory
NewMessageFactory returns a new message factory that uses the message and signature factories.
func (MessageFactory) Deserialize ¶
Deserialize implements serde.Factory.
type MsgKey ¶
type MsgKey struct{}
MsgKey is the key of the message factory.
type Reactor ¶
type Reactor interface { serde.Factory // Invoke is provided with the message and the address of the sender and it // should return the unique hash for this message, or an error for malformed // messages. Invoke(addr mino.Address, in serde.Message) ([]byte, error) }
Reactor is a collective signature event handler. Every participant must react to an incoming signature request from the leader, and this abstraction provides the primitive that allows to do so.
type SigKey ¶
type SigKey struct{}
SigKey is the key of the signature factory.
type SignatureRequest ¶
SignatureRequest is the message sent to require a signature from the other participants.
- implements serde.Message
func (SignatureRequest) Serialize ¶
func (req SignatureRequest) Serialize(ctx serde.Context) ([]byte, error)
Serialize implements serde.Message. It looks up the format and returns the serialized data if appropriate, otherwise an error.
type SignatureResponse ¶
SignatureResponse is the message sent by the participants.
- implements serde.Message
func (SignatureResponse) Serialize ¶
func (resp SignatureResponse) Serialize(ctx serde.Context) ([]byte, error)
Serialize implements serde.Message. It looks up the format and returns the serialized data if appropriate, otherwise an error.
type Threshold ¶
Threshold is a function that returns the threshold to reach for a given n, which means it is always positive and below or equal to n.
Source Files ¶
cosi.go messages.go
Directories ¶
Path | Synopsis |
---|---|
cosi/flatcosi | Package flatcosi is a flat implementation of a collective signing so that the orchestrator will contact all the participants to require their signatures and then aggregate them to the final one. |
cosi/json | |
cosi/threshold | Package threshold is a stream-based implementation of a collective signing so that the orchestrator contacts only a subset of the participants. |
cosi/threshold/json | |
cosi/threshold/types | Package types implements the threshold collective signature and its verifier. |
- Version
- v0.1.0 (latest)
- Published
- Apr 10, 2024
- Platform
- linux/amd64
- Imports
- 6 packages
- Last checked
- 1 month ago –
Tools for package owners.