Public and private keys, properly explained
How the key pair behind every crypto account really works: a secret private key, a public key derived from it, an address derived from that, and why the maths only runs one way.
Quick answer
A crypto account is a pair of numbers. The private key is a secret you keep; the public key is calculated from it and can be shared. Your address is derived from the public key. The maths runs one way only: you can go from private to public to address, but not backwards. Signing a transaction with the private key proves you authorised it without ever revealing the key itself.
Key points
- A private key is a large secret number; the public key is calculated from it using elliptic-curve maths.
- An address is derived from the public key and is safe to share; the private key must never be shared.
- The derivation is one-way: you cannot recover a private key from a public key or address.
- Signing proves control of an account without exposing the private key.
- Whoever holds the private key controls the account, which is why key custody is the core of self-custody security.
An account is a pair of numbers
On public blockchains there is no username-and-password login and no company holding your account. An account is a key pair: two mathematically related numbers. One is the private key, which is secret. The other is the public key, which is derived from the private key and can be shared. From the public key, a shorter address is derived, and that is what you hand out to receive funds.
Ethereum’s documentation frames the consequence bluntly: “You never really hold cryptocurrency, you hold private keys, the funds are always on Ethereum’s ledger.” The ledger records which address controls what. The private key is the only thing that can authorise moving anything held by that address. Understanding the relationship between these numbers is the single most important piece of crypto security literacy.
The private key: a very large secret number
A private key is, at bottom, a randomly chosen number in an enormous range, on the order of a 256-bit integer. The size matters. The space of possible keys is so vast that guessing a specific one at random is not a practical attack. The security of your account rests almost entirely on two facts: that this number was generated with genuine randomness, and that it stays secret.
Because the number is unwieldy, wallets usually present it in friendlier forms, most commonly a seed phrase (also called a recovery phrase or mnemonic) of twelve or twenty-four ordinary words. That phrase is not a separate password sitting on top of your key; it is your key, encoded so a human can write it down. Anyone who reads the phrase can reconstruct the private key and therefore control the account. This is why a recovery phrase should never be typed into a website, photographed, or shared.
From private key to public key: one-way maths
The public key is calculated from the private key. Ethereum’s documentation states that “the public key is generated from the private key using the Elliptic Curve Digital Signature Algorithm.” Both Bitcoin and Ethereum use the same specific elliptic curve, known as secp256k1, whose defining equation is y² = x³ + 7.
The crucial property is that the calculation is easy in one direction and infeasible in the other. Multiplying the private key by a fixed point on the curve produces the public key quickly. Reversing that step, recovering the private key from the public key, would require solving what cryptographers call the discrete logarithm problem, which is believed to be computationally impractical with current technology. Ethereum’s documentation captures the asymmetry directly: “you cannot derive a private key from public keys.”
This one-way relationship is what lets you publish the public side freely. Sharing your public key or address gives away nothing that helps an attacker compute your secret.
From public key to address
The address is one more step down the chain. On Ethereum, as the documentation describes, you get an address “by taking the last 20 bytes of the Keccak-256 hash of the public key and adding 0x to the beginning,” producing a 42-character string (the 0x prefix plus 40 hexadecimal characters). Bitcoin uses a different hashing and encoding scheme, but the principle is the same: the address is a compact, shareable representation derived from the public key.
So the full chain of derivation is: private key → public key → address. Each arrow points one way. You can always move left to right; you can never move right to left.
Signatures: proving control without revealing the secret
If the private key must stay secret, how do you ever use it? Through digital signatures. When you send a transaction, your wallet uses the private key to produce a signature over the exact details of that transaction. Ethereum’s documentation explains that a transaction “needs to be signed using the sender’s private key,” and that this “proves that the transaction could only have come from the sender and was not sent fraudulently.”
The elegant part is that verifying the signature requires only the public key, not the private key. Any node can check that the signature matches both the transaction and the claimed public key, confirming two things at once: that the account holder authorised this specific transaction, and that not a single detail has been altered since signing. The private key does the signing but is never transmitted or exposed. This is the mechanism behind the phrase “not your keys, not your coins”: authority over an account is precisely the ability to produce valid signatures, which only the key holder can do.
What “controlling an account” really means
It follows that control of a blockchain account is not a matter of identity, permission, or ownership in the legal sense. It is simply possession of the private key. As Ethereum’s documentation puts it, an externally owned account is “controlled by anyone with the private keys.” The word anyone is doing serious work. The network cannot tell the difference between the rightful owner and a thief who has obtained the key. There is no support desk that can reverse an authorised transaction and no “forgot password” flow that can regenerate a lost key.
This is the double-edged nature of self-custody. It grants complete, permissionless control over your own funds, and it places the entire burden of protecting the key on you. The two failure modes are mirror images: if someone else learns your key, they can take everything; if you lose your key with no backup, the funds become permanently inaccessible, still sitting on the ledger but unmovable.
Practical consequences worth internalising
A few implications follow directly from the maths rather than from any policy. Sharing an address or public key to receive funds is safe, because the derivation cannot be reversed. Sharing a private key or seed phrase is catastrophic, because it hands over full control. A signature request is a request to authorise something specific, so the details being signed are worth reading before approving. And backing up a recovery phrase offline, in more than one secure place, is not optional housekeeping; it is the only recovery path that exists, because no third party holds a copy.
Once the key pair is understood, most crypto security advice stops sounding like a list of arbitrary rules and starts sounding like direct consequences of one fact: the private key is the account, and the derivation only runs one way.
Custody: who actually holds the key
Everything above assumes you hold your own private key. In practice there are two custody models, and the difference between them is precisely a difference in who controls the key. In self-custody, you hold the key yourself, typically in a software or hardware wallet, and you alone can sign transactions. In custodial arrangements, such as an account on an exchange, a third party holds the keys on your behalf and signs on your instruction. The trade-off is direct: self-custody gives you complete control and complete responsibility, while custody hands both to someone else, adding convenience and a recovery path but also requiring you to trust that provider’s security and solvency.
Hardware wallets are worth understanding in this light, because they exist to protect the one number that matters. A hardware wallet keeps the private key inside a dedicated device and signs transactions internally, so the key never leaves the device or touches an internet-connected computer. You still approve each transaction, but the secret itself stays isolated from the environment most likely to be compromised. It does not change any of the maths described above; it simply reduces the chance that malware on a general-purpose machine can read the key.
Sources
Frequently asked questions
Is it safe to share my public address?
What is the difference between a private key and a seed phrase?
Can someone steal my funds if they know my public key?
What happens if I lose my private key?
Why is it called signing if nothing is written by hand?
Note: CamoCrypt is security & education only — no prices, no predictions, no investment advice. Verify every address and contract yourself; we cannot recover lost funds and neither can anyone who contacts you claiming they can.