Merited, cause I'm sure it'll bring
constructive discussion.
I do not mind coding something up but what is the exact process to go from the above to a public key.
You'll have to multiply that number with a point (G) of an elliptic curve we're following called secp256k1. Once you do that, you'll get a new point which will be your public key or dG (private key times G).
We usually represent both private keys and public keys hexadecimally, so I'll convert the number to hex to help you understand the process. Note that you can only use legacy addresses as uncompressed. Alright, so let's start.
Let's take a random number.
(the one you picked is outside our curve, so you probably typed it arbitrarily)hex: AFD0E79369D407D576D6EDE1762CEE44BD73B8758B5AD98048A396F2A6E20488
dec: 79523850969208805552503446842656968977264486959031597789767655508829511222408
We multiply it by G, which is a known point in our curve, and we get a point with these coordinates:
x: 9C6ACBF20880784802DE6CB8C721F739704FB473E71FB07C33B39173FB29AC7B
y: D50FA16FB3913615132273E723433D92CA1C2C00FB1E770227B4F6A06F6AF770
Your uncompressed public key is a
prefix followed by the coordinates.
049C6ACBF20880784802DE6CB8C721F739704FB473E71FB07C33B39173FB29AC7BD50FA16FB3913615132273E723433D92CA1C2C00FB1E770227B4F6A06F6AF770
Hash the above with
SHA256 and you get:
E5AECEAEC2B8A2A7237A256C9D982B356D1A00F62604E4DD88A8447121102A30
Hash the above with
RIPEMD-160 and you get:
044AA0973C1944861A3A9322DF6483BA39C8AA94
Add a version byte in front of it: (it's “00” in main net)
00044AA0973C1944861A3A9322DF6483BA39C8AA94
Hash that thing with SHA256:
860C3037C4755719FB4FDE574A9E6EABE89177277E84EE5CE64E09A92A3A7A75
Again, the above with SHA256:
79A69488947664034D5A7931934D102EEE4B94E3931EAD40479B211A51D0C5EB
Take the first four bytes (in this case they're “79A69488”) and add them to the RIPEMD-160 hash we made two steps above:
00044AA0973C1944861A3A9322DF6483BA39C8AA9479A69488
Now encode this with base58 and here I present you, your uncompressed address:
1Ph6xtRCue298R7q38GZq4q6XN8xQftBR
Has anyone got a small python or C# program that I can pipe in the numbers like this and output the address.
I was working on a Bitcoin multi-toolkit project which would include this feature. If I had finished it, you could copy my source code from that part, but unfortunately I haven't.
I recommend you to look on
Denovo. Coding Enthusiast must have probably implemented it, it ain't difficult.