Tutorial - Address Generation
5 stars based on
35 reviews
The private key deterministically generates the public key, which deterministically generates the public address the same private key will always generate the same public key and public address.
Compressed public keys are now widely used amongst the most popular bitcoin software. The public address of a compressed public key is different than the public address of the uncompressed public key. This utility file can be downloaded here. Bear in mind that the elliptic curve is defined over a prime field, so our private key must be less than our chosen prime.
Did I mention that this implementation should bitcoin ecdsa private key generation be accepted as academic experimentation? These are merely different representations of the same thing, and are all equivalent.
We could actually stop here. These random bits ARE your private key, but if you want to use this key with any mainstream bitcoin application, the private key must be in wallet import format WIF format.
Compression flag is needed to make private keys completely deterministic. As stated above, compressed and uncompressed public keys generate different public addresses.
The compression flag signals which of those addresses this private key should generate. Checksum is the first 4 bytes of the double sha hash of our input. It is used to ensure that every bit is correct; if a single bit is off mistypedwe will know about it.
We currently have 38 bytes of data. Using the digits Using hex 16 possible characters we express this in 76 characters as shown above. If we use 58 possible characters, the data can be expressed in only 52 characters. The characters used for Base58 are:. This is where Elliptic Curve Cryptography comes in. When we bitcoin ecdsa private key generation the generator point with our private key, we get a new point on the elliptic curve. The x and y cooordinates of this point act as our public key.
Every application which uses the secpk1 curve uses the same generator point. Because elliptic curves are symmetric about the x axis; given any bitcoin ecdsa private key generation coordinate, there exist only 2 possibilities for the y coordinate.
Bitcoin ecdsa private key generation public keys include the bitcoin ecdsa private key generation y coordinate a really big numberbut we can save space on the blockchain by indicating which of the 2 possible y-coordinates we use. Why must the 2 y coordinates have unique parity? Because the elliptic curve is over a prime finite field, when we change sign, we flip parity.
We can now share this address with our friends, convert it to a QR code, get it tatooed on our bodies, and watch the bitcoins rush in.