Zero-Trust dWallet
A Zero-Trust dWallet is a dWallet that operates under a zero-trust security model, created using a two-party computation (2PC) protocol.
Need automated signing?
If you're building DAOs, smart contracts, or automated systems that need network-controlled signing, consider using a Shared dWallet instead.
Architecture
The dWallet consists of two cryptographic shares:
- User Share: An encrypted share that is controlled by the user
- Network Share: A share held by the Ika network
Both shares are required to create a valid signature, ensuring that neither party can unilaterally access the wallet.
Signing Process
To generate a signature, the user must:
- Decrypt their user share using their decryption key to obtain the raw secret share
- Use this secret share to generate a commitment message
- Combine it with the network share to produce the final signature
This design ensures that the private key never exists in its complete form in any single location, maintaining the zero-trust security guarantee.
Creating a Zero-Trust dWallet
Creating a Zero-Trust dWallet involves the following steps:
- Register an encryption key with the network
- Execute a Distributed Key Generation (DKG) protocol to create the dWallet
You can register an encryption key during the DKG process (thanks to PTBs) or beforehand.
Basic DKG Creation
DKG Creation with Immediate Signing
This example shows how to create a dWallet and sign a message in a single transaction during the DKG process.
Activating Your dWallet
After creating a zero-trust dWallet through the DKG process, you must accept your encrypted user share to activate it. You can call acceptEncryptedUserShare to accept the encrypted user share and activate the dWallet. This can be done before signing a message (in the same PTB) or after creating your dWallet.
Signing a Message
You can sign a message using a zero-trust dWallet by calling requestSign and passing the message and the dWallet.
Future Signing
Future signing is a two-step process that allows you to separate the user's signature creation from the network's signature completion.
Creating a Partial User Signature
To initiate a future sign, call requestFutureSign with the message and the dWallet. This function returns an unverified partial user signature cap, which can later be used to complete the signing process by having the network add its signature.
Completing the Signature
To finalize a future sign, call futureSign with the partial user signature cap and the message approval. This combines the user's partial signature with the network's signature to create the complete signature.
Transferring a dWallet Share
You can transfer your dWallet's encrypted user share to another user by calling requestReEncryptUserShareFor. This allows the recipient to sign with your dWallet while maintaining zero-trust security through re-encryption. Your secret share is re-encrypted using the recipient's encryption key, ensuring only they can decrypt it after transfer. You retain access to your original share.
Important: The dWallet cap is still required for message approvals. While the transferred encrypted share provides the recipient with the cryptographic material needed for signing, they cannot complete the signing process (specifically message approval) without also having access to the dWallet cap. You can choose to transfer the dWallet cap separately to grant the recipient full signing capability.
The recipient must have registered their encryption key before you can transfer the share to them.
Transfer Using Encrypted Share
Transfer Using Pre-Decrypted Share
If you have already decrypted your secret share, you can pass it directly to optimize the process:
Receiving a dWallet Share
You can accept a dWallet user share that has been transferred to you by calling acceptEncryptedUserShare. This process grants you signing access to another user's dWallet while maintaining zero-trust security. The transferred share is encrypted specifically for your encryption key, ensuring only you can decrypt and use it. The original owner retains access to their share.
Important: To complete the signing process, you will also need the dWallet cap for message approvals. The encrypted share alone provides the cryptographic material, but message approval requires the dWallet cap. The sender should transfer the dWallet cap to you separately if they want to grant you full signing capability.
Before accepting a transferred share, you must register your encryption key with the network. The sender will provide you with the dWallet object ID and the transferred encrypted share ID.
Converting to a Shared dWallet
You can convert a zero-trust dWallet to a shared dWallet by calling makeDWalletUserSecretKeySharesPublic and passing the dWallet.
Warning: This operation fundamentally changes the trust model of the dWallet. By making the user secret share public, you are sharing the secret with the network, which means you must now trust the network rather than relying on the zero-trust 2PC model. This conversion is irreversible.