Bitcoin Forum
May 25, 2019, 08:09:05 PM *
News: Latest Bitcoin Core release: 0.18.0 [Torrent] (New!)
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Get private key from bitcoin.com Windows wallet  (Read 102 times)
tizz
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
March 05, 2019, 05:40:29 PM
 #1

Hello, is any way to get private key from bitcoin.com Windows wallet?

If I export BTC wallet with private key to file, I get this aes.json file

Quote
{"iv":"9s■■■■■■■■=","v":1,"iter":10000,"ks":128,"ts":64,"mode":"ccm","adata":"","cipher":"aes","salt":"m■■■■■■v=","ct":"IxE■sfGkvW9ovbN5CVi1mX/b5P68+0yUcp5skiftZR
GqpfXoXz2p/niTLmm8iaIz+w+ojqNm7cU2VVlL/JP0AMNmfCx53QZWQrBl0JGjqW■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■vvINyatVLA9TN9gvlpEQC
omA4hoLAPNu2uHN86K0kXbs9xOVWwlDX1KKjtvBR0FtMKUbqKwMf2mncaclSZ06VPnsEmK3Qk1re9ZP JILPsiL8voJMfxOKNQDS8XIx+i666pNEWEa5Q09yivVYWfmyMK3f4F3Bucf2
pnuahWTxFfYJidM7NT6UGH52oM/eVlHxLIPwYweAtLTfRlaQKHHKTuDulHPgxH85■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■vvvv+q3UaCEnAvK3agHY6jJ4G7S+Y9IAcXNgl0cEjmaA+V
tQqOP9eBQe4PA/C+G46seLcxYzjzJDdDeHRraNyfZ/IqDmyJo7AvUVrTYLDhBN3X+E/keg6GcjfuadGVYdBHdCOAICuskXcLIlV3eR7kCSSUs/Fdo6UcCRIS/IWnIrZMuOImEvv8YpOj7OU
dgNBqoLe8aSkggVsCO8tmMiTr6vnVaYNcMMt25OI8qST6/WC4zST6o7u1+NXfLkq■■■■■■■■■■■■■■■■■■■■■■■■■■vSvCzSwAqoJ6vIGAam6EOaLLnYfMMkhLrq0jZDvn3bNg0zI9hMC8
nmsONz/w+rkXDU+z8RMZuzs4m7sXN8mdRCZG7iwQvZM5QNMVXuAIqEIluHaNpWiHUKXIP0cuQs7y9a4KyuPagXjyEnWVotRotcCaVM+lCLgNPlqSVnxuNc1Knl25hQCZFQiSegdRy72
hXPKIr3xW9MGsjX6jFa+QMJaqA1ZyZ63N3jfChsD4HbP1uGJ8Z8M3LQAJYHhKPxmj3FBiJLZFQCozlTTiaLFdxMnwu/rZZY9/hnYpteBdSJMHkst54lYBJxjcPqDNjqIOji5HJFcNl36eiFp5HYC
QhVgjLW5A44o395O8bE1sMWdZkzt8+C4ahCtpNpKng+wpas93uvQXgvWJJGIVvaApS5si7BzZ6mINv/v■■■■■■■■■■■■■■■■■■■■■■■■■■■■■vHAOdNqNG2MmCoBzmUksEtueLAXjrjB
mF7VQRQQjukAfLBjiMWaGrPZ7uYXGK/HbM1DpKuMYFWb7N35gx59w9sC4IdPkpdCykHR9bDL6RpVk7eOH4kwtqSn9Bjw5W/Omoi03au867N/WQDBlJUBT9eR5SJ/S7WBD0aaaSAMO
rN6H5IpAeT4+q47mZKXu6rXRFDjhwO+713G6■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■va/QULAz+ca9OAi1ofSQqjZmGhMAQ/4kjOpw="}


Is any way to decode only private key?

Thanks for help.
PLAY OVER 3000 GAMES
LIGHTNING FAST WITHDRAWALS
PLAY NOW
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
BitMaxz
Legendary
*
Offline Offline

Activity: 1442
Merit: 1174


Bitmain miners is getting worst.


View Profile WWW
March 05, 2019, 06:17:47 PM
Last edit: March 05, 2019, 09:38:07 PM by BitMaxz
 #2

It seems that you need some decryption tool in order to import the backup to other wallets that support aes.json file.
I heard that you can export this backup in blockchain.info.

I found some source of how they decrypt the backup aes.json and import to another wallet.

Check this links below.

- https://bitcoin.stackexchange.com/questions/3034/how-to-restore-locally-a-mywallet-backup
- https://www.reddit.com/r/Bitcoin/comments/7xqlpk/get_private_key_from_walletaesjson_file/

I found other posts from here on the forum

- import private keys of wallet.aes.json to bitcoin-qt

tizz
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
March 05, 2019, 08:17:37 PM
 #3

Thank you, but Multibit is no longer supported. And blockchain.info wallet aes.json file are not combatible with mine bitcoin.com wallet file.
BitMaxz
Legendary
*
Offline Offline

Activity: 1442
Merit: 1174


Bitmain miners is getting worst.


View Profile WWW
March 05, 2019, 09:46:31 PM
Last edit: March 05, 2019, 10:15:42 PM by BitMaxz
 #4

Thank you, but Multibit is no longer supported. And blockchain.info wallet aes.json file are not combatible with mine bitcoin.com wallet file.
Did you use some decryption tool from the method above to extract the private keys?

Well, if it doesn't work the only solution that I found is to contact their support of bitcoin.com as suggested from here https://forum.bitcoin.com/beginners-help/how-to-export-bitcoin-com-wallet-to-electrum-t60573.html

HCP
Legendary
*
Offline Offline

Activity: 980
Merit: 1508

<insert witty quote here>


View Profile
March 06, 2019, 06:12:49 AM
Merited by suchmoon (4), bones261 (3), BitMaxz (1)
 #5

Hello, is any way to get private key from bitcoin.com Windows wallet?
If I export BTC wallet with private key to file, I get this aes.json file
Is any way to decode only private key?
Yes... you can decrypt the wallet information. See detailed explanation below.


Did you use some decryption tool from the method above to extract the private keys?
Unfortunately, I don't think the old decryption tool (made for blockchain.info and/or multibit JSON formats) will work... it is a completely different format for the export file... and it is actually using a slightly different encryption mode (AES-256-CCM instead of AES-256-CBC) as well... Undecided




However, all is not lost! Wink

I did some digging... and found that the BitGo wallet uses this same format... and that the BitGo API supports decrypting the wallet file...

So, off to the BitGo GitHub I went... and discovered that the bitgo.decrypt() call is ACTUALLY just calling the decrypt method in "SJCL" (Stanford Javascript Crypto Library)!
return sjcl.decrypt(params.password, params.input);

That makes our job sooooooo much easier... we can just import SJCL, then pass it the export password and export data! Cheesy



So, how do we do that? Huh

Well, firstly I created a test export from bitcoin.com wallet for windows... NOTE: Password is: 123
Code:
{"iv":"aE6b04cM1BcUMBesRei9+Q==","v":1,"iter":10000,"ks":128,"ts":64,"mode":"ccm","adata":"","cipher":"aes","salt":"uSmPalXNcnA=","ct":"g5S6gbETdClu1e4hlcfmYPg04W367A0OpDSL3jYKEs76B5mXVnRBRY/VmodbHyhwaNvfc/aI1cjtqc57QJ3OLmFXyU0Y+XBJejAsIqLIIRXN5Ad42k38SmBy9j9XiTeoJGlLwtbVnExGlhovT0Yb7UiELHPaAxQUsvABC3Eo+tk86AcLEYhQWRuyCcjrJR+hHOz0iMoihV6WMgp7j3QYpD4arlDLDcwx9NtXuiUEYETTOX+ByQuYJVSuLlSw23WVzTtkqb+l3YAN0+zweS/JRdQGL/ep77R+xCtJLMnWcqRjLh2XVpzhkFCLbnVhVPDpV6CCg8OD5o9lB3GncDHHACU0f1FhrqNH/7lF6X5KnRlLPCys1BUuWHzaxwb5s5Nk7QXzFNLnAUw7tjgV2oGOhb/4NgBhELESzvv2eqOe1IUvPT1HOt3npZGYwiBIQgBu2CRzYlLIJ4DUKtrNFQjqg038ugbOq2hSo/QzqyLE/mP2Z0qMhTY6DBfiw1t8tfwGcisS52ZwOl8bnGknnlWIf97dtx2e55D69zaNnykzmjrTkJ4boqz0hS4Wlpu2Wzg0rOlOzFB0+4cBCwVSZYhfPTzxUYPkcxq3JfyhmZo3XYzYFOXAWvqccIpVXiwYych69gPiOEABGxeL5fB4g/C06WiSoXSrlWTMjm1+7gEYdrAyHDdRwDtuO81LpT7PE6hfEI9l3x5L68df4dHhZhMuaoTAz+9iKUGZSNmmrL8qOwIjfdnxq9PX1yFU136/V0sMvYN9GXwALEUk5TZDMMK6/+wBlCDYzucnw7nW6kZzZi2B/F0NsCWp4tVI8g1gkLA3iXQRrrAqha3h3C3jlVPWgU5bd65YROqM/FHjpClDTJmSexnXm1zPDOEiWLU1p2s4oD4RBU5XozdSj2gjJs+fhfmo+pDLraX+i6RN2v40iLGuhtv2Oze6gxpMvEYdOJyuFNn15BZMVHYwHZMTHVJo925+JLUzzg30ryUV2hNIfUov18j0tihsErkoWmjNfg/OnvvUVVQJBwIbz01LwpYbQ12jMT5X+ORKUKgjhUAwUlFxf5A4FX1lM0SFyduEkIWnDEllppbzIXNYofMW8XTydt3gWUer+iljxUmDCX8LFZJCGQ93Xx7OsXYTP/VRLzqcHrxIieKDZ1SCPYoZsLj2pqZqX62yl4oRn028GmqsrwxPbFe9xS8VzaU1kGG0Ykj3kWQyq1/U8eODiIPto+/15QN3NcH0WFU2zJFJi2JC41nTiltn7etkLXfu+zaEv5zEEcGxK7EFVxv1m9uxtrFbAtzr/HwNqP46rQxUt9Kl30RF/qlsI30g/unsg+AFmN+zkF5PoM41U3osdbpwN+3ZrsbiMk0wxL678gEVz8/TC5AzeNRjj2nKGILdn67xaCNBGrZ0EF/t6q2E4QsJtUMBOwyvbyABebT7ZgI5kF6iTIi6NlGw7CeY0MFI9ZQOysoaufuc4XyCn3zXlq6EDtw15aVUDiHngrUYSsJKWeG6tAa2SSl/9SvBIXC/eZ6r8Cb39f5FwfIH4igPL3w7A08wAlny6Gpq3uoWQ5Q8Mtg34afWkdW/IQ2SV4rMv7e6kAbvnTvtFuZopcMfCYGpyfHN/vMktHOk/inaVMqlx1jrHJGkbVjeGTOElVQf70OdURa6s3qCMeaqJGuntVjJwRt4oD+o1pyda12FlajbZ7weZIVTd6XDIGJNUeYlJgqF3hav/tzTyB0sUnfsUX4+1E8cBBVzeW3rOM0cxCQ+T3uh0UntJLOXBBVGWK27hL0BTiMihypwMbaAkVC+se6d1EO6G1vfwLkU9UBMoIDmek454w=="}


Then, based on what I learnt from Abdussamad regarding running javascript directly in the browser... I opened up the javascript console in Chrome (press F12)... and imported the SJCL library:
Code:
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = 'https://cdnjs.cloudflare.com/ajax/libs/sjcl/1.0.8/sjcl.min.js';
document.head.appendChild(script);


Then imported the contents of wallet.aes.json into a variable called "encryptedString":
Code:
var encryptedString = '{"iv":"a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zg30ryUV2hNIfUov18j0tihsErkoWmjNfg/OnvvUVVQJBwIbz01LwpYbQ12jMT5X+ORKUKgjhUAwUlFxf5A4FX1lM0SFyduEkIWnDEllppbzIXNYofMW8XTydt3gWUer+iljxUmDCX8LFZJCGQ93Xx7OsXYTP/VRLzqcHrxIieKDZ1SCPYoZsLj2pqZqX62yl4oRn028GmqsrwxPbFe9xS8VzaU1kGG0Ykj3kWQyq1/U8eODiIPto+/15QN3NcH0WFU2zJFJi2JC41nTiltn7etkLXfu+zaEv5zEEcGxK7EFVxv1m9uxtrFbAtzr/HwNqP46rQxUt9Kl30RF/qlsI30g/unsg+AFmN+zkF5PoM41U3osdbpwN+3ZrsbiMk0wxL678gEVz8/TC5AzeNRjj2nKGILdn67xaCNBGrZ0EF/t6q2E4QsJtUMBOwyvbyABebT7ZgI5kF6iTIi6NlGw7CeY0MFI9ZQOysoaufuc4XyCn3zXlq6EDtw15aVUDiHngrUYSsJKWeG6tAa2SSl/9SvBIXC/eZ6r8Cb39f5FwfIH4igPL3w7A08wAlny6Gpq3uoWQ5Q8Mtg34afWkdW/IQ2SV4rMv7e6kAbvnTvtFuZopcMfCYGpyfHN/vMktHOk/inaVMqlx1jrHJGkbVjeGTOElVQf70OdURa6s3qCMeaqJGuntVjJwRt4oD+o1pyda12FlajbZ7weZIVTd6XDIGJNUeYlJgqF3hav/tzTyB0sUnfsUX4+1E8cBBVzeW3rOM0cxCQ+T3uh0UntJLOXBBVGWK27hL0BTiMihypwMbaAkVC+se6d1EO6G1vfwLkU9UBMoIDmek454w=="}';


Then executed the .decrypt() method, passing in the export file password (password used was 123) and the "encryptedString" variable that we just created:
Code:
var decryptedString = sjcl.decrypt('123', encryptedString);
decryptedString.toString();


... et voilà!
Code:
"{"coin":"btc","network":"livenet","xPrivKey":"xprv9s21ZrQH143K4VZrA3w1qp44fNDNgeTNBKdt5f5MpBifWo78rbhP84w8qaTybdZsdmDFUExT2M4P4gxFDnEHCUq91AG1PjNXadWZPfvAEaf","xPubKey":"xpub6Bw8UNcpHwE6rWM6tQ1FQzvy5KX2vZeDfk3G49WFc19PSkuPKbRrbJSrJMRnJUQqopYKeQQgorpaUugvmEsnYbjgvojrdXUoJB5FU1vuCgc","requestPrivKey":"1755ea2209fa3a4e56b9f771de6db5088aaa82ae73aa3f34e9f3cb6fce30fa0a","requestPubKey":"0229d30db3ada53ee802eca52bf434ed25a4895610bf10535ebf1e88a63386e2db","copayerId":"f1d2eac1db62e2103e955d0bee7114cf0980de19a507f5c1a399378f0d8d47e2","publicKeyRing":[{"xPubKey":"xpub6Bw8UNcpHwE6rWM6tQ1FQzvy5KX2vZeDfk3G49WFc19PSkuPKbRrbJSrJMRnJUQqopYKeQQgorpaUugvmEsnYbjgvojrdXUoJB5FU1vuCgc","requestPubKey":"0229d30db3ada53ee802eca52bf434ed25a4895610bf10535ebf1e88a63386e2db"}],"walletId":"0d380f2b-f41e-4132-b614-dbd094903313","walletName":"My BTC Wallet","m":1,"n":1,"walletPrivKey":"f1a26f143543c9ef006c7b2a42d1cf576c25e8ce06dce0f496c4bd37e661b4a2","personalEncryptingKey":"XlgcaJ18PcxxSw9Ik2/YmQ==","sharedEncryptingKey":"JVkW3jRTA+b4Bja5srQv7Q==","copayerName":"me","mnemonic":"chronic indoor basket wrist urban base average peasant ensure park educate tower","entropySource":"00dfda1fc9a7fcda66898bb882de3ad6295c04c4e037b5efb070df3a60f1825b","mnemonicHasPassphrase":false,"derivationStrategy":"BIP44","account":0,"compliantDerivation":true,"addressType":"P2PKH","addressBook":[]}"


You can see it in action here:



As you can see, the decrypted file contains the xprv, xpub and also the 12 word mnemonic for the wallet... It's BIP39/BIP44 compatible, so you can use the mnemonic on Ian Coleman's Mnemonic Code Converter to get all your addresses/keys... or even import it into a BIP39-compatible wallet.

Note, this should also work in Firefox (press CTRL+SHIFT+K to open Javascript console)...

tizz
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
March 06, 2019, 07:45:56 AM
 #6

Thank you very much, it works great :-)
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!