<p>Teaching myself python produced this answer:</p>
<p>prefix + h160
b'oA$6\x14\xae\xcd\x13\x81\x9dz\x7f4\x8aJ\x07\xfb\xcb)\xd8\xe5'</p>
<p>Thank you for all that reviewed the question.</p>

CC BY-SA 4.0
2023-02-03T20:53:23.560Z
2023-02-03T20:53:23.560Z
Gringo Golf
<p>First I want to thank Jimmy Song for pointing me to this site. I'm running into a small problem with Chapter 4 Exercise 5: Find the Address corresponding to the public keys whose private key secrets are:</p>
<p>5002 (use uncompressed SEC on testnet)</p>
<p>I'm not a Python programmer, so I started to complete the exercises in <strong>Java</strong>! Since the intermediate results are not published in the book, I'm now trying to reproduce the exercise using Python.</p>
<p>Could anyone that has done the exercises tell me the byte array for the private key secret (5002 uncompressed SEC on telnet) when the final call to &quot;return encode_base58_checksum(prefix + h160)&quot; is?</p>
<p>Thank you so much for the support.</p>
<p>Here is what I generate:</p>
<p>answer: &quot;mmTPbXQFxboEtNRkwfh6K51jvdtHLxGeMA&quot;;<br />
my result:  mopAiY7pn2XV3DGrGKmVkuvjhMLLNcHZLv</p>
<p>Dave</p>

CC BY-SA 4.0
2023-02-03T15:41:19.870Z
Hi Dave, did I understand right that the exercise is using Python but you are trying to reproduce it using Java? That phrase was ambiguous in your original question post. Please check whether my edit matches your intent and feel free to roll it back if I got it wrong.
Murch
CC BY-SA 4.0
2023-02-03T15:49:08.183Z
Thank you, you are right. The intermediate results are not in the book. I'm now learning Python to see those intermediate results. I was hoping a Python person that has done the work in the exercises could just pass along the byte array! Little crowd sourcing for help!
Gringo Golf
CC BY-SA 4.0
2023-02-03T16:08:53.817Z
Ah, then I had misunderstood you. I edited your post again to clarify. Please feel free to edit your post further if you wish to clarify or elaborate.
Murch
CC BY-SA 4.0
2023-02-03T20:56:25.037Z
THank you so much. I learned Python and produced the answer I was looking for. Now I can see all intermediate steps.
Gringo Golf
<bitcoin-core-development><java>
Programming Bitcoin exercises in Java instead of Python
Gringo Golf
# Programming Bitcoin exercises in Java instead of Python

(Asked by: username_0 on 2023-02-03)

First I want to thank Jimmy Song for pointing me to this site. I'm running into a small problem with Chapter 4 Exercise 5: Find the Address corresponding to the public keys whose private key secrets are:

5002 (use uncompressed SEC on testnet)

I'm not a Python programmer, so I started to complete the exercises in **Java**! Since the intermediate results are not published in the book, I'm now trying to reproduce the exercise using Python.

Could anyone that has done the exercises tell me the byte array for the private key secret (5002 uncompressed SEC on telnet) when the final call to "return encode\_base58\_checksum(prefix + h160)" is?

Thank you so much for the support.

Here is what I generate:

answer: "mmTPbXQFxboEtNRkwfh6K51jvdtHLxGeMA";  
my result: mopAiY7pn2XV3DGrGKmVkuvjhMLLNcHZLv

Dave

**Tags:** bitcoin-core-development, java

> **Comments:**
> **username_1**: Hi Dave, did I understand right that the exercise is using Python but you are trying to reproduce it using Java? That phrase was ambiguous in your original question post. Please check whether my edit matches your intent and feel free to roll it back if I got it wrong.  
> **username_0**: Thank you, you are right. The intermediate results are not in the book. I'm now learning Python to see those intermediate results. I was hoping a Python person that has done the work in the exercises could just pass along the byte array! Little crowd sourcing for help!  
> **username_1**: Ah, then I had misunderstood you. I edited your post again to clarify. Please feel free to edit your post further if you wish to clarify or elaborate.  
> **username_0**: THank you so much. I learned Python and produced the answer I was looking for. Now I can see all intermediate steps.  

---

## 1 answers

### Answer by username_0 on 2023-02-03. Score: 1

Teaching myself python produced this answer:

prefix + h160
b'oA$6\x14\xae\xcd\x13\x81\x9dz\x7f4\x8aJ\x07\xfb\xcb)\xd8\xe5'

Thank you for all that reviewed the question.


---

