Bitcoin Forum
May 04, 2024, 04:47:14 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Do the “wallet.dat” hashes have salts?  (Read 192 times)
MA40 (OP)
Hero Member
*****
Offline Offline

Activity: 785
Merit: 524


--- I ❤ Ƀ ---


View Profile WWW
November 22, 2020, 07:19:33 AM
 #1

Hello.

The password hashes of the encrypted “wallet.dat” do they have salts?

Can they be extrated from the file?

Greetings.

¿Qué sucedería si se enfrentara una fuerza imparable contra un muro inamovible?
ChessFaucet.com - Gana bitcoins jugando al ajedrez contra el ordenador. ♟♟♜♞♝♛♚♝♞♜♟♟
⚡ Lightning Address: MA40@coinos.io
Every time a block is mined, a certain amount of BTC (called the subsidy) is created out of thin air and given to the miner. The subsidy halves every four years and will reach 0 in about 130 years.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
NotATether
Legendary
*
Offline Offline

Activity: 1596
Merit: 6727


bitcoincleanup.com / bitmixlist.org


View Profile WWW
November 22, 2020, 10:48:18 AM
Last edit: November 22, 2020, 11:05:31 AM by NotATether
Merited by ranochigo (2), ABCbits (2), Pmalek (1)
 #2

The wallet.dat password is not salted. It is used to create an AES256 key that encrypts the private keys in the wallet file.

I assume you are referring to Bitcoin Core wallet.dat files.

EDIT: I found the part of the source code that creates the AES256 encryption key (it is a CMasterKey class) and it generates an 8-byte random salt which is hashed with the password using SHA512-HMAC to make the master AES256 key:

https://github.com/bitcoin/bitcoin/blob/80e32e120ee4ba7e5b458338682cf1130964218f/src/wallet/wallet.cpp#L594

I don't think there is a way to extract it from the wallet.dat.

~

Next time include the source for your answer, it is pasted from Pieter Wuille's answer at https://bitcoin.stackexchange.com/questions/1713/how-does-the-bitcoin-client-encrypt-the-wallet-dat-file, and it references a very old version of Core.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
andytoshi
Full Member
***
Offline Offline

Activity: 179
Merit: 151

-


View Profile
November 25, 2020, 10:03:06 PM
 #3

Unless you have specific information to the contrary, I'd assume the Bitcoin Core repo is more accurate than the wiki, regardless of timestamps.
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!