{"type":"rich","version":"1.0","author_name":"npub1836zrd49hyr9aad6tvgng94uyy4r3xjcs5lkdza0ld9g5p8jkd0speeux6","author_url":"https://nostr.ae/npub1836zrd49hyr9aad6tvgng94uyy4r3xjcs5lkdza0ld9g5p8jkd0speeux6","provider_name":"njump","provider_url":"https://nostr.ae","html":"📅 Original date posted:2015-03-12\n📝 Original message:That's disappointing the Electrum 2.0 doesn't use BIP39.\n\u003eFrom my interpretation of BIP39, wordlists DO NOT REQUIRE to be fixed between wallet providers. There is some recommendations regarding the wordlists to help with things such as predictive text, so mobile apps can easily predict the word being typed in after a few chars etc. This would seem to be the reasoning for the reference word lists. Now there is nothing stopping one from implementing a wordlist of say profanities or star wars terms or whatever and still accepting a mnemonic from another provider. Remember if you have a mnemonic from a different wordlist, simply Normalization of the words occurs and then the hashing the mnemonic to derive the seed bytes. It is not really a restriction at all! BIP39 was designed such that the mnemonic generation is decoupled from seed derivation, just like what you are saying Electrum 2.0 can do! The wordlist is only needed for mnemonic generation NOT seed derivation, so Electrum DOES NOT need a copy of the BIP39 word lists to generate the seed from the phrase, there is really not much reason for Electrum not to accept BIP39 mnemonics at the moment! it requires bugger all code! Here is my seed generation code\n\n\n\n//literally this is the bulk of the decoupled seed generation code, easy.byte[] salt = Utilities.MergeByteArrays(UTF8Encoding.UTF8.GetBytes(cSaltHeader),_passphraseBytes);return Rfc2898_pbkdf2_hmacsha512.PBKDF2(UTF8Encoding.UTF8.GetBytes(Utilities.NormaliseStringNfkd(MnemonicSentence)), salt);\n\nChanging the wordlist in the future has ZERO effect on derived seed, whatever mnemonic you provide will always generate the same seed, BIP39 is not mapping the words back to numbers etc to derive seed.\nVersion is something that can be dealt with after the fact, hopefully standardised (curious why didn't you work with the BIP39 to insert version instead of do something different to BIP39?)\nSo most of what you are suggesting as problems are not.\nAs for the common words between languages, I have discussed this with the provider of the Chinese wordlists as they shared some words between simplified and traditional, but I found it easy to look for a word in the mnemonic that is unique to that language/wordlist and so straight away you can determine the language, remembering you get minimum 12 goes at doing that :)\nAlso then I asked myself, do we really care about detecting the language? Probably not because we don't need to use the wordlist ever again after creation, we literally accept the mnemonic, normalise it then hash it into a seed. From what I'm reading, Electrum 2.0 really should have BIP39, it would take almost no effort to put it in and I think you should do that :) I don't have any interest in BIP39 other than it being a standard. I think TREZOR may have an interest in it?\nThomas V:\n\"Thanks Mike, and sorry to answer a bit late; it has been a busy couple\nof weeks.\n\nYou are correct, a BIP39 seed phrase will not work in Electrum, and vice\nversa. It is indeed unfortunate. However, I believe BIP39 should not be\nfollowed, because it reproduces two mistakes I did when I designed the\nolder Electrum seed system. Let me explain.\n\nThe first problem I have with BIP39 is that the seed phrase does not\ninclude a version number.\n\nWallet development is still in an exploratory phase, and we should\nexpect even more innovation in this domain. In this context, it is\nunwise to make decisions that prevent future innovation.\n\nHowever, when we give a seed phrase to users, we have a moral obligation\nto keep supporting this seed phrase in future versions. We cannot simply\nannounce to Electrum users that their old seed phrase is not supported\nanymore, because we created a new version of the software that uses a\ndifferent derivation. This could lead to financial losses for users who\nare unaware of these technicalities. Well, at least, that is how I feel\nabout it.\n\nBIP39 and Electrum v2 have a very different ways of handling future\ninnovation. Electrum v2 seed phrases include an explicit version number,\nthat indicates how the wallet addresses should be derived. In contrast,\nBIP39 seed phrases do not include a version number at all. BIP39 is\nmeant to be combined with BIP43, which stipulates that the wallet\nstructure should depend on the BIP32 derivation path used for the wallet\n(although BIP43 is not followed by all BIP39 compatible wallets). Thus,\ninnovation in BIP43 is allowed only within the framework of BIP32. In\naddition, having to explore the branches of the BIP32 tree in order to\ndetermine the type of wallet attached to a seed might be somewhat\ninefficient.\n\nThe second problem I see with BIP39 is that it requires a fixed\nwordlist. Of course, this forbids innovation in the wordlist itself, but\nthat's not the main problem. When you write a new standard, it is\nimportant to keep this standard minimal, given the goal you want to\nachieve. I believe BIP39 could (and should) have been written without\nincluding the wordlist in the standard.\n\nThere are two ways to derive a master key from a mnemonic phrase:\n 1. A bidirectional mapping between words and numbers, as in old\nElectrum versions. Pros: bidirectional means that you can do Shamir\nsecret sharing of your seed. Cons: It requires a fixed wordlist.\n 2. Use a hash of the seed phrase (pbkdf). Pros: a fixed wordlist is not\nrequired. Cons: the mapping isn't bidirectional.\n\nElectrum v1 uses (1). Electrum v2 uses (2).\n\nEarly versions of BIP39 used (1), and later they switched to (2).\nHowever, BIP39 uses (2) only in order to derive the wallet keys, not for\nits checksum. The BIP39 checksum uses (1), and it does requires a fixed\nwordlist. This is just plainly inconsistent. As a result, you have\nneither wordlist flexibility, nor Shamir secret sharing.\n\nHaving a fixed wordlist is very unfortunate. First, it means that BIP39\nwill probably never leave the 'draft' stage, until all languages of the\nworld have been added. Second, once you add a wordlist for a new\nlanguage, you cannot change it anymore, because it will break existing\nseed phrases; therefore you have to be extremely careful in the way you\ndesign these wordlists. Third, languages often have words in common.\nWhen you add a new language to the list, you should not use words\nalready used by existing wordlists, in order to ensure that the language\ncan be detected. It leads to a first come first served situation, that\nmight not be sustainable in the future.\n\nIn order to support the old Electrum v1 seeds, all future versions of\nElectrum will have to include the old wordlist. In addition, when\ngenerating new seed phrases, Electrum now has to avoid collisions with\nold seed phrases, because the old ones did not have a version number.\nThis is painful enough, I will not repeat the same errors twice.\n\nElectrum v2 derives both its private keys and its checksum/version\nnumber using a hash of the seed phrase. This means that wordlists can be\nadded and modified in the future, without breaking existing seed\nphrases. It also means that it will be very easy for other wallets to\nsupport Electrum seedphrases: it requires about 20 lines of code, and no\nwordlist is required.\"\n\n\nThomas\n\n\nLe 02/03/2015 16:37, Mike Hearn a écrit :\n\u003e Congrats Thomas! Glad to see Electrum 2 finally launch.\n\u003e \n\u003e \n\u003e\u003e * New seed derivation method (not compatible with BIP39).\n\u003e \n\u003e \n\u003e Does this mean a \"12 words\" wallet created by Electrum won't work if\n\u003e imported into some other wallet that supports BIP39? Vice versa? This seems\n\u003e unfortunate. I guess if seeds are being represented with 12 words\n\u003e consistently, people will expect them to work everywhere.\n\u003e \n\n------------------------------------------------------------------------------\nDive into the World of Parallel Programming The Go Parallel Website, sponsored\nby Intel and developed in partnership with Slashdot Media, is your hub for all\nthings parallel software development, from weekly thought leadership blogs to\nnews, videos, case studies, tutorials and more. Take a look and join the \nconversation now. http://goparallel.sourceforge.net/\n_______________________________________________\nBitcoin-development mailing list\nBitcoin-development at lists.sourceforge.net\nBitcoin-development --\n|   |\n|   |   |   |   |   |\n| Bitcoin-development --To see the collection of prior postings to the list, visit the Bitcoin-development Archives. |\n|  |\n| View on lists.sourceforge.net | Preview by Yahoo |\n|  |\n|   |\n\n  \n\n \n   \n-------------- next part --------------\nAn HTML attachment was scrubbed...\nURL: \u003chttp://lists.linuxfoundation.org/pipermail/bitcoin-dev/attachments/20150312/8f2ef0c6/attachment.html\u003e"}
