March 25, 2026

Can’t get the bip32masterkey from mnemonic seed (Python)

I’m trying to understandand implement the functioning of Hierarchical deterministic wallets.
But I can’t get the bip32masterkey
based on this tutorial : https://medium.com/mycrypto/the-journey-from-mnemonic-phrase-to-address-6c5e86e11e14

this mnemonic seed : 0x77cdf1d92225adc0e67b1b4f5a31820251d518b3af074df25a07b751947fd07ebd29a4d0e57b84ea9de03a9123e2a6ea1e3ed739d4c562efec21f1bb0a54a879

should give me this bip32masterkey : 0x300b155f751964276c0536230bd9b16fe7a86533c3cbaa7575e8d0431dbedf23f9945bb8b052bd0b0802c10c7c852e7765b69b61ce7233d9fe5a35ab108ca3b6

but instead I have : 0x11df5cd2d2095dde0a46a8de0c2aba91a565e16dd0e5877d21285e605659d587bd3b3c72cba372ecf3b26fdf27151d9dc5d9f341760784cb04540f95d193c383

here’s the code i’m using :

def get_bip32masterkey(seed):
    master_key = pbkdf2_hmac("SHA512", bytes(binascii.a2b_hex(seed)), bytes("Bitcoin seed".encode()), 1).hex()
    return (master_key)

I also tried with hmac instead of pbkdf2 but I cant get the right bip32masterkey, does someone see the point i’m missing ?

(I’m not a python dev I’m just trying to understand the basis)

Thank you in advance to all for your answers

Previous Article

BTC Daily Failing to Break Previous High

Next Article

BTCUSD Trading Analysis

You might be interested in …