How private keys work
The cryptography is straightforward:
- A private key is generated randomly. For Ethereum and Bitcoin, it’s a 256-bit number.
- An elliptic-curve function (secp256k1) derives the public key from the private key.
- A hashing + encoding step produces the address from the public key.
- The private key signs a transaction; the signature + public key lets anyone verify the address authorized it.
The math only works one way: you can derive the public key and address from the private key, but not the reverse. Breaking a 256-bit ECDSA private key is computationally infeasible — the energy cost would exceed planetary resources by orders of magnitude.
How private keys are managed
Most users never see raw private keys. The higher-level abstractions:
- Seed phrase (BIP-39 mnemonic) — 12 or 24 words that deterministically generate a tree of private keys. One seed phrase can produce millions of addresses.
- Derivation paths — specific “routes” from the seed to individual keys (e.g.
m/44'/60'/0'/0/0for the first Ethereum address). Different apps use different default paths. - Keystore files — encrypted JSON files containing the private key, unlocked with a password. Older format; still supported by Geth.
- WIF (Bitcoin) — Wallet Import Format. A base58-encoded form of the private key.
- Hex strings — raw 0x-prefixed 64-character hex representation. Used by some power users and devs.
Operational security
The rules that matter:
- Never share your private key or seed phrase with anyone. No legitimate service, exchange, or support staff asks for it.
- Never paste it into a website. Even the legitimate site of your wallet doesn’t need it except at setup/recovery.
- Never store it in cloud storage. Google Drive, iCloud, Dropbox, email, password managers, notes apps — none of these are safe.
- Never take a photo of it. Phones sync photos to cloud backup by default.
- Never type it into a web-based tool. Even “official-looking” recovery tools have been malicious.
Risks and considerations
Loss modes that actually happen:
- Phishing — user pastes seed into a fake wallet site. Most common drain vector in retail crypto.
- Clipboard capture — malware captures seed phrases as they’re typed or copy-pasted during wallet import.
- Screen recording / screenshots — seed phrases stored as screenshots get backed up to cloud and later breached.
- Social engineering — attackers call pretending to be wallet support; convince the user to share the seed “for verification.”
- Physical compromise — written seed phrase found during break-in, photographed by someone with physical access.
The practical stance: treat the seed phrase as the single most valuable secret you own. Store it offline (metal plate, paper in a safe), test the recovery at least once, document the location securely in your estate plan, and never let the phrase touch any internet-connected device except the wallet at setup or emergency recovery.