mycelium-com / wallet-android

Mycelium Bitcoin Wallet for Android
http://mycelium.com
Other
665 stars 322 forks source link

Encrypted backup of non-masterseed derived data #482

Open Giszmo opened 5 years ago

Giszmo commented 5 years ago

Currently, migrating from one phone to another with only the 12 word backup comes at a loss of metadata and absent of some extra work even at the loss of accounts. In line with BIP44, Mycelium does not explore accounts, so users are left to (re)create them on the new device and same goes with the accounts covered by the masterseed in extension to BIP44, namely the coinapult accounts. Lastly, on top of that meta data, there are unrelated accounts that are not covered by the 12 words backup. The current "solution" of BIP38 encrypted keys is cumbersome and users can lose these backups or do them wrongly too easily. They are required to create a pdf, print it, write a key on it and never lose it.

If we trust our cryptography, we should be able to do better. In order to have no security degradation I propose to use the same primitives as in BIP38 but with a symmetric key derived from the masterseed to store the necessary encrypted data at a place of the user's choice (just like the legacy backup pdf) or propose to store it on our servers or other services (google drive, dropbox, ...).

Things to store:

Workflow

Format

JSON

Backup

Restore

Further thoughts

Related issues

ali8889 commented 5 years ago

Goood