0

How do I get my private key from this? I found an old file on one of my hard drives with a wallet address and something that looks like this (changed for obvious reasons).

What is this and how can I get my private key from it?

LZEuGNcDIJI5mRCATBouTmQgdpaycce0rDH/B//+w7v0hofB6+Apt0bepR8pUUxHEHAXHHAv7+67AHwh80Lx9g==

I tried this https://bitcoin.stackexchange.com/a/43438/105403. When I plug the WIF into bitaddress.org it's not matching my actual bitcoin address so I must be doing something wrong.

1
  • Hi, do you remember how you got this? Maybe which wallet you used? – Sosthène Apr 23 '20 at 16:57
1

The following using libbitcoin bitcoin-explorer (bx) piped command lines, see documentation to better understand the two piped examples below.

The 512 bit output below, leads me to believe the base64 encoded key is an HD key that already might have BIP 39 conversion and possibly BIP 39 passphrase applied.

1% echo -n LZEuGNcDIJI5mRCATBouTmQgdpaycce0rDH/B//+w7v0hofB6+Apt0bepR8pUUxHEHAXHHAv7+67AHwh80Lx9g== | bx base64-decode | bx base16-encode 2d912e18d7032092399910804c1a2e4e64207696b271c7b4ac31ff07fffec3bbf48687c1ebe029b746dea51f29514c471070171c702fefeebb007c21f342f1f6

Let's assume the path is the following Bitcoin path m/44'/0'/0'/0/0, then the compressed WIF key can be computed as follows:

2% echo -n LZEuGNcDIJI5mRCATBouTmQgdpaycce0rDH/B//+w7v0hofB6+Apt0bepR8pUUxHEHAXHHAv7+67AHwh80Lx9g== | bx base64-decode | bx base16-encode | bx hd-new -v 76066276 | bx hd-private -d -i 44 | bx hd-private -d -i 0 | bx hd-private -d -i 0 | bx hd-private -i 0 | bx hd-private -i 0 | bx hd-to-ec | sed 's/$/01/' | bx base58check-encode -v 128

L2Xa6v3zo12E813ssicXbjEeatdXa37J5532WwtdXYRzgzL9QSxw

The associated public address is as follows:

3% echo -n LZEuGNcDIJI5mRCATBouTmQgdpaycce0rDH/B//+w7v0hofB6+Apt0bepR8pUUxHEHAXHHAv7+67AHwh80Lx9g== | bx base64-decode | bx base16-encode | bx hd-new -v 76066276 | bx hd-private -d -i 44 | bx hd-private -d -i 0 | bx hd-private -d -i 0 | bx hd-private -i 0 | bx hd-private -i 0 | bx hd-to-ec | bx ec-to-public | bx ec-to-address -v 0

17Wnq9Nm5KcFtvhunSPN9WRTZxTUvkvri5

Your HD path path might be different.

0

You need to decode the base64 encoded string. After you've decoded it you will get the hex string that you could put into bitaddress.org to derive a WIF, or maybe it could be an HD seed.

<?php
$a = "LZEuGNcDIJI5mRCATBouTmQgdpaycce0rDH/B//+w7v0hofB6+Apt0bepR8pUUxHEHAXHHAv7+67AHwh80Lx9g==";
$b = base64_decode($a);
$c = bin2hex($b);

echo $c;
//returns 2d912e18d7032092399910804c1a2e4e64207696b271c7b4ac31ff07fffec3bbf48687c1ebe029b746dea51f29514c471070171c702fefeebb007c21f342f1f6

?>

Here's a fiddle: http://phpfiddle.org/lite/code/3d4v-m1uf

Hopefully this gets you started. As skaht points out it could be a bip44 derivation key, or bip32, or something else.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.