Documentation
¶
Overview ¶
Package adapters provides protocol adapters for unified threshold signature interface.
Index ¶
- type CMPConfigAdapter
- func (c *CMPConfigAdapter) GetChainKey() []byte
- func (c *CMPConfigAdapter) GetGroup() curve.Curve
- func (c *CMPConfigAdapter) GetID() party.ID
- func (c *CMPConfigAdapter) GetPrivateShare() curve.Scalar
- func (c *CMPConfigAdapter) GetPublicKey() (curve.Point, error)
- func (c *CMPConfigAdapter) GetPublicShare(id party.ID) (curve.Point, error)
- func (c *CMPConfigAdapter) GetRID() []byte
- func (c *CMPConfigAdapter) GetThreshold() int
- func (c *CMPConfigAdapter) IsCompatible(other protocol.ThresholdConfig) bool
- func (c *CMPConfigAdapter) Validate() error
- type CMPProtocolAdapter
- func (p *CMPProtocolAdapter) GetScheme() protocol.SignatureScheme
- func (p *CMPProtocolAdapter) Keygen(group curve.Curve, selfID party.ID, participants []party.ID, threshold int) (protocol.StartFunc, error)
- func (p *CMPProtocolAdapter) Refresh(config protocol.ThresholdConfig) (protocol.StartFunc, error)
- func (p *CMPProtocolAdapter) Sign(config protocol.ThresholdConfig, signers []party.ID, message []byte) (protocol.StartFunc, error)
- func (p *CMPProtocolAdapter) SupportsResharing() bool
- type FROSTConfigAdapter
- func (f *FROSTConfigAdapter) GetChainKey() []byte
- func (f *FROSTConfigAdapter) GetGroup() curve.Curve
- func (f *FROSTConfigAdapter) GetID() party.ID
- func (f *FROSTConfigAdapter) GetPrivateShare() curve.Scalar
- func (f *FROSTConfigAdapter) GetPublicKey() (curve.Point, error)
- func (f *FROSTConfigAdapter) GetPublicShare(id party.ID) (curve.Point, error)
- func (f *FROSTConfigAdapter) GetRID() []byte
- func (f *FROSTConfigAdapter) GetThreshold() int
- func (f *FROSTConfigAdapter) IsCompatible(other protocol.ThresholdConfig) bool
- func (f *FROSTConfigAdapter) Validate() error
- type FROSTProtocolAdapter
- func (p *FROSTProtocolAdapter) GetScheme() protocol.SignatureScheme
- func (p *FROSTProtocolAdapter) Keygen(group curve.Curve, selfID party.ID, participants []party.ID, threshold int) (protocol.StartFunc, error)
- func (p *FROSTProtocolAdapter) Refresh(config protocol.ThresholdConfig) (protocol.StartFunc, error)
- func (p *FROSTProtocolAdapter) Sign(config protocol.ThresholdConfig, signers []party.ID, message []byte) (protocol.StartFunc, error)
- func (p *FROSTProtocolAdapter) SupportsResharing() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CMPConfigAdapter ¶
CMPConfigAdapter wraps a CMP config to implement ThresholdConfig
func NewCMPAdapter ¶
func NewCMPAdapter(config *cmpconfig.Config) *CMPConfigAdapter
NewCMPAdapter creates a new CMP config adapter
func (*CMPConfigAdapter) GetChainKey ¶
func (c *CMPConfigAdapter) GetChainKey() []byte
GetChainKey returns the chain key
func (*CMPConfigAdapter) GetGroup ¶
func (c *CMPConfigAdapter) GetGroup() curve.Curve
GetGroup returns the elliptic curve group
func (*CMPConfigAdapter) GetID ¶
func (c *CMPConfigAdapter) GetID() party.ID
GetID returns the party ID
func (*CMPConfigAdapter) GetPrivateShare ¶
func (c *CMPConfigAdapter) GetPrivateShare() curve.Scalar
GetPrivateShare returns the private key share
func (*CMPConfigAdapter) GetPublicKey ¶
func (c *CMPConfigAdapter) GetPublicKey() (curve.Point, error)
GetPublicKey returns the combined public key
func (*CMPConfigAdapter) GetPublicShare ¶
GetPublicShare returns a party's public share
func (*CMPConfigAdapter) GetThreshold ¶
func (c *CMPConfigAdapter) GetThreshold() int
GetThreshold returns the threshold value
func (*CMPConfigAdapter) IsCompatible ¶
func (c *CMPConfigAdapter) IsCompatible(other protocol.ThresholdConfig) bool
IsCompatible checks if two configs can work together
func (*CMPConfigAdapter) Validate ¶
func (c *CMPConfigAdapter) Validate() error
Validate validates the configuration
type CMPProtocolAdapter ¶
type CMPProtocolAdapter struct {
// contains filtered or unexported fields
}
CMPProtocolAdapter implements ThresholdProtocol for CMP
func NewCMPProtocol ¶
func NewCMPProtocol(pl *pool.Pool) *CMPProtocolAdapter
NewCMPProtocol creates a new CMP protocol adapter
func (*CMPProtocolAdapter) GetScheme ¶
func (p *CMPProtocolAdapter) GetScheme() protocol.SignatureScheme
GetScheme returns ECDSA for CMP
func (*CMPProtocolAdapter) Keygen ¶
func (p *CMPProtocolAdapter) Keygen(group curve.Curve, selfID party.ID, participants []party.ID, threshold int) (protocol.StartFunc, error)
Keygen initiates CMP key generation
func (*CMPProtocolAdapter) Refresh ¶
func (p *CMPProtocolAdapter) Refresh(config protocol.ThresholdConfig) (protocol.StartFunc, error)
Refresh initiates CMP refresh
func (*CMPProtocolAdapter) Sign ¶
func (p *CMPProtocolAdapter) Sign(config protocol.ThresholdConfig, signers []party.ID, message []byte) (protocol.StartFunc, error)
Sign initiates CMP signing
func (*CMPProtocolAdapter) SupportsResharing ¶
func (p *CMPProtocolAdapter) SupportsResharing() bool
SupportsResharing returns false for CMP (native resharing not supported)
type FROSTConfigAdapter ¶
type FROSTConfigAdapter struct {
*frostconfig.Config
}
FROSTConfigAdapter wraps a FROST config to implement ThresholdConfig
func NewFROSTAdapter ¶
func NewFROSTAdapter(config *frostconfig.Config) *FROSTConfigAdapter
NewFROSTAdapter creates a new FROST config adapter
func (*FROSTConfigAdapter) GetChainKey ¶
func (f *FROSTConfigAdapter) GetChainKey() []byte
GetChainKey returns the chain key
func (*FROSTConfigAdapter) GetGroup ¶
func (f *FROSTConfigAdapter) GetGroup() curve.Curve
GetGroup returns the elliptic curve group
func (*FROSTConfigAdapter) GetID ¶
func (f *FROSTConfigAdapter) GetID() party.ID
GetID returns the party ID
func (*FROSTConfigAdapter) GetPrivateShare ¶
func (f *FROSTConfigAdapter) GetPrivateShare() curve.Scalar
GetPrivateShare returns the private key share
func (*FROSTConfigAdapter) GetPublicKey ¶
func (f *FROSTConfigAdapter) GetPublicKey() (curve.Point, error)
GetPublicKey returns the combined public key
func (*FROSTConfigAdapter) GetPublicShare ¶
GetPublicShare returns a party's public share (verification share in FROST)
func (*FROSTConfigAdapter) GetRID ¶
func (f *FROSTConfigAdapter) GetRID() []byte
GetRID returns empty for FROST (no RID concept)
func (*FROSTConfigAdapter) GetThreshold ¶
func (f *FROSTConfigAdapter) GetThreshold() int
GetThreshold returns the threshold value
func (*FROSTConfigAdapter) IsCompatible ¶
func (f *FROSTConfigAdapter) IsCompatible(other protocol.ThresholdConfig) bool
IsCompatible checks if two configs can work together
func (*FROSTConfigAdapter) Validate ¶
func (f *FROSTConfigAdapter) Validate() error
Validate validates the configuration
type FROSTProtocolAdapter ¶
type FROSTProtocolAdapter struct{}
FROSTProtocolAdapter implements ThresholdProtocol for FROST
func NewFROSTProtocol ¶
func NewFROSTProtocol() *FROSTProtocolAdapter
NewFROSTProtocol creates a new FROST protocol adapter
func (*FROSTProtocolAdapter) GetScheme ¶
func (p *FROSTProtocolAdapter) GetScheme() protocol.SignatureScheme
GetScheme returns Schnorr for FROST
func (*FROSTProtocolAdapter) Keygen ¶
func (p *FROSTProtocolAdapter) Keygen(group curve.Curve, selfID party.ID, participants []party.ID, threshold int) (protocol.StartFunc, error)
Keygen initiates FROST key generation
func (*FROSTProtocolAdapter) Refresh ¶
func (p *FROSTProtocolAdapter) Refresh(config protocol.ThresholdConfig) (protocol.StartFunc, error)
Refresh initiates FROST refresh
func (*FROSTProtocolAdapter) Sign ¶
func (p *FROSTProtocolAdapter) Sign(config protocol.ThresholdConfig, signers []party.ID, message []byte) (protocol.StartFunc, error)
Sign initiates FROST signing
func (*FROSTProtocolAdapter) SupportsResharing ¶
func (p *FROSTProtocolAdapter) SupportsResharing() bool
SupportsResharing returns false for FROST (native resharing not directly supported)