-
Notifications
You must be signed in to change notification settings - Fork 13
Description
Executive Summary
This proposal suggests implementing cryptographic authentication for MPC result events as a security improvement to strengthen the overall authentication model in the mpcium system. While the current system has robust input authentication, adding result authentication would provide end-to-end verification and improve the security posture.
Current State Analysis
The mpcium system currently has strong authentication for input messages but lacks authentication for result events:
Input Authentication (Well-Protected): All incoming MPC requests use the InitiatorMessage interface with Ed25519 signature verification client.go:224-241 .
Output Events (Improvement Opportunity): Result events are published without cryptographic signatures:
Key generation results are composed and published directly event_consumer.go:218-237
Signing results follow the same pattern `sign.go:11-25
Security Enhancement Opportunity
While not a critical vulnerability, adding result authentication would provide:
- Enhanced Integrity: Cryptographic proof that results originated from legitimate nodes
- Improved Traceability: Clear attribution of results to specific nodes
- Defense in Depth: Additional security layer complementing existing protections
- Consistency: Uniform authentication model across all message types
Proposed implementation
type KeygenResultEvent struct {
WalletID string `json:"wallet_id"`
ECDSAPubKey []byte `json:"ecdsa_pub_key"`
EDDSAPubKey []byte `json:"eddsa_pub_key"`
ResultType ResultType `json:"result_type"`
ErrorReason string `json:"error_reason"`
ErrorCode string `json:"error_code"`
NodeID string `json:"node_id"` // Unique ID of the node (e.g., pubkey hash)
Signature []byte `json:"signature"` // Signature over canonical serialized event
SignatureAlgo string `json:"signature_algo"` // e.g., "ed25519"
}
Potential Timestamp + Expiry Check (Optional) to avoid replay protection
Timestamp int64 `json:"timestamp"` // Unix epoch seconds
Metadata
Metadata
Assignees
Labels
Type
Projects
Status