Author

Topic: convert hex keys to WIF [solved] (Read 1530 times)

legendary
Activity: 1456
Merit: 1081
I may write code in exchange for bitcoins.
April 07, 2015, 02:22:35 AM
#8
Hooray for "obsolete" tools which still do useful things and which run easily on UNIX like systems:

http://blog.richardkiss.com/?p=371

the "bu" tool which comes with this python package fixed my issue out-of-the box.  Deleting all .dlls I can find on my system now Smiley

Problem solved!
legendary
Activity: 1456
Merit: 1081
I may write code in exchange for bitcoins.
April 07, 2015, 01:59:33 AM
#7
Hello tspacepilot. Looking a bit i found a tool that will be useful for what you do. It is simple to use, you will find a tutorial.

https://en.bitcoin.it/wiki/Bitcoin_Address_Utility

Hope that helps, greetings.

Turns out `which mono` suggests that I already have the csharp compiler for linux.  I cloned the repo from github but I have no idea what to do next.  In a normal source program, I'd run ./configure && make && make install, but there's no Makefile here.

Anyone have hints?

Edit: here's me flailing around with this windows shit like a fish out of water:

Code:
tspacepilot@citrus:~/src/Bitcoin-Address-Utility$ make
make: *** No targets specified and no makefile found.  Stop.
tspacepilot@citrus:~/src/Bitcoin-Address-Utility$ mono Program.cs
The assembly mscorlib.dll was not found or could not be loaded.
It should have been installed in the `/usr/lib/mono/2.0/mscorlib.dll' directory.
tspacepilot@citrus:~/src/Bitcoin-Address-Utility$ mono Barcode128b.cs
The assembly mscorlib.dll was not found or could not be loaded.
It should have been installed in the `/usr/lib/mono/2.0/mscorlib.dll' directory.
tspacepilot@citrus:~/src/Bitcoin-Address-Utility$ mono BtcAddress.csproj
The assembly mscorlib.dll was not found or could not be loaded.
It should have been installed in the `/usr/lib/mono/2.0/mscorlib.dll' directory.
tspacepilot@citrus:~/src/Bitcoin-Address-Utility$ apt-cache search mscorelib
tspacepilot@citrus:~/src/Bitcoin-Address-Utility$

Any tips appreciated (or if anyone knows a UNIX utility, I'd be happy to abondon this csharp thingy (.dlls on linux, gross!))


Further edit:  Found my error in the apt-cache search, installed corlib (no e), now:

Code:
tspacepilot@citrus:~/src/Bitcoin-Address-Utility$ mono BtcAddress.csproj
Cannot open assembly 'BtcAddress.csproj': File does not contain a valid CIL image.
tspacepilot@citrus:~/src/Bitcoin-Address-Utility$ mono Barcode128b.cs
Cannot open assembly 'Barcode128b.cs': File does not contain a valid CIL image.
tspacepilot@citrus:~/src/Bitcoin-Address-Utility$ mono Program.cs
Cannot open assembly 'Program.cs': File does not contain a valid CIL image.

I cannot tell you how wrong this feels to be compiling some kinda microsoft thingys on my debian system.  There's gotta be a perl program that will convert this address for me....
legendary
Activity: 1456
Merit: 1081
I may write code in exchange for bitcoins.
April 07, 2015, 01:11:53 AM
#6
I want to bump this.  btcchris suggested that there were a ton of solutions out there for me (but didn't point me to any of them).  If he's right, surely you guys can point me in the right direction (or maybe I need to bit the bullet and apt-get install mono?).
legendary
Activity: 1456
Merit: 1081
I may write code in exchange for bitcoins.
April 06, 2015, 12:48:28 PM
#5
This sort of question has been asked and answered quite a bit (not trying to be rude) -- there are a lot of bits of code in various wallets / products that will do this sort of thing if you know where to look.

It's certainly not rude if you point out the locations of those asked/answered pairs Smiley

Quote
If you don't want to deal w/a compiler, what language did you have in mind? If for example your answer's Python I could probably point you to a few places to look.

C, C++, Perl, Python, javascript, bash, php, would be fine.  I don't mind compilers, anything that gcc or g++ can compile would be fine.  It's just that I run GNU/Linux and I'm not used to Windows stuff.

I got the hex versions of my keys as a dump from a Java protobuf wallet.  If there's something in bitcoinj that I should know about then that would work fine too!

Many thanks for any suggestions!
hero member
Activity: 672
Merit: 504
a.k.a. gurnec on GitHub
April 06, 2015, 08:59:27 AM
#4
This sort of question has been asked and answered quite a bit (not trying to be rude) -- there are a lot of bits of code in various wallets / products that will do this sort of thing if you know where to look.

If you don't want to deal w/a compiler, what language did you have in mind? If for example your answer's Python I could probably point you to a few places to look.
legendary
Activity: 1456
Merit: 1081
I may write code in exchange for bitcoins.
April 06, 2015, 08:45:41 AM
#3
Hello tspacepilot. Looking a bit i found a tool that will be useful for what you do. It is simple to use, you will find a tutorial.

https://en.bitcoin.it/wiki/Bitcoin_Address_Utility

Hope that helps, greetings.

Hey freemind1,  I actually did run across that.  I was hoping to avoid having to download and install mono, but you're right that this looks like the right tool for the job (with the exception of the awkward OS).

Thanks for the tip, I may have to learn how to use a C# compiler (on GNU/Linux)for this, but maybe I should do that anyway.
legendary
Activity: 1526
Merit: 1014
April 06, 2015, 07:38:40 AM
#2
Hello tspacepilot. Looking a bit i found a tool that will be useful for what you do. It is simple to use, you will find a tutorial.

https://en.bitcoin.it/wiki/Bitcoin_Address_Utility

Hope that helps, greetings.
legendary
Activity: 1456
Merit: 1081
I may write code in exchange for bitcoins.
April 06, 2015, 02:46:28 AM
#1
Hi folks, I've finally got my keys exported from my protobuf wallet dump using bitcoinj's wallet-tool.

Now I'm finding it surprisingly difficult to convert these guys to the WIF format that I'm used to and that I find useful.

While I'm not ready to be posting the actual keys in the forum, they look like hexadecimal to me:


ECKey{pub=022d42139..., priv=2b...}

So, what's the nice and easy tool (or the settings for that tool, I found matja's bitcoin-tool on github and I thought it was going to be what I wanted, but I didn't yet find the right parameters to get it working) that will help me to convert my hex private key to a base58check that starts with a 5.

Thanks in advance!
Jump to: