SilentShard
SilentShard - Main entry point for three-party MPC (Multi-Party Computation) operations.
SilentShard provides secure threshold signature scheme implementations for ECDSA and EdDSA with three-party computation. Enables distributed key generation, signing, pre-signing, and recovery between three parties without ever reconstructing the complete private key.
Available Implementations
SilentShard.ECDSA - For ECDSA (secp256k1) signatures, commonly used in Bitcoin, Ethereum
SilentShard.EdDSA - For EdDSA (Ed25519) signatures, used in Solana, Stellar, etc.
Quick Start Example
// 1. Implement your secure key provider
class MySecureKeyProvider : MessageSigner {
override val verifyingKey: ByteArray
get() = loadPublicKeyFromSecureStorage()
override val masterSigningKeyType = MasterSigningKeyType.ECDSA
override fun sign(data: ByteArray): ByteArray {
return signWithSecureHardware(data) // e.g., Android Keystore, iOS Secure Enclave
}
}
// 2. Create a TrioSession for ECDSA
val session = SilentShard.ECDSA.createTrioSession(
messageSigner = MySecureKeyProvider(),
cloudVerifyingKey = "server_verifying_key_hex",
websocketConfig = WebsocketConfig(url = "wss://your-server.com/mpc"),
storageClient = yourStorageImplementation
)
// 3. Generate a distributed key
val keyshareResult = session.keygen()
val keyshare = keyshareResult.getOrThrow()
// 4. Get the public key
val publicKey = SilentShard.ECDSA.getKeysharePublicKey(keyshare).getOrThrow()
// 5. Sign a message
val signature = session.signature(
keyshare = keyshare,
message = "transaction_hash_hex",
derivationPath = "m/44'/60'/0'/0/0"
).getOrThrow()Three-Party vs Two-Party
Trio (3-party) provides additional features over Duo (2-party):
Pre-signatures: Generate signatures in advance, faster signing when needed
Recovery: Recover lost keyshares using the other two parties
Enhanced Security: No single point of failure, requires 2-of-3 parties
Core Operations
All MPC operations are performed through TrioSession:
keygen() - Generate a new distributed key share (3-party)
signature() - Sign messages with distributed key
preSignature() - Generate pre-signature for faster signing later
preSignatureFinal() - Finalize pre-signature with actual message
keyRefresh() - Refresh existing key shares for enhanced security
reconcileKeyshare() - Synchronize key shares between parties
import() - Import existing private keys into distributed format
export() - Export key shares for backup
recovery() - Recover lost keyshare using other two parties
Master Key Provider Implementation
You must provide your own secure implementation of MessageSigner. See MessageSigner documentation for platform-specific examples:
Android: Keystore with biometric authentication
iOS: Secure Enclave integration
Hardware Wallets: Ledger, Trezor integration
Cloud: AWS KMS, Google Cloud KMS
Desktop: OS Keychain integration
Note: For testing purposes only, you can use the internal test provider. Never use test providers in production!
See also
for detailed operation documentation
for secure key provider implementation
Inheritors
Types
Functions
Creates a TrioSession using the default SilentShard websocket implementation.
Creates a TrioSession with custom network client and action provider.
Derives a child public key using BIP32 hierarchical deterministic derivation.
Generates a keypair for encrypting/decrypting keyshare backups.
Retrieves the unique identifier for a keyshare.
Extracts the public key from a keyshare.