Bitcoin Forum
October 31, 2024, 11:15:18 PM *
News: Bitcoin Pumpkin Carving Contest
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Any wallet or address tool that can show my bip38 encrypted keys in HEX too?  (Read 1192 times)
zemario (OP)
Full Member
***
Offline Offline

Activity: 194
Merit: 100


View Profile
March 14, 2015, 06:11:28 PM
 #1

That is the question. I want to save some keys in cold storage in a durable medium, but I don't have the means to use all the base58 charset. HEX would be a good format.

Does anybody know a solution? I guess I could roll my own quick script or tool, but this could go horribly bad if I make a mistake. On a related question, any trustable test vectors on there for hex<->base58 converters that include bip38 keys?
luv2drnkbr
Hero Member
*****
Offline Offline

Activity: 793
Merit: 1026



View Profile
March 14, 2015, 08:54:45 PM
 #2

https://brainwallet.github.io/#converter

Source encoding is Base58Check.

It has an error though in that it cuts off the first byte.  So choose Base58 (no check) and it will show the first byte as well as 4 bytes at the end (which are a checksum, which is how your client knows if you've mis-typed something).

So if you want an accurate hex, just choose Base58 and delete the last 4 bytes and that's your hex.


Nevermind, that's just a god awful converter with a ton of errors.  Don't use it.  Download this, extract everything and run BtcAddress.exe and choose "Base58 Calculator" from the Tools menu.

juju
Sr. Member
****
Offline Offline

Activity: 381
Merit: 250



View Profile
March 15, 2015, 03:17:56 PM
 #3

That is the question. I want to save some keys in cold storage in a durable medium, but I don't have the means to use all the base58 charset. HEX would be a good format.

Does anybody know a solution? I guess I could roll my own quick script or tool, but this could go horribly bad if I make a mistake. On a related question, any trustable test vectors on there for hex<->base58 converters that include bip38 keys?

I actually don't think this Library has bip38 support but its worth checking out, I have used it quite a bit in the past.
https://github.com/vbuterin/pybitcointools/

This probably would get some better responses having posted it in the Technical Discussion forum.
birr
Hero Member
*****
Offline Offline

Activity: 870
Merit: 585


View Profile
March 15, 2015, 09:04:29 PM
Last edit: March 16, 2015, 02:12:59 AM by birr
 #4

Hex is suitable.
Get the arithmetic right, and you get the encoding right.
Just don't use base64.
Base64 is a big-endian file encoding scheme that takes the data to be encoded and splits it up into groups of 24 bits (3 words of 8 bits).  If there's any slop, base64 encoding pads it on the little end.  Emphatically not what you want.
TimS
Sr. Member
****
Offline Offline

Activity: 250
Merit: 253


View Profile WWW
March 16, 2015, 06:28:37 PM
 #5

Hex is suitable.
Get the arithmetic right, and you get the encoding right.
Just don't use base64.
Base64 is a big-endian file encoding scheme that takes the data to be encoded and splits it up into groups of 24 bits (3 words of 8 bits).  If there's any slop, base64 encoding pads it on the little end.  Emphatically not what you want.

Huh
This is basically nonsense. If you use it right then just like base58 and hex, base64 is a perfectly valid way to encode any bytes at all, including a private key represented in the usual way. The padding on the end ensures that you can decode the exact same bytes that you encoded despite the grouping. That said, its character set is a superset of base58's (+/O0Il are the extra chars), and since he doesn't "have the means to use all the base58 charset", base64 will be an even worse option. And maybe if you wanted to encode the private key as a number, without specifying how that's turned into bytes, things could go awry? But really, [some bytes in] == [same bytes out].

I'd recommend the casascius or brainwallet options that luv2drnkbr linked to (I haven't used pybitcointools, but I'd expect that's a good option, too). Be sure to test encoding/decoding/decrypting before you move any real money to something like this.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!