Bitcoin Forum
May 12, 2024, 03:50:10 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Dumping private key from hex  (Read 654 times)
gargouri20011 (OP)
Member
**
Offline Offline

Activity: 71
Merit: 10


View Profile
October 01, 2017, 09:08:26 PM
 #1


I am trying to dump doge wallet private key from corrupted non encrypted wallet. Note: pywallet was unable to dump any private keys.

After some try I found that private key of dogecoin in hex should start with: 3081D30201010420

This is a sample of hex private key in new wallet: 3081D30201010420 0578AA4071328241247763B63134918892FFDA1E3C1DFE402F0A01D623B3FB97

Now i figured out that in order to get the base 58 of my private key : I need to add 2B at the start and then 0134CC212A at the end , so the full hex key will look like:

2B 0578AA4071328241247763B63134918892FFDA1E3C1DFE402F0A01D623B3FB97 0134CC212A

The base58 of this full hex give exactly the private key.

Now the question is how can I generate this hex (0134CC212A) for my corrupted wallet?

I am missing only this in order to get full hex of private key

Thanks for any help 

reward if i can recover wallet 500000 doge .
1715485810
Hero Member
*
Offline Offline

Posts: 1715485810

View Profile Personal Message (Offline)

Ignore
1715485810
Reply with quote  #2

1715485810
Report to moderator
1715485810
Hero Member
*
Offline Offline

Posts: 1715485810

View Profile Personal Message (Offline)

Ignore
1715485810
Reply with quote  #2

1715485810
Report to moderator
1715485810
Hero Member
*
Offline Offline

Posts: 1715485810

View Profile Personal Message (Offline)

Ignore
1715485810
Reply with quote  #2

1715485810
Report to moderator
According to NIST and ECRYPT II, the cryptographic algorithms used in Bitcoin are expected to be strong until at least 2030. (After that, it will not be too difficult to transition to different algorithms.)
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
achow101
Staff
Legendary
*
Offline Offline

Activity: 3388
Merit: 6635


Just writing some code


View Profile WWW
October 01, 2017, 11:54:48 PM
 #2

The hex you are looking for is a checksum. It is the first four bytes of the sha256 double hash of the version byte (0x2b) and the payload (your private key). This process is known as Base 58 Check encoding and you can read about it here: https://en.bitcoin.it/wiki/Base58Check_encoding

gargouri20011 (OP)
Member
**
Offline Offline

Activity: 71
Merit: 10


View Profile
October 02, 2017, 12:20:43 AM
Last edit: October 02, 2017, 12:47:01 AM by gargouri20011
 #3

Hello
could you please explain , what is the payload of private key or how to get it ?
achow101
Staff
Legendary
*
Offline Offline

Activity: 3388
Merit: 6635


Just writing some code


View Profile WWW
October 02, 2017, 12:54:05 AM
 #4

Hello
could you please explain , what is the payload of private key or how to get it ?
The payload is the private key. The hex private key that you have represents the bytes of the private key. That is the payload.

gargouri20011 (OP)
Member
**
Offline Offline

Activity: 71
Merit: 10


View Profile
October 02, 2017, 01:08:21 AM
Last edit: October 02, 2017, 01:25:22 AM by gargouri20011
 #5

so  should do checksum (sha256(sha256 (0x2b) and private key in hex) ) ?

could please tell on the example above how to do exactly , i almost tried every combination , still  can't get the 0134CC212A
achow101
Staff
Legendary
*
Offline Offline

Activity: 3388
Merit: 6635


Just writing some code


View Profile WWW
October 02, 2017, 02:04:32 AM
 #6

so  should do checksum (sha256(sha256 (0x2b) and private key in hex) ) ?
Almost. Private key as bytes.

could please tell on the example above how to do exactly , i almost tried every combination , still  can't get the 0134CC212A
You are probably hashing it as a string, not as bytes.

Also, what led you to think that you need to prepend 2b and what led you to think that you need to append 0134CC212A? What makes you think that 3081D30201010420 signals the start of a private key? What makes you think that 0578AA4071328241247763B63134918892FFDA1E3C1DFE402F0A01D623B3FB97 is your private key in hex?

From what I can find, the byte you need to prepend is 0x9e. 0134CC212A does not match the 4 byte checksum for Base58 Check encoding as it is 5 bytes. The private key should also be much longer as unencrypted private keys are stored in the super long form DER format.

gargouri20011 (OP)
Member
**
Offline Offline

Activity: 71
Merit: 10


View Profile
October 02, 2017, 02:28:58 AM
 #7

ok here what i did . sound like there some confusion here let's clear it out .

i created a new doge wallet DTBZuzsFoXxNu1gUPiwL7Yu64atUcsk7Tm .
Then dumpprivkey DTBZuzsFoXxNu1gUPiwL7Yu64atUcsk7Tm -- > QNoGCcEp6R86Ag5SNPoxVGkXMAx3L2Dedv6BkKJzCEoPSJzE8oLV
Then went here : https://walletgenerator.net/
This site show private key hex as : 0578AA4071328241247763B63134918892FFDA1E3C1DFE402F0A01D623B3FB97
opened hex editor searching for the string :
i found the string , as i said above all doge wallet private key has a start hex of 3081D30201010420   .

3081D30201010420 0578AA4071328241247763B63134918892FFDA1E3C1DFE402F0A01D623B3FB97


now when i do a base58 decode of the private key (QNoGCcEp6R86Ag5SNPoxVGkXMAx3L2Dedv6BkKJzCEoPSJzE8oLV)  here is what i get :

9E 0578AA4071328241247763B63134918892FFDA1E3C1DFE402F0A01D623B3FB97 (0134CC212A)


Here is the same procedure for another wallet :
New wallet : D6Rka31SFm8PnN2Cs9QWj5YcfzRpkXx6fw
Then dumpprivkey D6Rka31SFm8PnN2Cs9QWj5YcfzRpkXx6fw -- > QQToBX1SQBSuZo8ijsTLyL7cx9gn9QjK8s7XCBHXy8AUF2om1tNs
Then went here : https://walletgenerator.net/
This site show private key hex as : 3721D639228B9215C6BFF746CA163391CDBADB8566FC8FECB74871E8FAA24FE7
opened hex editor searching for the string :
i found the string , as i said above all doge wallet private key has a start hex of 3081D30201010420   .

3081D30201010420  3721D639228B9215C6BFF746CA163391CDBADB8566FC8FECB74871E8FAA24FE7

now when i do a base58 decode of the private key (QNoGCcEp6R86Ag5SNPoxVGkXMAx3L2Dedv6BkKJzCEoPSJzE8oLV)  here is what i get :
9E 3721D639228B9215C6BFF746CA163391CDBADB8566FC8FECB74871E8FAA24FE7 (015B6ADEE0)


I hope that you get the point all that i need now is to generate this (015B6ADEE0 or 0134CC212A ) for my own wallet .

achow101
Staff
Legendary
*
Offline Offline

Activity: 3388
Merit: 6635


Just writing some code


View Profile WWW
October 02, 2017, 02:40:02 AM
 #8

ok here what i did . sound like there some confusion here let's clear it out .

i created a new doge wallet DTBZuzsFoXxNu1gUPiwL7Yu64atUcsk7Tm .
Then dumpprivkey DTBZuzsFoXxNu1gUPiwL7Yu64atUcsk7Tm -- > QNoGCcEp6R86Ag5SNPoxVGkXMAx3L2Dedv6BkKJzCEoPSJzE8oLV
Then went here : https://walletgenerator.net/
This site show private key hex as : 0578AA4071328241247763B63134918892FFDA1E3C1DFE402F0A01D623B3FB97
opened hex editor searching for the string :
i found the string , as i said above all doge wallet private key has a start hex of 3081D30201010420   .

3081D30201010420 0578AA4071328241247763B63134918892FFDA1E3C1DFE402F0A01D623B3FB97


now when i do a base58 decode of the private key (QNoGCcEp6R86Ag5SNPoxVGkXMAx3L2Dedv6BkKJzCEoPSJzE8oLV)  here is what i get :

9E 0578AA4071328241247763B63134918892FFDA1E3C1DFE402F0A01D623B3FB97 (0134CC212A)


Here is the same procedure for another wallet :
New wallet : D6Rka31SFm8PnN2Cs9QWj5YcfzRpkXx6fw
Then dumpprivkey D6Rka31SFm8PnN2Cs9QWj5YcfzRpkXx6fw -- > QQToBX1SQBSuZo8ijsTLyL7cx9gn9QjK8s7XCBHXy8AUF2om1tNs
Then went here : https://walletgenerator.net/
This site show private key hex as : 3721D639228B9215C6BFF746CA163391CDBADB8566FC8FECB74871E8FAA24FE7
opened hex editor searching for the string :
i found the string , as i said above all doge wallet private key has a start hex of 3081D30201010420   .

3081D30201010420  3721D639228B9215C6BFF746CA163391CDBADB8566FC8FECB74871E8FAA24FE7

now when i do a base58 decode of the private key (QNoGCcEp6R86Ag5SNPoxVGkXMAx3L2Dedv6BkKJzCEoPSJzE8oLV)  here is what i get :
9E 3721D639228B9215C6BFF746CA163391CDBADB8566FC8FECB74871E8FAA24FE7 (015B6ADEE0)


I hope that you get the point all that i need now is to generate this (015B6ADEE0 or 0134CC212A ) for my own wallet .
I see. And where did the 2B come from?

Anyways, I see the problem. The 01 is actually part of the payload (i.e. the private key). It is a flag byte that signals that the private key should be used with a compressed public key. So the bytes you actually hash is
Code:
9E3721D639228B9215C6BFF746CA163391CDBADB8566FC8FECB74871E8FAA24FE701
Hashing those as bytes with sha256d (you can use a tool like http://www.fileformat.info/tool/hash.htm) yields the following hash:
Code:
5b6adee01d509671a81c129ab5395c906df775bb0520a633e862a62c76458f20
The first 4 bytes of that hash matches the checksum that you need: 5b6adee0

gargouri20011 (OP)
Member
**
Offline Offline

Activity: 71
Merit: 10


View Profile
October 02, 2017, 03:42:47 AM
 #9

Big thank for your help now i have to go over all those 3081D30201010420 there is a ton of them ,
If i will recover the doge i will contact you to send you the 500k doge
Wyre08
Member
**
Offline Offline

Activity: 84
Merit: 10


View Profile
October 02, 2017, 04:15:50 AM
 #10

Just out of curiosity how much Dogecoin do you have in the wallet that you're offering $500usd to recover it.

Good luck btw. Sorry I can't help.
gargouri20011 (OP)
Member
**
Offline Offline

Activity: 71
Merit: 10


View Profile
October 03, 2017, 12:28:40 AM
 #11

i am still testing all key now , there are 5 ml doge on it
gargouri20011 (OP)
Member
**
Offline Offline

Activity: 71
Merit: 10


View Profile
October 03, 2017, 08:21:00 PM
 #12

right now i am writing a script to check all keys ,
I did not understand what u mean exactly ?
0x953721D639228B9215C6BFF746CA163391CDBADB8566FC8FECB74871E8FAA24FE7 is WIF private key ?
could y explain what to do exactly ?
gargouri20011 (OP)
Member
**
Offline Offline

Activity: 71
Merit: 10


View Profile
October 03, 2017, 11:12:38 PM
 #13

Got it , but isn't this the same as above ?
gargouri20011 (OP)
Member
**
Offline Offline

Activity: 71
Merit: 10


View Profile
October 05, 2017, 02:56:36 AM
 #14

i finished work on it , i got about 1500 keys and imported them via rpc cli . overall balance 0 . so none of those keys are my real key
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!