0

I wonder if it is possible to print what's going on under the hood regarding the process of getting from a random binary number to a BTC address.

It will look something like this:

Input: a random 256 binary number

Output: print()

Printing all possible sequential states from that number to a BTC address.

PRIVATE KEY STATES

binary privKey [k] -> decimal privKey -> hexadecimal privKey -> WIF privKey

PUBLIC KEY STATES

decimal pubKey print(x,y) -> print K where [K=(x,y)] -> hexadecimal PubKey (A) -> print A=RIPEMD160(SHA2569(K))

It will help a lot of people interested in the details of creating BTC addresses, from the elliptic curve private to public key process (K=k*G) to the other encoding steps until the final address.

On GitHub and other places, .js or .py libraries just print the WIF key and the address, and sometimes the hexadecimal public key as well.

Thanks.

  • 1
    If you really want this, I think your best bet is to take some existing code and add print statements wherever you like, or single-step it with a debugger. I doubt you'll find code where this has already been done, mainly because I don't think it will actually be as informative as you guess. The individual arithmetical computations aren't very informative one by one; it's better to understand the mathematical constructions that they express collectively. – Nate Eldredge Aug 19 '18 at 18:41
0

The bitcoin developper pages show the steps in all details for type 1 addresses.

For the type 1 addresses, there is a good link here to test results.

Then there is HD wallets, Segwit, and many other extensions...

Maybe it is good to start for type 1 addresses, and extend with your ideas of "under the hood crypto". I stick to Nate's comment though.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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