A private key is nothing more than a number: a random integer between 1 and n − 1, where n is the order of the secp256k1 curve, just under 2²⁵⁶. Written in hexadecimal it is 64 characters. That is all. There is no registry of keys; nobody issues them. You pick a number, and if it is random enough, nobody else will ever pick the same one.
Why 256 bits is enough
2²⁵⁶ is about 1.16 × 10⁷⁷. If every computer on Earth tried a billion keys a second for the age of the universe, it would cover a negligible fraction of the space. Brute force is not a threat. Bad randomness is. A key generated from a weak source (a predictable function, a phrase you chose, a website) can be found by guessing what the source produced. Several thefts have come from exactly that.
Generating one
- Coin flips. 256 flips, written as binary, converted to hex. Slow and genuinely random.
- Dice. 99 rolls of a six-sided die gives enough entropy for a 24-word seed; some hardware wallets accept dice input.
- A hardware wallet's secure chip, which combines a hardware random source with other inputs. This is the normal case.
- Never a website or a brain wallet. Anything typed by a human is guessable.
Formats you will see
- Hex: 64 characters,
e9873d79c6d87dc0.... - WIF (Wallet Import Format): Base58 with a version byte and checksum, starting with 5, K or L. Used for importing single keys.
- Seed phrase: not a key, but the entropy from which many keys are derived (lesson 6).
A private key is 256 bits. How many hexadecimal characters is that? (Each hex character is 4 bits.)