I keep getting the feeling you guys are ignoring the threat difference between putting a human memorable password generated key on the block chain and just protecting a STONG machine generated secret key with a human memorable password so it can be stored in your pocket, on your phone, or in your dropbox folder.
"A key on the block chain shall never be sourced from a human memorable password" is a good rule, I agree.
"A STRONG secret key on paper in your pocked shall never be protected by a human memorable password" is not a good rule. It is way-overkill against the threats your piece of paper or your personal dropbox folder is subject to.
I agree. However,
We don't necessarily know the strength of the private key. The user can import arbitrary private keys.
We don't know how secure the user's email/dropbox/printer-app is (or whatever app user chooses to share the encrypted backup with).
Therefore we want a mechanism where we can reason about the strength of the password and give reasonable protection against brute force attacks.
BIP38 is a perfectly reasonable tool to protect STRONG keys that are in your possession. You can even use it with 70 bit strength passwords you generate using Diceware that you endeavor to memorize.
Correct. But there are two problems, which make BIP38 cumbersome to use for our purpose.
1. With BIP38 you have to do the scrypt stretching for every key, as the input depends of the checksum of the bitcoin address of the private key you wish to encrypt. So when exporting 10 keys you have to do 10 VERY heavy scrypt operations
2. The scrypt parameters for BIP38 are hardcoded and unfeasible to use on an many android devices. The paper mentions that they are subject to consensus, but the ones who have BIP38 support have just gone ahead and used them as they are. So once can argue that consensus is there. The problem however is that they were chosen so they take 1-2 seconds on standard computer (cannot remember the reference to that, but it is in one of the many threads on the forum). Which is a strange way of setting security parameters. On one of my android devices BIP38 takes 6 minutes and 28 seconds to execute. If you couple that with the above and want to export just 10 keys, it will take more than an hour.
Instead we use a mechanism that resembles BIP38, but which does not require you to run scrypt for each key, and where scrypt parameters are
parametrized as part of the output. This way we can configure the scrypt strength according to the password strength.
I keep getting the Secret keys derived from 70 bit passwords that you can write down are in my opinion marginal when placed on the block chain where they are begging people to take a crack at them with the best crackers the world has to offer. In Mycelium I hope this is not done.
Correct. Unlike brain wallets, you can only brute force the password once you have obtained the encrypted backup.
I don't know the design details, but I hope in Mycelium the idea is to cover a STRONG key with 70 bit passwords. In that case I don't understand the objection to BIP38. It does exactly the same thing.
I assume the objection is that a user with BIP38 can select a weak human password. But if he is just protecting himself against a random pickpocket then that is a valid decision by the user. Why restrict him? Why force him to write down the 70 bit password on a piece of paper that he will loose to that same pickpocket?
Partly covered above. The password is basically there to protect our users from using unsafe transport from the app to the printer. Whether you write the password on the printout or somewhere else is entirely up to you. The backup mechanism is meant for having a secure and verifiable backup of your private keys.
If you want to protect yourself against a pickpocket you could very well use a BIP38 backup with a weak password. We are likely to add support for cold storage spending using BIP38 fairly soon.
We already have an "advanced user" mode. Why not let the users do what they think is best?
Because many people who consider themselves clever use weak passwords. If someone looses his coins because he uses "correct horse battery staple" as his password it is going to fall back on the Mycelium developers.