mycelium-com / wallet-android

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

Without a pin set, account backup is far better protected than account private key export #330

Open fortran77 opened 7 years ago

fortran77 commented 7 years ago

(original submission below the line)

Until a PIN is set, the very visible option "Accounts-tab -> Account 1 -> Create Backup" is answered with the obligation to set a PIN and delays, while the account's xpriv can easily be extracted using "Accounts-tab -> Account 1 -> Export"

While the former would cover all accounts and the latter only the selected account, this is quite a surprising difference in degrees of protection and should be treated equally. Most likely most users use just one account anyway.


Sequence 1. One can go to

    Accounts => (select account) => Create Backup

then back up the seed words by reading them (after various delays, a few seconds or a day, depending on the state of the wallet). Presumably these delays prevent somebody from borrowing the device and copying the seeds words.

Sequence 2. One one can go to

    Accounts => (select account) =>  => Export => (various prompts)

and quickly, without significant delays, get a nice QR code of the xpriv key for the main account, which can be scanned in two seconds with another device. And this single xpriv key will allow access to the entire wallet, because that's how deterministic wallets work.

Since the knowledgeable thief will use Sequence 2, it seems to me that all the delays in Sequence 1 mostly serve to inconvenience the wallet owner.

(And if additional accounts have been created in hierarchical deterministic style, presumably they too can be derived from the same exported xpriv key? I am not sure about this.)

It would be better to have similar delays in both Sequences, so that the wallet owner is inconvenienced no more than the thief is.

Currently using Mycelium 2.8.6 on various Android devices.

vnnkl commented 7 years ago

Hi,

You are right, if you have a PIN set though, it will ask in both cases for the PIN before continuing, which is highly recommended if you plan on giving your device out of your hands.

Sequence 2: the xPriv is limited to the accounts addresses you are exporting, so it does not affect additional accounts.

Giszmo commented 7 years ago

Well, I guess @fortran77 found an undeniable inconsistency there. Thanks for reporting.