keygen

suspend fun keygen(roomUuid: RoomUUID, numParties: Int, threshold: Int, keygenInitKeypair: KeygenPrivateKey, keygenIds: Array<KeygenID>): Pair<EcdsaPublicKey, EcdsaSecretShare>

Generates ECDSA keys using multi-party computation.

This is the main key generation function that all parties must call to create a distributed key. Parties must first exchange their keygenIds securely before calling this function.

Return

KeyGen object containing the public key and secret share for the generated keypair

Parameters

roomUuid

The UUID of the keygen room

numParties

The number of parties that will join the keygen room (value in range 1..65535)

threshold

The threshold of the keypair to be generated (value in range 1..65535)

keygenInitKeypair

Contains the same keygenSecret that was used to generate the keygenId that was shared with other parties

keygenIds

The keygenId outputs from all other parties, received through a secure channel