Bitcoin Forum
May 03, 2024, 03:44:03 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Any good doc on Bitcoin keys explained?  (Read 86 times)
JustCuriosity (OP)
Newbie
*
Offline Offline

Activity: 5
Merit: 3


View Profile
July 07, 2023, 03:45:27 PM
Merited by Pmalek (2)
 #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
1714751043
Hero Member
*
Offline Offline

Posts: 1714751043

View Profile Personal Message (Offline)

Ignore
1714751043
Reply with quote  #2

1714751043
Report to moderator
"The nature of Bitcoin is such that once version 0.1 was released, the core design was set in stone for the rest of its lifetime." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
Cricktor
Hero Member
*****
Offline Offline

Activity: 756
Merit: 1111


Crypto Swap Exchange


View Profile
July 07, 2023, 10:18:10 PM
Merited by pooya87 (2), Pmalek (2), ABCbits (1)
 #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.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
pooya87
Legendary
*
Offline Offline

Activity: 3444
Merit: 10535



View Profile
July 08, 2023, 03:41:23 AM
 #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.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!