Author

Topic: Create a new seed in Electrum: any way to replace 2 words and keep seed valid? (Read 276 times)

legendary
Activity: 3472
Merit: 10611
Tanks everyone for the answers!
no, you are confusing BIP39 seeds with Electrum seeds. they are different and use a different algorithm. Electrum seeds don't have any checksum, instead they have a version bit(s) that has to be generated after computing HMACSHA512 of the seed phrase.
Special thanks for your answer, I was able to solve the problem and wrote a script. It's very simple (I'm not a programmer), but works, in 20-30 minutes it generates all combinations of two words (about 1000) with which the seed phrase is valid (created in electrum v4, segwit type)

good job. make sure to test the end result with Electrum itself to see if it actually works.
also keep in mind that Electrum itself takes some additional steps while "normalizing" the seed phrase before passing it to HMACSHA512 which don't matter if you are using the English word-list and don't add any extra spaces. otherwise if you use other word-lists that contain words with accents, Chinese letters,... it must be "normalized" the same way.
for reference: https://github.com/spesmilo/electrum/blob/f49e766b218649a5b64a196bcc055e41291fb223/electrum/mnemonic.py#L79-L90
newbie
Activity: 2
Merit: 2
Tanks everyone for the answers!
no, you are confusing BIP39 seeds with Electrum seeds. they are different and use a different algorithm. Electrum seeds don't have any checksum, instead they have a version bit(s) that has to be generated after computing HMACSHA512 of the seed phrase.
Special thanks for your answer, I was able to solve the problem and wrote a script. It's very simple (I'm not a programmer), but works, in 20-30 minutes it generates all combinations of two words (about 1000) with which the seed phrase is valid (created in electrum v4, segwit type)
HCP
legendary
Activity: 2086
Merit: 4363
When I create a new wallet in Electrum v4 and choose to create a new seed (type segwit), the program generates 12 words.

Of course I can't do this so easy because the checksum is violated, If I understood correctly, the last word is control? So I agree to replace it too.
no, you are confusing BIP39 seeds with Electrum seeds. they are different and use a different algorithm. Electrum seeds don't have any checksum, instead they have a version bit(s) that has to be generated after computing HMACSHA512 of the seed phrase.
THIS^^

So, you're likely to have more success using BIP39 seeds to do what you're trying to achieve... although that comes with the caveat that Electrum make no guarantees that they will always support BIP39 (although I don't see any reason they'd drop the support at this point in time).

As others have mentioned, it seems like you're trying to memorise your seed... while that is admirable, it is a risky strategy for securing your seed mnemonic and not recommended.
legendary
Activity: 2268
Merit: 18771
If you are generating an Electrum seed, you can also specify your own wordlist to use rather than using the default BIP39 wordlist. The order of the words will still be random, and you will be given more than 12 words, since your smaller wordlist will still have to encode the same amount of entropy. For example, if your custom word list has only 100 words rather than 2048, then your seed phrase will be 20 words long (as 10020 it needed to reach the same amount of entropy as 204812). You can either choose your own words entirely, or you can choose a subset of words from the BIP39 word list.

Navigate to your Electrum install directory, and look in the subfolder "electrum" then "wordlist" for the file "english.txt". Make a back up of this, and then edit the original to your own custom wordlist. Once you've done this, open Electrum and generate a seed.
legendary
Activity: 3472
Merit: 10611
When I create a new wallet in Electrum v4 and choose to create a new seed (type segwit), the program generates 12 words.

Of course I can't do this so easy because the checksum is violated, If I understood correctly, the last word is control? So I agree to replace it too.

no, you are confusing BIP39 seeds with Electrum seeds. they are different and use a different algorithm. Electrum seeds don't have any checksum, instead they have a version bit(s) that has to be generated after computing HMACSHA512 of the seed phrase.

since you are using SegWit wallet type the result of HMACSHA512(msg=normalized_seed, key = "Seed version") must start with 0x1000. since this is 2 bytes and you are changing 2 words you might have a chance at finding a collision. just write a loop computing HMAC for each change until you find it.

if you start with a truly random key and only change 2 words, the final result could be considered still-random. but if you don't and use something like brainwallet and choose all words and then brute force that, then your result is not-random.
copper member
Activity: 2338
Merit: 4543
Join the world-leading crypto sportsbook NOW!
You might be able to replace two words and still have a valid bip39 phrase, but it's highly unlikely.  The odds that you'll stumble upon two words that will meet your standards and satisfy either the bip39 or Electrum checksums is near impossible.

If you want to play around with it, use the Ian Coleman Bip39 tool.  You can also download it and run it off of your hard drive for a more secure setup, and on an air-gapped machine for the ultimately cautious among us.   Grin

And, here's the bip39 word list in various languages:
https://github.com/bitcoin/bips/tree/master/bip-0039

I do however want to caution you against relying on memorizing your seed phrase, and taking no other precaution to back it up.  Memory fails us all sooner or later.  It's just a matter of time.  I suggest you write down your seed phrase and secure it in a safe manner, regardless of your desire and ability to memorize it.
legendary
Activity: 1596
Merit: 1288
new seed = new private keys. you can generate your own new wallet seed words and move your coins to it.

If you want to create a new wallet seed just because if it's easier to remember for you (& others,) the idea is bad. There are better ways to secure your wallet seeds.

you can create a custom wallet seed using brain wallet. (Risky)

pick your own words from https://github.com/bitcoin/bips/blob/master/bip-0039/english.txt and use this tool to generate correct checksum https://iancoleman.io/bip39/
newbie
Activity: 2
Merit: 2
Hello! Please sorry for my english.

When I create a new wallet in Electrum v4 and choose to create a new seed (type segwit), the program generates 12 words.

I spent several hours trying to find a convenient phrase for me. Finally I got almost good seed. No, it's not simple, just contains words that it’s easier to remember only for me. But now I want to replace just a few words (for example 1 and 3) with others from the built-in dictionary to make it better for remember.

Of course I can't do this so easy because the checksum is violated, If I understood correctly, the last word is control? So I agree to replace it too.

It’s hard for me to understand the Electrum seed checksum calculation algorithm. Can I choose instead of this two word any from built-in dictionary and then somehow find out the correct last word? If not, perhaps possible to get a list of different words with control word so that I can choose?

I tried to choose randomly words (№ 1, № 3 and last) manually in the hope that button "Next" will become active, but in half an hour not a single successful attempt.

I think only a script can solve this task, who has any ideas? The closest I found is https://github.com/gurnec/btcrecover but as I understand it, it's suitable only for older versions of the Electrum (v1, v2) and not works with Electrum v3, v4 seed type
Jump to: