Repository navigation
Backup: Feat - encrypted cloud backup and restore - #2527
Open
gabrielbazan7 wants to merge 1 commit into
Open
gabrielbazan7 wants to merge 1 commit into
gabrielbazan7 wants to merge 1 commit into
Conversation
gabrielbazan7
force-pushed
the
feat/cloud-backup-restore
branch
3 times, most recently
from
November 17, 2026 19:26
21d68ee to
6925660
Compare
gabrielbazan7
force-pushed
the
feat/cloud-backup-restore
branch
from
November 18, 2026 13:08
6925660 to
a5a318b
Compare
gabrielbazan7
marked this pull request as ready for review
November 18, 2026 13:09
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Encrypted backup of the recovery phrase to iCloud (iOS) and Google Drive (Android), and restore from it. TSS keyshares can also be saved to and restored from the cloud.
What the backup file stores
The file is JSON with a plain-text header and an encrypted payload.
What the file does not store:
xPrivKeyor any addresses;On restore, wallets are rediscovered from the wallet service, including multisig wallets the key is a copayer of.
Encryption
How it works
Backup (Key Settings → Back Up Recovery Phrase):
BitPay-Backup-<ms>-<16 hex>.json, in the folder "BitPay Backups":iCloud.com.bitpay.wallet, visible as "BitPay" in iCloud Drive;drive.filescope.Restore (Import → Restore from iCloud / Google Drive, or Import → File tab with a downloaded backup file):
Delete (Key Settings → Delete Key):
Keys with a recovery phrase password (BIP39 passphrase)
These keys can now be backed up, but the passphrase is not stored. The backup screen says so.
On restore, "Advanced Options" asks for it, with the same field and text as the manual import. The app checks it against the key fingerprint before importing. If it's missing or wrong, the restore stops and explains why.
TSS keyshares
encryptWithPassword, PBKDF2-SHA256, 600,000 iterations), asBitPay-Keyshare-<ms>-<16 hex>.json.startImportTSSFile). If the TSS key is already on the phone, it's opened instead. The key is identified by the id and fingerprint inside the decrypted keyshare, as the TSS import does, not by the file name.Password manager
The backup password fields are declared as new password / password, so the system password manager handles them, as in the design prototype:
The downside: the password ends up in the same account as the file. The BIP39 passphrase field keeps autofill off.
Each key has its own password and the form has no username field. How the password manager labels several saved passwords for the app hasn't been checked on a device yet.
Known limitations and decisions
isCommonWeakPasswordrejects any run of 4 consecutive letters or digits (abcd,4321), so a password suggested by the system could, rarely, be rejected.startImportMnemonicnow keepscloudBackupTimestampwhen it re-imports an existing key.