Bitcoin Forum
May 26, 2024, 10:46:41 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How dows wallet seed restore work?  (Read 235 times)
paduser (OP)
Sr. Member
****
Offline Offline

Activity: 432
Merit: 250


View Profile
November 11, 2017, 07:54:35 PM
 #1

Hi,

I'm looking for some anwsers that I can't figure out my self.

Type 1 deterministic wallet use SHA256(string + n) n=numbers of adress since creation to restore adresses.
Does a Type 2 hierarchical deterministic wallet the same? Just with a seed generated from 12 words out of a list and some mechanics to slow down bruteforce?

Hope someone can help me or point me in the right direction.
Thanks
odolvlobo
Legendary
*
Offline Offline

Activity: 4326
Merit: 3239



View Profile
November 12, 2017, 04:39:32 AM
Last edit: November 12, 2017, 04:49:36 AM by odolvlobo
 #2

Hi,

I'm looking for some anwsers that I can't figure out my self.

Type 1 deterministic wallet use SHA256(string + n) n=numbers of adress since creation to restore adresses.
Does a Type 2 hierarchical deterministic wallet the same? Just with a seed generated from 12 words out of a list and some mechanics to slow down bruteforce?

Hope someone can help me or point me in the right direction.
Thanks

The 12 word seed is used directly to generate all the private keys that the wallet will ever use. It works something like this: the first private key is generated by SHA256(seed). The second private key is generated by SHA256(first private key). The third private key is generated by SHA256(second private key), and so on ... but in reality, it is more complicated than that.

There is no need for "some mechanics to slow down bruteforce". Each word is from a list of 2048 words, so each word represents 11 bits of entropy, for a total of 132 bits. However 4 bits are a checksum so the actual entropy is 128 bits.

Join an anti-signature campaign: Click ignore on the members of signature campaigns.
PGP Fingerprint: 6B6BC26599EC24EF7E29A405EAF050539D0B2925 Signing address: 13GAVJo8YaAuenj6keiEykwxWUZ7jMoSLt
paduser (OP)
Sr. Member
****
Offline Offline

Activity: 432
Merit: 250


View Profile
November 12, 2017, 12:05:37 PM
 #3

Thanks for the anwser. You really helped me out.

Quote
but in reality, it is more complicated than that.

So I can't calculate all the private keys manually outside of the wallet software?
odolvlobo
Legendary
*
Offline Offline

Activity: 4326
Merit: 3239



View Profile
November 12, 2017, 07:20:10 PM
 #4

Thanks for the anwser. You really helped me out.
Quote
but in reality, it is more complicated than that.
So I can't calculate all the private keys manually outside of the wallet software?

This is exactly how it works (for wallets using BIP-32): https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki

Join an anti-signature campaign: Click ignore on the members of signature campaigns.
PGP Fingerprint: 6B6BC26599EC24EF7E29A405EAF050539D0B2925 Signing address: 13GAVJo8YaAuenj6keiEykwxWUZ7jMoSLt
paduser (OP)
Sr. Member
****
Offline Offline

Activity: 432
Merit: 250


View Profile
November 13, 2017, 07:43:09 PM
 #5

Thanks for the anwser. You really helped me out.
Quote
but in reality, it is more complicated than that.
So I can't calculate all the private keys manually outside of the wallet software?

This is exactly how it works (for wallets using BIP-32): https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki

Thanks
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!