1

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

4
  • 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
    Feb 3 at 15:41
  • 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! Feb 3 at 15:49
  • 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
    Feb 3 at 16:08
  • THank you so much. I learned Python and produced the answer I was looking for. Now I can see all intermediate steps. Feb 3 at 20:56

1 Answer 1

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.

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.