Home › Glossary › Private key

Private key

Also called: secret key, privkey, priv key, bitcoin private key, signing key, xprv.

A private key is a secret 256-bit number that signs Bitcoin transactions. Whoever knows it can spend the coins it controls.

A private key is a secret number that lets its holder sign Bitcoin transactions. Coins locked to a key can only be spent with a valid signature from it, so whoever knows the private key controls the money.

What a private key looks like

It is a 256-bit (32-byte) number, picked at random between 1 and just under the order of the secp256k1 curve, roughly 1.16 × 10^77. Multiplying the curve's generator point by it gives the matching public key. That step is easy; going backwards is believed to be infeasible.

Keys usually appear in one of these forms:

  • Hex: 64 hexadecimal characters.
  • WIF: Base58Check text starting with 5, K or L on mainnet.
  • Encrypted (BIP 38): a 58-character string starting with 6P, protected by a passphrase.
  • Inside an xprv: a BIP 32 extended private key, which adds a chain code so child keys can be derived.

Private keys in modern wallets

Most wallets no longer store loose keys. An HD wallet derives thousands of private keys from one seed phrase, so backing up the words backs up every key. The keys produce ECDSA signatures for older address types and Schnorr signatures (BIP 340) for Taproot outputs.

Keep it secret

Anyone who sees a private key can take the funds, and Bitcoin transactions can't be reversed. Never paste a key into a website, chat or support form, including ours. A PSBT lets you sign on an offline device so the key never has to leave it.

BIPs that define Private key

Related terms

  • Public key: A public key is a point on the secp256k1 curve derived from a private key. Others use it to verify your signatures, and addresses are built from it.
  • WIF (Wallet Import Format): WIF (Wallet Import Format) writes a single private key as Base58Check text starting with 5, K or L, so it can be moved between wallets.
  • Seed phrase: A seed phrase is a list of 12 to 24 words, defined by BIP 39, that encodes the random number from which a wallet derives all of its keys.
  • HD wallet: An HD (hierarchical deterministic) wallet derives a whole tree of keys from one seed, as defined in BIP 32, so a single backup restores every address.
  • ECDSA: ECDSA (Elliptic Curve Digital Signature Algorithm) is the signature scheme Bitcoin has used since 2009, over secp256k1, for all pre-Taproot outputs.

Learn more

Guides