Bitcoin Forum
November 03, 2024, 11:47:58 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: how to verify seed  (Read 816 times)
jonald_fyookball (OP)
Legendary
*
Offline Offline

Activity: 1302
Merit: 1008


Core dev leaves me neg feedback #abuse #political


View Profile
March 15, 2014, 03:21:35 PM
 #1

 
If I want to encrypt the seed manually to verify that its the same private key
generated as electrum, uses, can I use something like this:

http://aes.online-domain-tools.com/

I assume I would put the key in the input text field, but
what would i put in the key field?

flatfly
Legendary
*
Offline Offline

Activity: 1092
Merit: 1016

760930


View Profile
March 15, 2014, 05:30:34 PM
 #2


If I want to encrypt the seed manually to verify that its the same private key
generated as electrum, uses, can I use something like this:

http://aes.online-domain-tools.com/

I assume I would put the key in the input text field, but
what would i put in the key field?

That's not how AES works - AES (when used in the most common way) never produces the same output twice.
Unfortunately I don't have much time to elaborate, but you can easily research that online.
jonald_fyookball (OP)
Legendary
*
Offline Offline

Activity: 1302
Merit: 1008


Core dev leaves me neg feedback #abuse #political


View Profile
March 15, 2014, 10:16:23 PM
 #3

I guess the real question is how does it create the private key from the seed?

Abdussamad
Legendary
*
Offline Offline

Activity: 3682
Merit: 1580



View Profile
April 20, 2014, 07:26:31 AM
Last edit: April 20, 2014, 07:39:34 AM by Abdussamad
 #4

You can see the relevant code here:

https://github.com/spesmilo/electrum/blob/66e1e2707d4a82ecbe3f2bf7d532036d0a9651a8/lib/account.py#L101

jonald_fyookball (OP)
Legendary
*
Offline Offline

Activity: 1302
Merit: 1008


Core dev leaves me neg feedback #abuse #political


View Profile
May 16, 2014, 03:07:12 AM
 #5

I am trying the following:

Code:

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?


dabura667
Sr. Member
****
Offline Offline

Activity: 475
Merit: 252


View Profile
May 16, 2014, 09:40:37 AM
 #6

I am trying the following:

Code:

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.

Code:
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

My Tip Address:
1DXcHTJS2DJ3xDoxw22wCt11FeAsgfzdBU
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!