Author

Topic: Structure of a master key in old core wallet (Read 112 times)

newbie
Activity: 11
Merit: 2
March 28, 2021, 06: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://bitcointalksearch.org/topic/m.616068

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.  =)
 
staff
Activity: 3458
Merit: 6793
Just writing some code
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
newbie
Activity: 11
Merit: 2
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?
Jump to: