Bitcoin Forum
May 04, 2024, 11:54:48 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Master Key Key  (Read 197 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.
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.
1714823688
Hero Member
*
Offline Offline

Posts: 1714823688

View Profile Personal Message (Offline)

Ignore
1714823688
Reply with quote  #2

1714823688
Report to moderator
1714823688
Hero Member
*
Offline Offline

Posts: 1714823688

View Profile Personal Message (Offline)

Ignore
1714823688
Reply with quote  #2

1714823688
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: 3388
Merit: 6581


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: 3388
Merit: 6581


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!