Bitcoin Forum

Other => Beginners & Help => Topic started by: azverev on February 17, 2021, 11:55:38 PM



Title: Decrypt private key - bitcoin
Post by: azverev on February 17, 2021, 11:55:38 PM
Hi, My wallet-backup.json looks like below. I remember my password. How to get proper private key? Please help.
{"keys":[{"addr":"<BTC address>","priv":"<97 lenght encrypted private key>",
"encryptionMode":"PKBDF2-SHA256","iterations":2000}],"salt":"<salt value>"}


Title: Re: Decrypt private key - bitcoin
Post by: bitmover on February 18, 2021, 03:35:40 AM
Hi, My wallet-backup.json looks like below. I remember my password. How to get proper private key? Please help.
{"keys":[{"addr":"<BTC address>","priv":"<97 lenght encrypted private key>",
"encryptionMode":"PKBDF2-SHA256","iterations":2000}],"salt":"<salt value>"}

Is this an old blockchain.info wallet?

If it is, you can try to insert your json here:
https://login.blockchain.com/wallet/import-wallet

If it is not a blockchain.info wallet, do not put it there.


Title: Re: Decrypt private key - bitcoin
Post by: NotATether on February 18, 2021, 04:22:58 AM
Is this an old blockchain.info wallet?

If it is, you can try to insert your json here:
https://login.blockchain.com/wallet/import-wallet

If it is not a blockchain.info wallet, do not put it there.

The private key is encrypted so if it's a blockchain wallet file then it ought to be one of those wallet.aes.json files that look like this:

{
  "ct" : "xyz",
  "iter" : 10000,
  "adata" : "",
  "salt" : "xyz",
  "cipher" : "aes",
  "ks" : 128,
  "v" : 1,
  "mode" : "ccm",
  "iv" : "xyz",
  "ts" : 64
}

Which does not match the format of this file and so it's not a blockchain.com wallet.



Anyway it looks like it's doing 2000 rounds of PBKDF2-SHA256 (or maybe PBKDF2 with 2000 rounds of SHA256 hashing? ???) to encrypt the private key with a password, so maybe there's a script or utility that can decrypt this private key without the wallet software.


Title: Re: Decrypt private key - bitcoin
Post by: pooya87 on February 18, 2021, 04:46:20 AM
2000 rounds of PBKDF2-SHA256 (or maybe PBKDF2 with 2000 rounds of SHA256 hashing? ???)
Key derivation functions such as PBKDF2 all have some variables that decide the strength of the derived key. PBKDF2 uses the iteration count to do it and under the hood it repeats is main function 2000 times which consists of computing HMACSHA functions with the given SHA2 hash algorithm.