As a newbie in Bitcoin and programming it, I am trying to generate BTC addresses from mnemonic. So I read about the BIPs, and found codes in Github that implement those.
I found out that Electrum doesn't implement BIP-39 (by default if I have not mistaken), because mnemonics that are invalid in BIP-39 are accepted by Electrum!
So my question is: How does Electrum do its own "From mnemonic to seed" section (atleast for standard wallet)? This "seed byte" is the one to be used in BIP-32 for generating keys, if I have not mistaken.
I tried the following Python psuedocode (from "Electrum Seed Version System"):
hmac = hmac.digest(b"Seed version", b"...(12 word mnemonic)...", hashlib.sha512) bip32_thing = Bip32(secret = hmac[:32], chain = hmac[32:]) # default: Bip32 main net version (idk what this means)
But my generated master public key and Electrum's doesn't match (most likely I misunderstood the "Seed Version System" altogether). Thanks for responding!
In case it helps: I am using
bip-utils in Python.