Author

Topic: dump keys from protobuf format [solved] (Read 1205 times)

legendary
Activity: 1456
Merit: 1081
I may write code in exchange for bitcoins.
April 06, 2015, 02:14:56 AM
#3
This is kinda like a conversation with myself, but I'm posting here as I make progress for posterity as I saw many queries like this on google but no easy answers.

It turns out you *can* very easily export your private keys from a protobuf wallet using the wallet-tool from bitcoinj (no need to build your own app).  You say:

$ ./wallet-tool dump --dump-privkeys --wallet=/path/to/protobufwallet

and you'll see a keys block in the output.  Now, the last step in my particular journey is to conver the hex-dumped keys to bitcoinbase58.  But that's another topic so I'm locking this one (solved and closed).
legendary
Activity: 1456
Merit: 1081
I may write code in exchange for bitcoins.
April 06, 2015, 01:07:51 AM
#2
Actually, it looks like I may be able to use the "wallet-tool" program that comes with bitcoinj to do this job.  I'm currently playing around with that as a first step rather than trying to reinvent a rather complex wheel.
legendary
Activity: 1456
Merit: 1081
I may write code in exchange for bitcoins.
April 06, 2015, 12:20:40 AM
#1
Hi folks,

I've got a backup from my Bitcoin Wallet for Android (Andreas S.) and I've decrypted it using openssl.  So, because of some changes to how Bitcoin Wallet works, I was surprised not to find a plain text file, but instead I have a protobuf file.  What I want to do is export the private keys.  I understand that if I dig around in bitcoinj I can apprantly "write a small app" do to do this ().  But, given that Java isn't my favorite language, I'll probably take way longer than I should to do this and given that someone must have already solved the problem, I figure it's worth asking here:

Does anyone have any recommendations for getting this done (preferably with GNU/Linux command line tools) quickly?  Or more quickly than writing my own Java app?  Looking for tips on speeding this up for myself.  To give an idea of where I'm starting from if I go the Java rout, I understand the concept that I will need to make a class and make a static main and have my main open my file and then run some static methods somewhere in the guts of the bitcoinj library on my file.  So you can see there's a lot of detail I'm going to have to go searching for.  Can you guys speed me up?
Jump to: