Skip to main content

Private keys are used for signing transactions and allow the holder of the private key to spend the Bitcoin associated with the address derived from the private key.

A private key is the half of the public/private ECDSA keypair that is kept private. It is a 256 bit integer that is either randomly generated or derived from another private key which was randomly generated. Private keys are typically handled by a wallet software.

Possession of a private key allows the owner to sign transactions which involve the public key derived from that private key. This includes any transaction which spends from a P2PKH or P2WPKH output where the public key hashes to the hash provided in the output, or in P2SH or P2WSH outputs where the public key is provided as part of either the redeem script or witness script as a requirement for spending the output (e.g. for a multisig redeem script).