Bitcoin Forum
November 09, 2024, 08:54:17 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How to decrypt encrypted private key with password from corrupted wallet  (Read 132 times)
pennyflipper101 (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 4


View Profile
October 31, 2023, 06:43:38 AM
Merited by o_e_l_e_o (4)
 #1

I have a 94 digit encrypted mkey that I obtained from my corrupted wallet.dat file I also have the password the salt and iterations. Using the password I’m unable to send bitcoins but I was wondering if I was able to decrypt the encrypted mkey using my password, salt and iterations in order to decrypt my private key and have it in wallet import format
achow101
Moderator
Legendary
*
Offline Offline

Activity: 3542
Merit: 6886


Just writing some code


View Profile WWW
October 31, 2023, 06:43:23 PM
Merited by LoyceV (4), o_e_l_e_o (4), ABCbits (2), BitMaxz (1)
 #2

mkey is not a private key. It is the encryption key that was used to encrypt all of the actual private keys in the wallet. This encryption key is itself encrypted with your password. Decrypting it won't get you anything useful unless you have the rest of the wallet.dat file and all of its ckey records.

pennyflipper101 (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 4


View Profile
November 01, 2023, 01:42:41 AM
 #3

mkey is not a private key. It is the encryption key that was used to encrypt all of the actual private keys in the wallet. This encryption key is itself encrypted with your password. Decrypting it won't get you anything useful unless you have the rest of the wallet.dat file and all of its ckey records.
oh ok well I have a py wallet file with a bunch of keys, how would I find the one I need to decrypt with the mkey as well as the salt the iterations and my password.
achow101
Moderator
Legendary
*
Offline Offline

Activity: 3542
Merit: 6886


Just writing some code


View Profile WWW
November 01, 2023, 02:27:04 AM
 #4

oh ok well I have a py wallet file with a bunch of keys, how would I find the one I need to decrypt with the mkey as well as the salt the iterations and my password.
All of them. All of the keys in the wallet should be encrypted with the same mkey.

Note that a wallet contains multiple keys, not just one key. You need to decrypt them all in order to spend all of your funds as each key corresponds to a different address in the wallet.

pennyflipper101 (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 4


View Profile
November 01, 2023, 02:43:43 AM
 #5

How would I go about to decrypt the keys I’m familiar with python but I’m just making sure I get all the things together I might need to decrypt.
BitMaxz
Legendary
*
Offline Offline

Activity: 3430
Merit: 3167


Playbet.io - Crypto Casino and Sportsbook


View Profile WWW
November 01, 2023, 12:11:09 PM
Last edit: November 01, 2023, 12:45:36 PM by BitMaxz
 #6

How would I go about to decrypt the keys I’m familiar with python but I’m just making sure I get all the things together I might need to decrypt.
Do you still have the wallet.dat file?
If you know the password why not try to salvage the wallet.dat file?

If Salvage does not work you can try Pywallet check the guide below

- https://bitcointalk.org/index.php?topic=38004.0
- https://www.devtome.com/doku.php?id=pywallet

███████████████
█████████████████████
██████▄▄███████████████
██████▐████▄▄████████████
██████▐██▀▀▀██▄▄█████████
████████▌█████▀██▄▄██████
██████████████████▌█████
█████████████▀▄██▀▀██████
██████▐██▄▄█▌███████████
██████▐████▀█████████████
██████▀▀███████████████
█████████████████████
███████████████

.... ..Playbet.io..Casino & Sportsbook.....Grab up to  BTC + 800 Free Spins........
████████████████████████████████████████
██████████████████████████████████████████████
██████▄▄████████████████████████████████████████
██████▐████▄▄█████████████████████████████████████
██████▐██▀▀▀██▄▄██████████████████████████████████
████████▌█████▀██▄▄█████▄███▄███▄███▄█████████████
██████████████████▌████▀░░██▌██▄▄▄██████████████
█████████████▀▄██▀▀█████▄░░██▌██▄░░▄▄████▄███████
██████▐██▄▄█▌██████████▀███▀███▀███▀███▀█████████
██████▐████▀██████████████████████████████████████
██████▀▀████████████████████████████████████████
██████████████████████████████████████████████
████████████████████████████████████████
pennyflipper101 (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 4


View Profile
November 01, 2023, 02:18:45 PM
 #7

I used pywallet are the keys labeled sec the private keys that I would use to import the bitcoin to a new wallet
whanau
Member
**
Offline Offline

Activity: 119
Merit: 36


View Profile
November 02, 2023, 01:38:34 AM
 #8

How would I go about to decrypt the keys I’m familiar with python but I’m just making sure I get all the things together I might need to decrypt.

There are various programs available that will provide all the information from the wallet. What you want is an output something like this:

mkey was found @   45016 : 0xafd8
mkey offset - 72   44944 : 0xaf90

Encrypted mkey: 7784b2306edd18536689f31e0e08f49d02fac009c7298c142c27aaf52a10b984bb578f124cb1ed0 854fe460f16aa9cf4

IV: 02fac009c7298c142c27aaf52a10b984

CT: bb578f124cb1ed0854fe460f16aa9cf4

salt: 1dabf1816b34e175

nDerivations: 62719

encrypted ckey: e8a4f5010e1ccee267592ec9d488db13ea19985ea5e9bffa5262fd0d39fae0c637c338d4df92a57 76709d489c8f03f34
public key    : 02ecfa1b5b5d513c136cd5926308ed949debdcb5e1007f66dc53eef2f1c24775cf
public address: 14Xe8m1NwHnpcpdqDZV8psTnKQg2NH2Xgr

encrypted ckey: c6663ccd1d880386f5bfc4e5049dab541c844ec5a12fcf90d34238636e2af97d9aca5dcb6eaa226 e80483b8adc1e8368
public key    : 02ec04626fb4c25314c7b82a7b0fa4ef2867ed3b57bc2558c4bba251485a1d2517
public address: 1Jxtg991gSidyd1UMMBM9oE5nR7vCEqCeG

and lots more...

Given the age of the wallet, you need to check all the uncompressed public addresses to see which one holds the funds. Once you know that, IF you have the password, you decrypt the Mkey and use the result to decrypt the associated ckey which is the 'spend' key
Good luck

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!