How Is a Bitcoin Private Key Generated?

A Bitcoin private key is essentially a large, random number, typically a 256-bit number. It is generated by a cryptographically secure pseudo-random number generator (CSPRNG).

The quality of the randomness is paramount; if the number is not truly random, the private key could be guessed, leading to the theft of funds. The number is usually represented as a sequence of letters and numbers or as a 12- or 24-word seed phrase (BIP-39).

What Is the Relationship between a Private Key and a Seed Phrase?
How Is a Private Key Typically Represented (E.g. Format)?
What Is the Purpose of the ‘Passphrase’ in a BIP-39 Seed Phrase?
What Standard Defines the Creation of a Seed Phrase?
How Does the “Difficulty Adjustment” in Bitcoin Mining Relate to the 256-Bit Hash Target?
What Is the SHA-256 Algorithm?
What Does the “256-Bit” Refer to in SHA-256?
How Does a “Seed Phrase” Relate to the Generation of the Initial Private Key?

Glossar