3

I saw a puzzle here and I'm having problems understanding how the addresses are created. So the post there has a list of addresses like:

Address 5:

KwDiBf89QgGbjEhKnhXJuH7LrciVrZi3qYjgd9M7rFU7Dq8Au4Pv 1E6NuFjCi27W5zoXg8TRdcSRq84zJeBW3k Biginteger PVK value: 21 Hex PVK value: 15

Address 6:

KwDiBf89QgGbjEhKnhXJuH7LrciVrZi3qYjgd9M7rFU7Tmu6qHxS 1PitScNLyp2HCygzadCh7FveTnfmpPbfp8 Biginteger PVK value: 49 Hex PVK value: 31

Address 7:

KwDiBf89QgGbjEhKnhXJuH7LrciVrZi3qYjgd9M7rFU7hDgvu64y 1McVt1vMtCC7yn5b9wgX1833yCcLXzueeC Biginteger PVK value: 76 Hex PVK value: 4C

So, taking Address 7 as an example, I believe the address is 1McVt1vMtCC7yn5b9wgX1833yCcLXzueeC and the private key is 76 in decimal and 4C in hex.

What is KwDiBf89QgGbjEhKnhXJuH7LrciVrZi3qYjgd9M7rFU7hDgvu64y ? Is that the public key?

And how do you go from that private key and the other value to the address?

I tried this answer but didn't get the same result

Any help would be very useful. Thanks

2 Answers 2

1

Don't mix priv with pub keys. You're on the right track. Usually keys with length of 52 bytes beginning with "K" are the privkeys. Keys with "1" at the beginning would be the public keys, derived from the privkey. So e.g. the private key "KwDiBf89QgGbjEhKnhXJuH7LrciVrZi3qYjgd9M7rFU7hDgvu64y" results in public key "1McVt1vMtCC7yn5b9wgX1833yCcLXzueeC". A good playground for keys is here http://gobittest.appspot.com/Address and here https://www.bitaddress.org - warning: never use your own production private keys on such public tools, they might get stolen.

1

What is KwDiBf89QgGbjEhKnhXJuH7LrciVrZi3qYjgd9M7rFU7hDgvu64y ? Is that the public key?

No. That is the private key encoded in Wallet Import Format.

And how do you go from that private key and the other value to the address?

The private key is decoded from WIF into a format your computer can understand that it is a 256 bit integer. It is then treated as an integer and the EC public key is derived from it. That public key is then hashed with SHA256 and that hash is hashed with RIPEMD160. The resulting hash is encoded with Base58 check encoding to get the address.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.