How does this work? Because i guess that if i try to import a seed phrase to another wallet, -snip-
It's just a fancy term used by Electrum, but that's the same as a "
BIP39 Passphrase".
There's a "
standards" to that which every wallet that supports BIP39 standard should've implemented (
standard=the majority is doing the exact same thing)
So you can expect every wallet that support BIP39 seed to support the passphrase unless it's badly written.
I can see that your script creates BIP39 seed, so only apply the logic above to it since Electrum doesn't follow that standard on its native seed phrase.
However, it uses BIP39 standard to restore when 'BIP39 seed' is ticked in the options.
How does that work?
When deriving the seed from the mnemonic phrase, the words are passed throught 2048 rounds of HMAC-SHA512 as 'password' and the string "
mnemonic" as salt.
But if you set a "
Custom Word" or BIP39 passphrase, that salt will be extended to "
mnemonic<your_passphrase>".
Given that the salt is different in the latter, the computed seed will be different from the former. (
as they explained in the previous replies)
Note: The "
seed" isn't your 12 words, the mnemonic is your 12 words. It's the HDSeed used to create your master private key.