mirror of
https://github.com/hanzoai/mpc.git
synced 2026-10-30 19:45:28 +00:00
This commit adds complete multi-party computation (MPC) threshold signing for multiple cryptographic protocols: CGGMP21 (ECDSA/secp256k1): - Key generation for Bitcoin/Ethereum/EVM chains - Threshold signing with t-of-n security - Recovery byte calculation for Ethereum compatibility FROST/Taproot (EdDSA/BIP-340): - EdDSA key generation for Solana/Sui/Polkadot - BIP-340 compatible Schnorr signatures (64 bytes) - CBOR serialization for TaprootConfig crypto types LSS (Linear Secret Sharing): - Dynamic resharing support (change participants) - ECDSA signing with blinding protocol - Protocol adapter for unified interface Key fixes: - Use MarshalBinary/UnmarshalBinary for protocol messages - CBOR serialization for FROST TaprootConfig (not JSON) - Correct type assertion for taproot.Signature ([]byte) - Sorted party IDs for deterministic ordering E2E tests pass for both ECDSA and EdDSA signing.
19 lines
470 B
Go
19 lines
470 B
Go
package kvstore
|
|
|
|
// KVStore defines the interface for a key-value store.
|
|
type KVStore interface {
|
|
// Put stores a key-value pair in the store.
|
|
Put(key string, value []byte) error
|
|
|
|
// Get retrieves the value associated with a key. If the key is not found, it returns an empty slice.
|
|
Get(key string) ([]byte, error)
|
|
|
|
// Delete removes a key-value pair from the store.
|
|
Delete(key string) error
|
|
|
|
// Close closes the key-value store.
|
|
Close() error
|
|
|
|
Backup() error
|
|
}
|