What Is a Cryptocurrency Wallet?
Demystify crypto wallets: how they manage cryptographic key pairs, the difference between hot and cold storage, and why wallets do not actually store coins.
A clear technical guide to asymmetric cryptography: how elliptic curve math connects your private key, public key, and public address.
At the heart of blockchain security lies asymmetric cryptography (also known as public-key cryptography).
In traditional symmetric cryptography, the same secret key is used to both encrypt and decrypt a message. While effective when two parties already share a secret, symmetric encryption fails in open peer-to-peer networks where strangers need to exchange verifiable value without meeting in advance.
Asymmetric cryptography solves this by generating a mathematically linked pair of keys: a Private Key and a Public Key.
In this article, we break down the mathematics, roles, and derivation pathways of public and private keys in blockchain systems.
The two keys in a cryptographic pair serve inverse, complementary functions:
Crucially, this mathematical derivation is strictly a one-way function:
[ Private Key ] ──(Elliptic Curve Multiplication: ECDSA)──► [ Public Key ]
▲ │
│ (Cryptographic Hashing:
│ SHA-256 + RIPEMD160)
IMPOSSIBLE │
TO REVERSE ▼
[ Public Address ]
You can derive the public key from the private key in microseconds. However, calculating the private key from the public key would take all the supercomputers on Earth billions of years.
Both Bitcoin and Ethereum rely on a specific elliptic curve called secp256k1, defined by the mathematical equation:
$$y^2 = x^3 + 7 \pmod p$$
Where $p$ is a prime number equal to $2^{256} - 2^{32} - 977$.
A private key is simply a 256-bit integer chosen at random between $1$ and $1.1579 \times 10^{77}$ (approximately $2^{256}$).
To appreciate the scale of $2^{256}$, consider that the total number of atoms in the observable universe is estimated to be around $10^{80}$. Guessing someone's private key by brute force is statistically impossible.
To calculate the public key, the private key (a scalar number $k$) is multiplied by a predefined standard generator point on the curve ($G$):
$$K = k \times G$$
Because elliptic curve point multiplication is easy to compute forward but impossible to divide backwards (the Elliptic Curve Discrete Logarithm Problem), the public key can be safely broadcast to the world without ever exposing the private key.
How does a user spend funds on the blockchain?
When Alice transfers 1 BTC to Bob, she does not broadcast her private key. Instead, she creates a digital signature using the ECDSA (Elliptic Curve Digital Signature Algorithm) or Schnorr algorithm:
Signing Phase (Alice): $$\text{Signature} = \text{Sign}(\text{Transaction Data}, \text{Private Key})$$ Alice combines the raw transaction data with her private key to produce a unique alphanumeric signature $(r, s)$.
Verification Phase (Every Node): $$\text{Valid?} = \text{Verify}(\text{Transaction Data}, \text{Signature}, \text{Public Key})$$ Any node in the world can run the mathematical verification formula using only the public transaction data, the signature, and Alice's public key. If the math checks out, the node confirms Alice authorized the transaction.
To improve privacy and minimize typing errors, blockchains do not use the raw public key as the user's destination address. Instead, they hash the public key further:
1A1zP1...) or Bech32 format (e.g., bc1q...).0x form the Ethereum address (e.g., 0x71C...).| Attribute | Private Key | Public Key | Public Address |
|---|---|---|---|
| Visibility | Strictly Confidential | Publicly Shareable | Publicly Shareable |
| Purpose | Authorizes & signs transactions | Verifies digital signatures | Receives incoming transactions |
| Analogy | Secret signature / Password | Digital verification seal | Bank IBAN or Account Number |
| Consequence of Loss | Permanent loss of all funds | Can be regenerated from private key | Can be regenerated from private key |
BlockchainCeylon is an independent publication dedicated to making blockchain concepts accessible to learners, students, and engineers.
Demystify crypto wallets: how they manage cryptographic key pairs, the difference between hot and cold storage, and why wallets do not actually store coins.
A clear architectural and philosophical comparison between Bitcoin and Ethereum: digital store of value versus the decentralized world computer.
Understand the mathematical and game-theoretic protocols that enable thousands of untrusted computers to agree on a single global state.