<p>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 <a href="http://gobittest.appspot.com/Address" rel="nofollow noreferrer">http://gobittest.appspot.com/Address</a> and here <a href="https://www.bitaddress.org" rel="nofollow noreferrer">https://www.bitaddress.org</a> - warning: never use your own production private keys on such public tools, they might get stolen. </p>

CC BY-SA 3.0
2017-07-25T20:26:53.253Z
2017-07-25T20:33:03.390Z
2017-07-25T20:33:03.390Z
pebwindkraft
<blockquote>
  <p>What is KwDiBf89QgGbjEhKnhXJuH7LrciVrZi3qYjgd9M7rFU7hDgvu64y ? Is that the public key?</p>
</blockquote>

<p>No. That is the private key encoded in Wallet Import Format.</p>

<blockquote>
  <p>And how do you go from that private key and the other value to the address?</p>
</blockquote>

<p>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.</p>

CC BY-SA 3.0
2017-07-25T21:23:17.373Z
2017-07-25T21:23:17.373Z
Ava Chow
<p>I saw a puzzle <a href="https://bitcointalk.org/index.php?topic=1306983.0" rel="nofollow noreferrer">here</a> and I'm having problems understanding how the addresses are created. So the post there has a list of addresses like:</p>

<p>Address 5:</p>

<p>KwDiBf89QgGbjEhKnhXJuH7LrciVrZi3qYjgd9M7rFU7Dq8Au4Pv
1E6NuFjCi27W5zoXg8TRdcSRq84zJeBW3k
Biginteger PVK value: 21
Hex PVK value: 15</p>

<p>Address 6:</p>

<p>KwDiBf89QgGbjEhKnhXJuH7LrciVrZi3qYjgd9M7rFU7Tmu6qHxS
1PitScNLyp2HCygzadCh7FveTnfmpPbfp8
Biginteger PVK value: 49
Hex PVK value: 31</p>

<p>Address 7:</p>

<p>KwDiBf89QgGbjEhKnhXJuH7LrciVrZi3qYjgd9M7rFU7hDgvu64y
1McVt1vMtCC7yn5b9wgX1833yCcLXzueeC
Biginteger PVK value: 76
Hex PVK value: 4C</p>

<p>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.</p>

<p>What is KwDiBf89QgGbjEhKnhXJuH7LrciVrZi3qYjgd9M7rFU7hDgvu64y ? Is that the public key?</p>

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

<p>I tried <a href="https://bitcoin.stackexchange.com/a/19776">this</a> answer but didn't get the same result</p>

<p>Any help would be very useful. Thanks</p>

<private-key><address-generation>
Creating address from private key (bitcoin puzzle)
xtian777x
# Creating address from private key (bitcoin puzzle)

(Asked by: username_0 on 2017-07-25)

I saw a puzzle [here](https://bitcointalk.org/index.php?topic=1306983.0) 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](https://bitcoin.stackexchange.com/a/19776) answer but didn't get the same result

Any help would be very useful. Thanks

**Tags:** private-key, address-generation


---

## 2 answers

### Answer by username_1 on 2017-07-25. Score: 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.


---

### Answer by username_2 on 2017-07-25. Score: 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.


---

