Distributed Key Generation
Last updated
Last updated
Users authenticate using an EOA wallet during key generation and register an ephemeral signing key pair and associates it with their identity.
The frontend can now use the ephemeral signing key pair to authorize signing requests for duration of the session without the need for repeated user interaction, providing a seamless and secure authentication mechanism.
We use to authenticate the user during keygen. The EOAAuth
object is created with the user's wallet address, ephemeral public key, and lifetime of the key in seconds.
We then use to authenticate the user during signing. The EphAuth
object is created with the user's wallet address and ephemeral keypair.
The full working example is in the . The core object to use is the .
It allows the generation of keys and signatures. To create, you need two other components. The connects to the Backend part of the SDK, and the authentication module. Currently, we provide EOA authentication via .
Let's create the NetworkSigner
The esk
key can be later used by the frontend in subsequent signgen requests as the authentication method
Now you can generate a key, using the method. The method accepts optional permissions. No permissions means allow all operations.
More details about Permissions in the .
Calling this method will cause to the Browser Wallet window to pop up, requesting the User to sign the request. After execution, is returned.
The contains keyId
and publicKey
. The publicKey
is the public part of the key generated by Silent Network. Use the keyId
in subsequent calls to sign.