1
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.
1If 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 – 2018-08-19T18:41:45.777