- A private key is a binary number consisting of 256 bits. (Which can also be shown as a 64 hexadecimal digit)
- This binary number can be split into 24 groups that by using a binary to decimal converter and the BIP39 word list will give you your recovery seed
You are correct that a private key is a 256-bit number. But this private key is not related to the list of words we call a mnemonic phrase (also called by some people as a seed phrase).
A mnemonic phrase is, as you probably figured out, a group of 12 or 24 words which encode some entropy. The length of the entropy depends on the number of words. So for example, 12 words encode 128 bits of entropy and 24 words encode 256 bits. Also, the number of words can be a multiple of 3, but this is extremely rare to see in practice so I'll just ignore it here.
This entropy is hashed using HMAC-SHA512 (
NOT HMAC-SHA256) to get the master private key.
The master private key is the root of a tree of addresses/private keys. A set of cryptographic operations, including hashing, is performed to derive a branch (also called extended key) from the root (master private key). This master private key resembles any other private key and as such you can compute the public key for it in the same way, which is called the master public key.
Most wallets will create 1 to 4 branches before creating the "leaf" keys which are your actual private keys and public key/addresses. Actually, calling it a leaf is misleading because even these keys can derive more "branches" of private keys too, using the same process.
This image from the
BIP32 specification should make matters clearer:
Bitcoin Address
- The public key is then hashed with SHA256 and RIPEMD160 (or double hashed) to give you a public key hash (160-bit)
- This public key is then encoded as Base58check which uses 58 character, which then uses a 1 or 3 as a prefix to give you your final Bitcoin Address
Segwit addresses beginning with bc1 are encoded using Bech32 instead of Base58check.
1) What are the coordinates of the Generator point on the elliptical curve?
Their coordinates in hex form are:
79BE667E F9DCBBAC 55A06295 CE870B07 029BFCDB 2DCE28D9 59F2815B 16F81798 (x)
483ADA77 26A3C465 5DA4FBFC 0E1108A8 FD17B448 A6855419 9C47D08F FB10D4B8 (y)
2) The multiplication of the generator point and the private key x times is what confuses me a little...so if you have the generator point with coordinates (a,b) , you would then multiple this by the 256 bit private key...so 2G...3G.....256G?
It confused me too when I was learning. But the multiplier before the G is a 256-bit number (well actually, a
tiny little smaller than 256 bits but that will make things confusing). So your private key - which by the way is still a number, remember that - can be used as the factor to multiply G with.
For example
if your private key was
21492362582632841231294160590348628345891189 (hex)
Then you multiply this number by G to get your public key.
3) The Bitcoin address would then be 160 bit or 40 Hex character long address with a pre-fix of a 1 or 3....
Only the address hash is 160 bits long. Remember you encode the address using Base58check or Bech32 so the final length in characters becomes much smaller.
4) How does a Wallet produce multiple addresses?
Using seed phrases, the entropy inside them, and the generated master private key, a very large number of keys can be derived from it (and even more keys derived from the children etc...) as I explained above.
[edit - pooya87 posted most of this stuff but due to lag I did not notice]