Bitcoin Forum
April 28, 2024, 05:26:20 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Master Key Key  (Read 196 times)
khangmartin (OP)
Newbie
*
Offline Offline

Activity: 7
Merit: 1


View Profile
September 16, 2019, 03:49:30 AM
Merited by HeRetiK (1)
 #1

Following path in source code for the creation of master key in crypter.cpp/.h. The program comment states Wallet Private Keys are encrypted with double sha 256 of public key as the IV and the master key's key as the encryption key. Is the encryption key the variable vchCryptedKey which is a part of the class CMasterKey or is it chKey from private class CCrypter? A second question since the IV is stored in the wallet.dat file, it is safe to assume this encryption key is stored in wallet.dat also? Please advise if I am incorrect? Thanks.
1714325180
Hero Member
*
Offline Offline

Posts: 1714325180

View Profile Personal Message (Offline)

Ignore
1714325180
Reply with quote  #2

1714325180
Report to moderator
1714325180
Hero Member
*
Offline Offline

Posts: 1714325180

View Profile Personal Message (Offline)

Ignore
1714325180
Reply with quote  #2

1714325180
Report to moderator
1714325180
Hero Member
*
Offline Offline

Posts: 1714325180

View Profile Personal Message (Offline)

Ignore
1714325180
Reply with quote  #2

1714325180
Report to moderator
"Your bitcoin is secured in a way that is physically impossible for others to access, no matter for what reason, no matter how good the excuse, no matter a majority of miners, no matter what." -- Greg Maxwell
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714325180
Hero Member
*
Offline Offline

Posts: 1714325180

View Profile Personal Message (Offline)

Ignore
1714325180
Reply with quote  #2

1714325180
Report to moderator
1714325180
Hero Member
*
Offline Offline

Posts: 1714325180

View Profile Personal Message (Offline)

Ignore
1714325180
Reply with quote  #2

1714325180
Report to moderator
1714325180
Hero Member
*
Offline Offline

Posts: 1714325180

View Profile Personal Message (Offline)

Ignore
1714325180
Reply with quote  #2

1714325180
Report to moderator
Lauda
Legendary
*
Offline Offline

Activity: 2674
Merit: 2965


Terminated.


View Profile WWW
September 16, 2019, 03:33:21 PM
 #2

How about you quote and/or include a link to the code that you are unsure about? Nobody should waste their time trying to find it. Wink

"The Times 03/Jan/2009 Chancellor on brink of second bailout for banks"
😼 Bitcoin Core (onion)
achow101
Moderator
Legendary
*
Offline Offline

Activity: 3374
Merit: 6552


Just writing some code


View Profile WWW
September 16, 2019, 03:53:12 PM
Merited by joniboini (2)
 #3

Within CMasterKey, vchCryptedKey is the encrypted master encryption key. This key is decrypted using a key derived from the user's passphrase (with key stretching parameters specified withing the CMasterKey. The decrypted encryption key is now a CKeyingMaterial and stored as vMasterKey in CWallet.

Encryption keys (along with some metadata) are stored in the wallet.dat file. They are encrypted by a key derived from the user's passphrase.

khangmartin (OP)
Newbie
*
Offline Offline

Activity: 7
Merit: 1


View Profile
September 16, 2019, 05:41:18 PM
 #4

Thanks for the answers to my questions. I have one final question on this topic. When the software client loads the wallet, all variables (majority) contained in wallet.dat file load into program memory and are updated as required, is this a fair assumption?
achow101
Moderator
Legendary
*
Offline Offline

Activity: 3374
Merit: 6552


Just writing some code


View Profile WWW
September 16, 2019, 05:42:13 PM
 #5

When the software client loads the wallet, all variables (majority) contained in wallet.dat file load into program memory and are updated as required, is this a fair assumption?
Yes.

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!