Received: from sog-mx-3.v43.ch3.sourceforge.com ([172.29.43.193] helo=mx.sourceforge.net) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1YViHV-0006fB-1d for bitcoin-development@lists.sourceforge.net; Wed, 11 Mar 2015 15:10:45 +0000 X-ACL-Warn: Received: from slow1-d.mail.gandi.net ([217.70.178.86]) by sog-mx-3.v43.ch3.sourceforge.com with esmtp (Exim 4.76) id 1YViHO-0007mh-Lf for bitcoin-development@lists.sourceforge.net; Wed, 11 Mar 2015 15:10:45 +0000 Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by slow1-d.mail.gandi.net (Postfix) with ESMTP id D91ED47A338 for ; Wed, 11 Mar 2015 15:58:17 +0100 (CET) Received: from mfilter38-d.gandi.net (mfilter38-d.gandi.net [217.70.178.169]) by relay3-d.mail.gandi.net (Postfix) with ESMTP id 34035A80BC; Wed, 11 Mar 2015 15:58:09 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mfilter38-d.gandi.net Received: from relay3-d.mail.gandi.net ([217.70.183.195]) by mfilter38-d.gandi.net (mfilter38-d.gandi.net [10.0.15.180]) (amavisd-new, port 10024) with ESMTP id wnC4RqHBxJx2; Wed, 11 Mar 2015 15:58:07 +0100 (CET) X-Originating-IP: 78.52.85.214 Received: from [192.168.1.45] (f052085214.adsl.alicedsl.de [78.52.85.214]) (Authenticated sender: thomasv@electrum.org) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id EBAFBA80F2; Wed, 11 Mar 2015 15:58:05 +0100 (CET) Message-ID: <550057FD.6030402@electrum.org> Date: Wed, 11 Mar 2015 15:58:05 +0100 From: Thomas Voegtlin User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Mike Hearn References: <54F32EED.6040103@electrum.org> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. X-Headers-End: 1YViHO-0007mh-Lf Cc: Bitcoin Development Subject: Re: [Bitcoin-development] Electrum 2.0 has been tagged X-BeenThere: bitcoin-development@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Mar 2015 15:10:45 -0000 Thanks Mike, and sorry to answer a bit late; it has been a busy couple of weeks. You are correct, a BIP39 seed phrase will not work in Electrum, and vice versa. It is indeed unfortunate. However, I believe BIP39 should not be followed, because it reproduces two mistakes I did when I designed the older Electrum seed system. Let me explain. The first problem I have with BIP39 is that the seed phrase does not include a version number. Wallet development is still in an exploratory phase, and we should expect even more innovation in this domain. In this context, it is unwise to make decisions that prevent future innovation. However, when we give a seed phrase to users, we have a moral obligation to keep supporting this seed phrase in future versions. We cannot simply announce to Electrum users that their old seed phrase is not supported anymore, because we created a new version of the software that uses a different derivation. This could lead to financial losses for users who are unaware of these technicalities. Well, at least, that is how I feel about it. BIP39 and Electrum v2 have a very different ways of handling future innovation. Electrum v2 seed phrases include an explicit version number, that indicates how the wallet addresses should be derived. In contrast, BIP39 seed phrases do not include a version number at all. BIP39 is meant to be combined with BIP43, which stipulates that the wallet structure should depend on the BIP32 derivation path used for the wallet (although BIP43 is not followed by all BIP39 compatible wallets). Thus, innovation in BIP43 is allowed only within the framework of BIP32. In addition, having to explore the branches of the BIP32 tree in order to determine the type of wallet attached to a seed might be somewhat inefficient. The second problem I see with BIP39 is that it requires a fixed wordlist. Of course, this forbids innovation in the wordlist itself, but that's not the main problem. When you write a new standard, it is important to keep this standard minimal, given the goal you want to achieve. I believe BIP39 could (and should) have been written without including the wordlist in the standard. There are two ways to derive a master key from a mnemonic phrase: 1. A bidirectional mapping between words and numbers, as in old Electrum versions. Pros: bidirectional means that you can do Shamir secret sharing of your seed. Cons: It requires a fixed wordlist. 2. Use a hash of the seed phrase (pbkdf). Pros: a fixed wordlist is not required. Cons: the mapping isn't bidirectional. Electrum v1 uses (1). Electrum v2 uses (2). Early versions of BIP39 used (1), and later they switched to (2). However, BIP39 uses (2) only in order to derive the wallet keys, not for its checksum. The BIP39 checksum uses (1), and it does requires a fixed wordlist. This is just plainly inconsistent. As a result, you have neither wordlist flexibility, nor Shamir secret sharing. Having a fixed wordlist is very unfortunate. First, it means that BIP39 will probably never leave the 'draft' stage, until all languages of the world have been added. Second, once you add a wordlist for a new language, you cannot change it anymore, because it will break existing seed phrases; therefore you have to be extremely careful in the way you design these wordlists. Third, languages often have words in common. When you add a new language to the list, you should not use words already used by existing wordlists, in order to ensure that the language can be detected. It leads to a first come first served situation, that might not be sustainable in the future. In order to support the old Electrum v1 seeds, all future versions of Electrum will have to include the old wordlist. In addition, when generating new seed phrases, Electrum now has to avoid collisions with old seed phrases, because the old ones did not have a version number. This is painful enough, I will not repeat the same errors twice. Electrum v2 derives both its private keys and its checksum/version number using a hash of the seed phrase. This means that wordlists can be added and modified in the future, without breaking existing seed phrases. It also means that it will be very easy for other wallets to support Electrum seedphrases: it requires about 20 lines of code, and no wordlist is required. Thomas Le 02/03/2015 16:37, Mike Hearn a =C3=A9crit : > Congrats Thomas! Glad to see Electrum 2 finally launch. >=20 >=20 >> * New seed derivation method (not compatible with BIP39). >=20 >=20 > Does this mean a "12 words" wallet created by Electrum won't work if > imported into some other wallet that supports BIP39? Vice versa? This s= eems > unfortunate. I guess if seeds are being represented with 12 words > consistently, people will expect them to work everywhere. >=20