Recovery

We'll present an overview of the recovery mechanisms available for Zerowallet

We store the wallet in the localStorage of a browser. The recovery use-case is when a user logs in from another machine and wants to have the same account they had previously, or when the localStorage is cleared for some reason.

There are mainly two steps for recovery:

  1. Setup phase: carried out when the user is logged in and authenticated. This stage entails altering the state of the zero wallet to be recoverable. Recovery can be applied only if this phase was performed.

  2. Initiate phase: done when the user wants to log in. If a user needs to log into a zero wallet, he/she must have already setup the recovery (previous step) on that wallet.

All recovery mechanism support multiple accounts.

For now, we only support Google Drive recovery (we will launch Metamask recovery soon).

Google Drive Recovery

  1. Setup phase: the private key of the zero-wallet is exported to the user's Google Drive under the user’s control. A new folder is created on Google Drive and files of zero wallets' private keys are stored under that folder.

  2. Initiate phase: we will try to detect the user’s private key stored on Google Drive. Then we will import this private key to create the corresponding zero wallet.

NOTE: The private keys of the zero wallets will not at any point be stored anywhere other than the user's Google Drive.

Metamask Recovery

Let’s assume a user now has a randomly generated authenticated wallet (call it OLD_WALLET) associated with some SCW.

  1. Setup phase: The user is asked to sign a message from Metamask. The signed message is then used to create a new random wallet (call it NEW_WALLET). Then we change the owner of the SCW from OLD_WALLET to NEW_WALLET.

  2. Initiate phase: Similar steps to the setup. The user is asked to sign a message from Metamask. The signed message is then used to create a new random wallet. This wallet should be a valid zero wallet which is (if setup was already carried out) associated with the same SCW.

Last updated