Using built-in support for iOS and Android, mobile apps can save data backups to Apple iCloud and Google Drive respectively. When a user installs the wallet onto a new device, possibly after losing their old device, or reinstalls the app on the same device, it can check the user's Drive or iCloud account for account backup data. If available, this data can be downloaded and used to initialize the application with the recovered account information.
Access to the user's cloud storage requires logging in to their Google or Apple account. This provides a measure of security, but is not enough to confidently store the Account Key. In order to provide additional security, the Account Key backup can be encrypted with a secret, namely a PIN or password, that the user has memorized or stored securely. In this way, the users account backup is only accessible to someone who can access their cloud storage account and knows their secret.
Because user-chosen secrets, especially PINs, are susceptible to guessing by an attacker this secret must be hardened before it can be used as an encryption key. We are working on an extension to ODIS to support domain-restricted rate limits through an application of a POPRF, which will allow for the use of ODIS as a password hardening service, effectively preventing guessing attacks as long as ODIS is secure.
With these key components, we can construct a cloud backup system that allows users who remember their Valora PIN, and maintain access to a cloud storage account, to quickly and reliably recover their accounts while providing solid security guarantees to users.
<aside> 💡 Note that this scheme is not intended as a full replacement of a written Account Key (mnemonic phrase) backup. Because the user must remember their PIN and maintain access to their cloud storage account, which may not be the case especially if they switch device OS, it is recommended that users still write down their mnemonic phrase backup.
</aside>
During onboarding on a supported device [1], after the PIN is set and the account key is created, the user is informed about cloud backup and given a chance opt-out of cloud backup for their account [2]. If they opt out, the rest of the setup will be skipped and they will not be using cloud backup.
On Android, when the user opts-in, they will be prompted to select a Google account that they would like to use to store the backup. On iOS, the user will not be prompted as there is a single Apple account on the device and the permissions architecture is different.
In the background, Valora will use the chosen PIN and a locally generated secret salt value to query ODIS. The resulting hardened key will be used to encrypt the account key mnemonic. The encrypted mnemonic and metadata, including the salt, will be stored in the user's cloud storage.
During recovery, the application will determine if a cloud backup is available. On iOS, this can be done automatically. On Android, the user may choose to restore from cloud backup, at which point they will be prompted to choose their Google account.