A private key is a secret number that lets its holder sign transactions for a cryptocurrency address. Anyone who has the key can spend the funds at that address, and anyone who loses it, with no backup, loses the ability to spend them. The network never sees the key. It checks a digital signature made with the key, and that check proves control without giving the secret away. Never share a private key or the seed phrase it comes from.
What a private key is
NIST, the US standards body, defines a private key as "a cryptographic key used with an asymmetric-key (public-key) cryptographic algorithm that is not made public" (NIST SP 800-57 Part 1 Rev. 5). NIST SP 800-56B Rev. 2 describes it as "the secret part of an asymmetric key pair that is used to digitally sign or decrypt data."
In crypto, the private key is mainly used to sign. Bitcoin's developer documentation describes a standard Bitcoin private key as "simply a 256-bit number," which can take nearly any value up to 2^256. Key generation follows the secp256k1 elliptic curve standard. In the Ethereum documentation, a private key "is made up of 64 hex characters," which is the same 256 bits written in hexadecimal.
Private key, public key and address
These three items are linked in one direction only:
- Private key. A random secret number.
- Public key. Calculated from the private key using elliptic curve maths. The Ethereum docs state that public keys can be derived from a private key but not the reverse.
- Address. A shorter value derived from the public key. On Ethereum, the address is the last 20 bytes of the Keccak-256 hash of the public key, with
0xin front. Bitcoin's common address types also use a hash of the public key.
You can share an address and a public key freely. Only the private key needs protecting.
Public-key cryptography is not "private key" symmetric encryption
Some explainers mix up a crypto private key with the shared secret key used in symmetric encryption, where both sides hold the same key. The two are different. A wallet's private key is one half of an asymmetric pair: it stays with one holder and is never shared with the person receiving funds.
How a private key proves ownership
To spend bitcoin from a standard pay-to-public-key-hash (P2PKH) address, the spender provides two things, according to Bitcoin's developer guide:
- the full public key, which the network hashes and compares with the hash in the locked output;
- a signature, made with the ECDSA formula from the transaction data and the private key.
Together these let the network "verify that Bob owns the private key which created the public key." The private key itself is not included in the transaction. The developer guide says "the entire transaction is signed except for any signature scripts," so a signature cannot be moved to a different transaction.
Since the Taproot upgrade, Bitcoin also supports Schnorr signatures, specified in BIP340. BIP340 defines 64-byte signatures and 32-byte public keys on the same secp256k1 curve. Ethereum transactions are signed with ECDSA as well. The Ethereum docs note that the private key "grants you custody over the funds associated with your account."
Someone asks for your key: share it or not?
Pick what you are being asked for to see whether sharing it puts your funds at risk.
What is the person, website or form asking you to give them?
- A receiving address → Safe to share
- A public key → Safe to share
- A private key → Never share it
- A seed phrase (recovery phrase) → Never share it
- A BIP39 passphrase → Never share it
- An extended public key (xpub) → next question
Could this person or service also get hold of any non-hardened child private key from the same wallet?
- Yes, or I am not sure → Do not share the xpub
- No, it only needs to create receiving addresses → Treat it as sensitive
Anyone who sees it can sign transactions and spend your funds, and there is no reset button. A seed phrase is the master copy of every private key in the wallet, and the passphrase protects the seed made from it. Do not type any of them into a website, chat or form.
BIP32 warns that a parent extended public key plus any non-hardened child private key is equivalent to the parent extended private key. That exposes every key below it.
An xpub lets a server create new receiving addresses without being able to spend from them. It still reveals more than one address, so share it only where it is needed and never with anyone who could also get a child private key.
This covers only what to share, based on Bitcoin, Ethereum and BIP documentation. It does not check a particular wallet, a custodial account or whether a request is a scam, and it is not security advice.
Where coins are actually kept
A wallet does not hold coins. Balances are recorded on the blockchain, and a wallet holds the keys that can spend them. Bitcoin's developer guide puts it this way: "Bitcoin wallets at their core are a collection of private keys." Wallet software creates public keys to receive funds and uses the matching private keys to spend them.
Seed phrases and HD wallets
Most wallets today do not show individual private keys. They show a seed phrase, also called a mnemonic or recovery phrase, and derive all keys from it.
- BIP39 turns 128 to 256 bits of random entropy into 12, 15, 18, 21 or 24 words, drawn from a list of 2,048 words. The words are run through PBKDF2 with HMAC-SHA512 and 2,048 iterations to produce a 512-bit seed. An optional passphrase is added to the salt. A different passphrase produces a different seed, and therefore different keys.
- BIP32 defines hierarchical deterministic (HD) wallets. As Bitcoin's developer guide describes it, "a single root seed" creates "a hierarchy of child, grandchild, and other descended keys." The same phrase restores every key in the wallet.
So the seed phrase is the master copy of every private key in the wallet. It needs the same or greater protection.
A risk with extended public keys
BIP32 lets a server derive new receiving addresses from an extended public key without being able to spend from them. The specification warns, however, that knowing a parent extended public key plus any non-hardened child private key is equivalent to knowing the parent extended private key. That exposes every key below it. Treat an extended public key ("xpub") as sensitive and never share it with anyone who could also obtain a child private key.
Formats you may see
- Raw hexadecimal. 64 hex characters (32 bytes).
- Wallet Import Format (WIF). A Bitcoin format that applies Base58Check encoding to the key to catch copying mistakes. It adds a prefix byte (0x80 for mainnet, 0xef for testnet), and an extra 0x01 byte if the key is used with a compressed public key. The developer guide says compressed public keys are the default in Bitcoin Core.
- Encrypted keystore. The Ethereum docs note that a private key "can be encrypted with a password."
Protecting a private key
These practices follow from how keys work:
- Never type a key or seed phrase into a website, chat or form. Any software or person that sees it can sign for you. There is no reset button.
- Keep offline backups of the seed phrase in more than one secure place. If you lose the phrase, you lose the keys.
- Keep signing away from internet-connected machines where you can. Bitcoin's developer guide notes that full-service wallets keep private keys on an internet-connected device, which makes them more exposed. Signing-only wallets keep the keys in a separate program that can run in a more secure environment.
- Understand custody. If a third party holds the keys for your account, it controls the funds on-chain, and you rely on its security and its terms.
- Consider a BIP39 passphrase for extra protection. Remember that forgetting it makes the funds unrecoverable.
Limitations: this is a general technical explainer based on Bitcoin, Ethereum and NIST documentation. Wallet implementations differ, and it is not security, legal or investment advice.