Author

Topic: Any good doc on Bitcoin keys explained? (Read 118 times)

legendary
Activity: 3472
Merit: 10611
July 07, 2023, 10:41:23 PM
#3
I'd like to understand how exactly private keys are converted into pub keys and addresses
You want to understand how Point Multiplication in Elliptic Curve Cryptography works for the process of computing public keys from private keys. This link has some easy-to-understand content: https://blog.cloudflare.com/a-relatively-easy-to-understand-primer-on-elliptic-curve-cryptography/

From public key to address, the links you shared are already explaining that.

Quote
but for all elements (well, except testnet)
Considering keys and addresses, the only difference between MainNet and TestNet is the version byte in Base58 encoding of P2PKH and P2SH addresses and the human readable part of the Bech32 encoding of P2WPKH and P2WSH addresses. The rest are the same.
hero member
Activity: 714
Merit: 1010
Crypto Swap Exchange
July 07, 2023, 05:18:10 PM
#2
You might want to start your journey here https://learnmeabitcoin.com/technical/private-key and walk your way down the rabbit hole. A private key is basically some random number of size 256 bits within certain bounds (details behind the links). Some elliptic curve magic transforms such a private key into a public key, the reverse is not possible without exhausting likely all or more energy available in our solar system or maybe even the Milky Way galaxy. From public key to public address you take two one-way hash functions RIPEMD160(SHA256(public key)) and encode the result into the Base58 representation of the public address.

It's worth the effort to work through almost all pages of above website by Greg Walker. I like his style of presentation and interactivity here and there on his website and it helped me understand Bitcoin better.
newbie
Activity: 5
Merit: 3
July 07, 2023, 10:45:27 AM
#1
Hello All,

I found a diagram, which explains in an excellent way how to convert a public key to a P2PKH address here(1).  In fact, the schema from that doc is the best element. Also, I found a good map of types of addresses/keys here(2) and a list of all possible address prefixes here(3).

I'd like to understand how exactly private keys are converted into pub keys and addresses - like in (1) but for all elements (well, except testnet), starting from the private key. In other words, I need a doc, as clear as (1), that describes all way from random 256bit to other formats.

Is there any documentation on that, ideally - as clear as (1)? Thank you.

(1) https://en.bitcoin.it/wiki/Technical_background_of_version_1_Bitcoin_addresses
(2) https://en.bitcoin.it/wiki/Invoice_address
(3) https://en.bitcoin.it/wiki/List_of_address_prefixes
Jump to: