SilentShard
SilentShard - Main entry point for two-party MPC (Multi-Party Computation) operations.
SilentShard provides secure threshold signature scheme implementations for ECDSA and EdDSA. It enables distributed key generation, signing, and key management between two 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 (example: Android Keystore)
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 DuoSession for ECDSA
val session = SilentShard.ECDSA.createDuoSession(
messageSigner = MySecureKeyProvider(),
cloudVerifyingKey = "peer_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()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!
Core Operations
All MPC operations are performed through DuoSession:
keygen() - Generate a new distributed key share
signature() - Sign messages with distributed key
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
verifyBackup() - Verify integrity of exported backups
See also
for detailed operation documentation
Inheritors
Types
Functions
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.