CoinPunk questions with private base58 encoded private keys?

-1

I am extemely sorry if this not the right place... but thought I could maybe get some pointers?

Well, basically, if you look at this: https://github.com/kyledrake/coinpunk/blob/master/lib/bitcoinjs/eckey.js#L12 what is that networkTypes for?

And also, https://github.com/kyledrake/coinpunk/blob/master/lib/bitcoinjs/eckey.js#L47 On there, what is it basically is it what the private key usually or basically starts with in the coin? Like does bitcoin just start off their private keys with "L" or "K"? Or is this part of the code not even RELATED to this?

user282190

Posted 2014-04-21T22:03:01.700

Reputation: 1

Answers

1

The network byte is the first byte of input to base58 encoder.

For uncompressed keys the input is always 1 network byte (0x80) followed by 32-byte secret exponent, followed by a 4-byte checksum. For compressed keys there is an extra byte of 0x01 between the exponent and the checksum.

The prefixes '5', 'K' or 'L' are the result of the aforementioned constraints on the input data. If you plug in all 0x00 or all 0xff in the 32-byte exponent and convert it to base58, you will see that the private key must start with '5H...5K' for uncompressed and 'Kw...L5' for compressed.

uminatsu

Posted 2014-04-21T22:03:01.700

Reputation: 1 061

Oh. Thank you very much sir! That helped explain a lot of stuff. :)user282190 2014-04-22T00:45:38.120