Documentation
¶
Overview ¶
Package lss implements the LSS MPC ECDSA protocol.
Based on the paper: "LSS MPC ECDSA: A Pragmatic Framework for Dynamic and Resilient Threshold Signatures" by Vishnu J. Seesahai
This implementation provides: - Dynamic resharing without reconstructing the master key - Resilient threshold signatures with fault tolerance - Support for adding/removing parties without downtime - Rollback capability for failed signing attempts
Package lss provides dynamic resharing extensions for CMP and FROST protocols.
Package lss provides dynamic resharing extensions for FROST protocols.
Index ¶
- func ConvertFromLSSConfig(lssConfig *Config) *keygen.Config
- func DynamicReshareCMP(oldConfigs map[party.ID]*config.Config, newPartyIDs []party.ID, ...) (map[party.ID]*config.Config, error)
- func DynamicReshareFROST(oldConfigs map[party.ID]*keygen.Config, newPartyIDs []party.ID, ...) (map[party.ID]*keygen.Config, error)
- func EmptyConfig(group curve.Curve) *config.Config
- func EvictAndRollback(cfg *config.Config, evictedParties []party.ID) (*config.Config, error)
- func IsCompatibleForSigning(c1, c2 *config.Config) bool
- func Keygen(group curve.Curve, selfID party.ID, participants []party.ID, threshold int, ...) protocol.StartFunc
- func Refresh(c *config.Config, pl *pool.Pool) protocol.StartFunc
- func Reshare(c *config.Config, newParticipants []party.ID, newThreshold int, pl *pool.Pool) protocol.StartFunc
- func Rollback(cfg *config.Config, targetGeneration uint64) (*config.Config, error)
- func RollbackOnFailure(cfg *config.Config, failureThreshold int) (*config.Config, error)
- func RunKeygen(t *testing.T, group curve.Curve, partyIDs []party.ID, threshold int) map[party.ID]*config.Config
- func RunProtocols(t *testing.T, protocols map[party.ID]protocol.StartFunc, sessionID []byte) (map[party.ID]interface{}, error)
- func RunReshare(t *testing.T, oldConfigs map[party.ID]*config.Config, newPartyIDs []party.ID, ...) map[party.ID]*config.Config
- func RunSign(t *testing.T, configs map[party.ID]*config.Config, signers []party.ID, ...) *ecdsa.Signature
- func Sign(c *config.Config, signers []party.ID, messageHash []byte, pl *pool.Pool) protocol.StartFunc
- func SignWithBlinding(c *config.Config, signers []party.ID, messageHash []byte, ...) protocol.StartFunc
- func VerifyConfig(c *config.Config) error
- func VerifySignature(sig *ecdsa.Signature, publicKey curve.Point, messageHash []byte) bool
- type BlindingProtocol
- type CMP
- type Config
- type FROST
- type FROSTConfig
- type GenerationSnapshot
- type ReshareMessage
- type ReshareMessageType
- type RollbackManager
- func (rm *RollbackManager) ClearHistory()
- func (rm *RollbackManager) EvictParties(cfg *config.Config, evictedParties []party.ID) (*config.Config, error)
- func (rm *RollbackManager) GetHistory() []*GenerationSnapshot
- func (rm *RollbackManager) Rollback(targetGeneration uint64) (*config.Config, error)
- func (rm *RollbackManager) RollbackOnFailure(failureThreshold int) (*config.Config, error)
- func (rm *RollbackManager) SaveSnapshot(cfg *config.Config) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertFromLSSConfig ¶
ConvertFromLSSConfig converts an LSS config to FROST config format
func DynamicReshareCMP ¶
func DynamicReshareCMP( oldConfigs map[party.ID]*config.Config, newPartyIDs []party.ID, newThreshold int, _ *pool.Pool, ) (map[party.ID]*config.Config, error)
DynamicReshare performs the LSS dynamic resharing protocol on CMP configurations. This implements the protocol from Section 4 of the LSS paper, allowing transition from T-of-N to T'-of-(N±k) without reconstructing the master key.
func DynamicReshareFROST ¶
func DynamicReshareFROST( oldConfigs map[party.ID]*keygen.Config, newPartyIDs []party.ID, newThreshold int, _ *pool.Pool, ) (map[party.ID]*keygen.Config, error)
DynamicReshareFROST performs the LSS dynamic resharing protocol on FROST configurations. This implements the protocol from Section 4 of the LSS paper, allowing transition from T-of-N to T'-of-(N±k) without reconstructing the master key.
func EmptyConfig ¶
EmptyConfig creates an empty Config with a fixed group, ready for unmarshalling.
func EvictAndRollback ¶
EvictAndRollback evicts problematic parties and rolls back if needed
func IsCompatibleForSigning ¶
IsCompatibleForSigning checks if two configs can sign together.
func Keygen ¶
func Keygen(group curve.Curve, selfID party.ID, participants []party.ID, threshold int, pl *pool.Pool) protocol.StartFunc
Keygen generates a new shared ECDSA key with LSS protocol.
func Reshare ¶
func Reshare(c *config.Config, newParticipants []party.ID, newThreshold int, pl *pool.Pool) protocol.StartFunc
Reshare performs dynamic resharing to change the participant set.
func RollbackOnFailure ¶
RollbackOnFailure triggers automatic rollback after repeated failures
func RunKeygen ¶
func RunKeygen(t *testing.T, group curve.Curve, partyIDs []party.ID, threshold int) map[party.ID]*config.Config
RunKeygen runs a complete keygen protocol for testing
func RunProtocols ¶
func RunProtocols(t *testing.T, protocols map[party.ID]protocol.StartFunc, sessionID []byte) (map[party.ID]interface{}, error)
RunProtocols executes protocol instances and collects results
func RunReshare ¶
func RunReshare(t *testing.T, oldConfigs map[party.ID]*config.Config, newPartyIDs []party.ID, newThreshold int) map[party.ID]*config.Config
RunReshare performs a resharing operation for testing
func RunSign ¶
func RunSign(t *testing.T, configs map[party.ID]*config.Config, signers []party.ID, messageHash []byte) *ecdsa.Signature
RunSign executes a signing protocol for testing
func Sign ¶
func Sign(c *config.Config, signers []party.ID, messageHash []byte, pl *pool.Pool) protocol.StartFunc
Sign generates an ECDSA signature using the LSS protocol.
func SignWithBlinding ¶
func SignWithBlinding(c *config.Config, signers []party.ID, messageHash []byte, protocol BlindingProtocol, pl *pool.Pool) protocol.StartFunc
SignWithBlinding performs threshold signing with multiplicative blinding This provides enhanced privacy by hiding individual shares during signing
func VerifyConfig ¶
VerifyConfig validates that a Config is well-formed.
Types ¶
type BlindingProtocol ¶
type BlindingProtocol int
BlindingProtocol represents the blinding protocol version
const ( // BlindingProtocolI is the basic multiplicative blinding BlindingProtocolI BlindingProtocol = iota // BlindingProtocolII is enhanced blinding with additional security BlindingProtocolII )
type CMP ¶
type CMP struct {
// contains filtered or unexported fields
}
CMP extends the CMP protocol with LSS dynamic resharing capabilities. This allows CMP to perform membership changes without reconstructing the master key.
func (*CMP) GetGeneration ¶
GetGeneration returns the current resharing generation number
func (*CMP) UpdateConfig ¶
UpdateConfig updates the configuration after a successful resharing
type Config ¶
Config represents the configuration for the LSS protocol. This is an alias to the config.Config type for backward compatibility.
type FROST ¶
type FROST struct {
// contains filtered or unexported fields
}
FROST extends the FROST protocol with LSS dynamic resharing capabilities. This allows FROST to perform membership changes without reconstructing the master key.
func NewLSSFROST ¶
NewLSSFROST creates a new LSS-extended FROST instance
func (*FROST) GetConfig ¶
func (f *FROST) GetConfig() *FROSTConfig
GetConfig returns the current FROST configuration
func (*FROST) GetGeneration ¶
GetGeneration returns the current resharing generation number
func (*FROST) Refresh ¶
func (f *FROST) Refresh() (*FROSTConfig, error)
Refresh performs a proactive refresh of shares without changing membership
func (*FROST) UpdateConfig ¶
func (f *FROST) UpdateConfig(newConfig *FROSTConfig)
UpdateConfig updates the configuration after a successful resharing
type FROSTConfig ¶
FROSTConfig wraps the FROST keygen config for LSS compatibility
type GenerationSnapshot ¶
type GenerationSnapshot struct {
Generation uint64
Config *config.Config
PartyIDs []party.ID
Threshold int
Timestamp int64
FailureCount int
}
GenerationSnapshot represents a point-in-time configuration state
type ReshareMessage ¶
type ReshareMessage struct {
}
ReshareMessage represents a message in the reshare protocol
type ReshareMessageType ¶
type ReshareMessageType int
ReshareMessageType represents the type of reshare message.
const ( ReshareTypeJVSSCommitment ReshareMessageType = iota ReshareTypeBlindedShare ReshareTypeBlindedProduct ReshareTypeVerification )
type RollbackManager ¶
type RollbackManager struct {
// contains filtered or unexported fields
}
RollbackManager manages configuration history and rollback operations
func NewRollbackManager ¶
func NewRollbackManager(maxGenerations int) *RollbackManager
NewRollbackManager creates a new rollback manager
func (*RollbackManager) ClearHistory ¶
func (rm *RollbackManager) ClearHistory()
ClearHistory removes all stored snapshots
func (*RollbackManager) EvictParties ¶
func (rm *RollbackManager) EvictParties(cfg *config.Config, evictedParties []party.ID) (*config.Config, error)
EvictParties removes specified parties from the current configuration
func (*RollbackManager) GetHistory ¶
func (rm *RollbackManager) GetHistory() []*GenerationSnapshot
GetHistory returns the configuration history
func (*RollbackManager) Rollback ¶
func (rm *RollbackManager) Rollback(targetGeneration uint64) (*config.Config, error)
Rollback reverts to a previous generation
func (*RollbackManager) RollbackOnFailure ¶
func (rm *RollbackManager) RollbackOnFailure(failureThreshold int) (*config.Config, error)
RollbackOnFailure automatically rolls back if failure count exceeds threshold
func (*RollbackManager) SaveSnapshot ¶
func (rm *RollbackManager) SaveSnapshot(cfg *config.Config) error
SaveSnapshot saves a configuration snapshot for potential rollback
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package config implements the LSS configuration and storage
|
Package config implements the LSS configuration and storage |
|
Package keygen implements the LSS key generation protocol.
|
Package keygen implements the LSS key generation protocol. |
|
Package reshare implements the LSS dynamic resharing protocol.
|
Package reshare implements the LSS dynamic resharing protocol. |
|
Package sign implements the LSS signing protocol.
|
Package sign implements the LSS signing protocol. |