Bitcoin Forum
May 28, 2024, 03:16:11 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: how to see my private key bye decrypted wallet.dat  (Read 148 times)
Allymos (OP)
Newbie
*
Offline Offline

Activity: 13
Merit: 0


View Profile
May 04, 2021, 06:09:35 AM
 #1

How to decrypted my wallet.dat (Yes, I know the password) so i can see my private key? if anyone can help there is 1 LTC for them
NeuroticFish
Legendary
*
Offline Offline

Activity: 3682
Merit: 6416


Looking for campaign manager? Contact icopress!


View Profile
May 04, 2021, 07:03:09 AM
 #2

How to decrypted my wallet.dat (Yes, I know the password) so i can see my private key? if anyone can help there is 1 LTC for them

wallet.dat contains a lot of addresses and their private keys.

If you also know the address for which you want the private key, then it's simple:

1. Go to Bitcoin-qt -> help -> about bitcoin -> console tab
2.
Code:
walletpassphrase "your password" 600
dumpprivkey "your address"

I'll add that if you do this and you have malware on that computer, you'll probably lose your money.

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
Allymos (OP)
Newbie
*
Offline Offline

Activity: 13
Merit: 0


View Profile
May 04, 2021, 01:06:30 PM
 #3

cant load my wallet which is why i'm trying to get the private key this way, the wallet is corrupted.  i have the public address that the coins been sent and about the ''malware on that computer, you'll probably lose your money'' i'll be doing it off line so i should be good but thank you for the heads up
PawGo
Legendary
*
Offline Offline

Activity: 952
Merit: 1367


View Profile
May 04, 2021, 02:48:37 PM
 #4

cant load my wallet which is why i'm trying to get the private key this way, the wallet is corrupted.  i have the public address that the coins been sent and about the ''malware on that computer, you'll probably lose your money'' i'll be doing it off line so i should be good but thank you for the heads up


If you use Windows, just ignore the warning. Or install Virtual box https://www.virtualbox.org/ and then any Linux from image (https://www.linuxlookup.com/linux_iso) and Linux version of litecoin wallet https://litecoin.org/#download
NotATether
Legendary
*
Offline Offline

Activity: 1610
Merit: 6813


bitcoincleanup.com / bitmixlist.org


View Profile WWW
May 04, 2021, 06:33:10 PM
 #5

Going offline on a computer which may have malware is not safe enough because what if it collects the keys while you're offline and then transmits them the next time you go online?

If you use Windows, just ignore the warning. Or install Virtual box https://www.virtualbox.org/ and then any Linux from image (https://www.linuxlookup.com/linux_iso) and Linux version of litecoin wallet https://litecoin.org/#download

Considering that the private keys eventually must go out of the virtual machine to the host this isn't safe either. Safest option is to burn a Linux Live ISO onto a DVD or a USB and boot from that, installing bitcoin core and pywallet and other stuff you may need there (to a hard disk of course, because the root filesystem on a Live ISO is read-only).

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4316

<insert witty quote here>


View Profile
May 04, 2021, 08:07:45 PM
 #6

cant load my wallet which is why i'm trying to get the private key this way, the wallet is corrupted.  i have the public address that the coins been sent and about the ''malware on that computer, you'll probably lose your money'' i'll be doing it off line so i should be good but thank you for the heads up
Have you tried the salvage feature of the "wallet-tool" that comes with newer versions of Bitcoin Core? Not sure if this is actually available in Litecoin Core as yet. In which case you'd need to use the -salvagewallet option when starting Litecoin Core and see if that helps.

Alternatively, you can use PyWallet to try and recover data from Litecoin wallet.dat's... you just need to use the --otherversion argument and provide the appropriate version... which for litecoin would be 48.


As always, only work with copies of the wallet file!

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
Allymos (OP)
Newbie
*
Offline Offline

Activity: 13
Merit: 0


View Profile
May 04, 2021, 10:07:07 PM
 #7

i already tried salvagewallet, and also PyWallet to try and recover wallet but no luck, its not litecoin by the way its another altcoin. i know the Private key is in inside the wallet.dat file if i can decrypted the wallet.dat i should be able to fix it but i dont know how decrypted it.
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4316

<insert witty quote here>


View Profile
May 07, 2021, 07:16:00 AM
 #8

You'd need to understand how the wallet.dat encryption works then... it's not like the entire wallet is actually encrypted (if it was, you wouldn't even be able to open the wallet.dat in a "Core" application and see the addresses/transaction history etc without entering your passphrase).

Instead, what happens is that it is just the private key data that is stored encrypted. As per the info here: https://en.bitcoin.it/wiki/Wallet_encryption
Wallet encryption uses AES-256-CBC to encrypt only the private keys that are held in a wallet. The keys are encrypted with a master key which is entirely random. This master key is then encrypted with AES-256-CBC with a key derived from the passphrase using SHA-512 and OpenSSL's EVP_BytesToKey and a dynamic number of rounds determined by the speed of the machine which does the initial encryption (and is updated based on the speed of a computer which does a subsequent passphrase change).

So, the encrypted private key and your passphrase alone are not enough to decrypt the private key... you actually have to decrypt the "master" key first... then use that master key to decrypt your individual private keys.

There has been some discussion about this on another thread: https://bitcointalk.org/index.php?topic=5333765.msg56938441#msg56938441

I've been able to get as far as extracting the encrypted master key and getting the IV, Salt, iteration count etc... but I'm not sure about how to actually decrypt the master key and then decrypt the individual private keys at this point.

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
Allymos (OP)
Newbie
*
Offline Offline

Activity: 13
Merit: 0


View Profile
May 07, 2021, 06:32:07 PM
 #9

HCP Thank you that was a helpful comment/thread. My issues is that the wallet in question is corrupt and i'm unable to open it i have tried a number of things to fix it but so far no luck, i understand there is 1 master private key and a number of private keys and that is what i'm trying to extract from the wallet.dat file.
If you or other can help me i would be grateful and be willing to send 1 LTC for the time wasted.

Thank you
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4316

<insert witty quote here>


View Profile
May 08, 2021, 07:34:23 AM
 #10

If the scripts like PyWallet or core-decrypt aren't able to read the file... and the db_dump utility doesn't work... then you're probably going to have to try and extract the hex bytes manually using a hexeditor and searching through the wallet.dat for the various markers (ie. mkey and ckey etc).

Honestly, that's going to be a giant P.I.T.A. Undecided It's not impossible... it'll just be a ton of work... and depending on how corrupt the file is and/or how exactly it was corrupted, it might actually be impossible to decrypt the individual keys ie. if the mkey is corrupt, you're basically stuffed Undecided

Unfortunately, as I haven't yet figured out how to get from encrypted mkey -> unencrypted mkey -> unencrypted ckeys etc... I am not going to be able to assist much further at this point in time.

Hopefully someone else with more knowledge of the technical details of decrypting the mkey will be able to assist.

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
BASE16
Member
**
Offline Offline

Activity: 180
Merit: 38


View Profile
June 07, 2021, 05:48:29 PM
 #11

If db_dump does not work you can also try
Code:
hexdump 'wallet.dat' -C > wallet.hex

And then open in notepad and use search and find 'mkey' and 'ckey'
If the wallet is not corrupt it should be in there.
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!