I am trying the following:
password = None;
seed="constant forest adore false green weave stop guy fur freeze giggle clock";
seed = pw_decode(seed, password).encode('utf8');
print seed;
oldseed = seed
for i in range(100000):
seed = hashlib.sha256(seed + oldseed).digest()
newseed=string_to_number( seed );
print newseed;
print "----";
curve = SECP256k1
master_private_key = ecdsa.SigningKey.from_secret_exponent( newseed, curve = SECP256k1 );
master_public_key = master_private_key.get_verifying_key().to_string().encode('hex');
print master_public_key;
However it doesn't give me the correct master public key. What am I doing wrong?
The 12 words are not your encoded seed, they are your decoded seed. You must convert mnemonic to hex, no password needed.
from electrum import mnemonic
seed = mnemonic.mn_decode(["constant", "forest", "adore", "false", "green", "weave", "stop", "guy", "fur", "freeze", "giggle", "clock"])
will make seed your unencrypted seed. The rest should be fine.
Edit:
Actually the input to the mn_decode should be a dict of strings and not a single string