Bitcoin Forum
May 12, 2024, 04:25:54 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Structure of a master key in old core wallet  (Read 95 times)
rterwedo (OP)
Newbie
*
Offline Offline

Activity: 11
Merit: 2


View Profile
March 28, 2021, 01:34:21 AM
 #1

Encryption was implemented in core v 0.4.  A master key was added that encrypts the private keys.  (The master key itself was encrypted via various mechanisms). The master key unlocks the private keys.

Is a master key in the old JBOK wallet simply a private key (with a different name) ie is it the same format as a private key?  I am trying to scan individual bytes to look for it as this wallet was not born encrypted....OR does it just generate a master key on the fly when you encrypt ?

ie a private key typically starts (back then) as 0x01 0x01 0x04 - are there any telltale signs of an unencrypted master key?
1715487954
Hero Member
*
Offline Offline

Posts: 1715487954

View Profile Personal Message (Offline)

Ignore
1715487954
Reply with quote  #2

1715487954
Report to moderator
1715487954
Hero Member
*
Offline Offline

Posts: 1715487954

View Profile Personal Message (Offline)

Ignore
1715487954
Reply with quote  #2

1715487954
Report to moderator
1715487954
Hero Member
*
Offline Offline

Posts: 1715487954

View Profile Personal Message (Offline)

Ignore
1715487954
Reply with quote  #2

1715487954
Report to moderator
Transactions must be included in a block to be properly completed. When you send a transaction, it is broadcast to miners. Miners can then optionally include it in their next blocks. Miners will be more inclined to include your transaction if it has a higher transaction fee.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715487954
Hero Member
*
Offline Offline

Posts: 1715487954

View Profile Personal Message (Offline)

Ignore
1715487954
Reply with quote  #2

1715487954
Report to moderator
1715487954
Hero Member
*
Offline Offline

Posts: 1715487954

View Profile Personal Message (Offline)

Ignore
1715487954
Reply with quote  #2

1715487954
Report to moderator
achow101
Moderator
Legendary
*
Offline Offline

Activity: 3388
Merit: 6635


Just writing some code


View Profile WWW
March 28, 2021, 03:57:40 AM
 #2

Is a master key in the old JBOK wallet simply a private key (with a different name) ie is it the same format as a private key?  I am trying to scan individual bytes to look for it as this wallet was not born encrypted....OR does it just generate a master key on the fly when you encrypt ?
It is not a private key nor is it stored in any way similar to a private key. The master key is generated when you encrypt. It is never stored unencrypted.

The thing to look for is a record that begins with mkey

rterwedo (OP)
Newbie
*
Offline Offline

Activity: 11
Merit: 2


View Profile
March 28, 2021, 11:40:37 AM
 #3

Is a master key in the old JBOK wallet simply a private key (with a different name) ie is it the same format as a private key?  I am trying to scan individual bytes to look for it as this wallet was not born encrypted....OR does it just generate a master key on the fly when you encrypt ?
It is not a private key nor is it stored in any way similar to a private key. The master key is generated when you encrypt. It is never stored unencrypted.

The thing to look for is a record that begins with mkey

Thanks - yes I have that.  I was investigating the encryption bug on 0.4.  It stored keys in plaintext (even for encrypted wallets) in the wallet.dat, logs and __db00X files per Gavin here:  https://bitcointalk.org/index.php?topic=51474.msg616068#msg616068

We have had success finding them in the wallet.dat however the logs and __db files have been a bit more difficult to process.

I was wondering if the master key got mixed up in this db issue as well.   It would provide an alternate means of unlocking the private keys as in my case half the wallet was floating around in plaintext but my addr with coins on it happened to be in the other half.  =)
 
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!