Deciphr Academy
Track 2 · Module 7 · Lesson 2 of 7 · 7 min read

How is a crypto address made from a private key?

Short answer

A private key is a huge random number. A public key is worked out from it by one-way maths, and on Ethereum the address is the last 20 bytes of a hash of the public key.1,2 You can go from key to address, but never back.3,2

Private keya random numberPublic key64 bytesAddress0x + 40 hexcurve mathshash, last 20 bytesno way backkeep secretshare freelyEasy forwards, practically impossible backwards
Fig. 2. Private key to public key to address. Each step is easy forwards and practically impossible backwards. Only the address is meant to be shared.

A private key is a random number

Mastering Bitcoin puts it simply: a private key is just a number, picked at random.1 On Ethereum, making one comes down to picking a number between 1 and 2^256.3 The Ethereum Yellow Paper, a technical description of the protocol, describes it as a randomly selected positive integer, stored as 32 bytes.4

2^256 is about 10^77, a number with 78 digits. For comparison, Mastering Ethereum notes that the visible universe is estimated to contain about 10^80 atoms.3

ethereum.org says a private key is usually written as 64 hexadecimal ("hex") characters.2 Hex uses the digits 0 to 9 and the letters a to f, so each character stands for 4 bits, and 64 × 4 = 256 bits.2,3

An SEC investor bulletin calls the private key a passcode that lets you approve transactions. It can't be changed or replaced once it is made.5

Private key to public key: one way only

The public key is worked out from the private key using a kind of maths called elliptic curve multiplication.3 Bitcoin and Ethereum use the same curve, called secp256k1.3

Mastering Ethereum explains why this matters. The calculation is easy in one direction and impossible in the other, because there is no way to "divide" it back.3 So you can share a public key without giving away the private key.1,2

The bulletin compares a public key to the email address of your wallet. It lets others check your transactions and send you crypto, but it can't approve transactions.5

Public key to Ethereum address

An Ethereum address is made from the public key in four steps.2,4

  1. Start with the public key. The Yellow Paper treats it as 64 bytes: two numbers joined together.4
  2. Hash it with Keccak-256. A hash turns any input into a fixed-size fingerprint (Module 2 covers hashes).2,3
  3. Keep the last 20 bytes. The Yellow Paper calls this the rightmost 160 bits of the hash.4,2
  4. Write it in hex and add 0x. 20 bytes make 40 hex characters, so the address is 42 characters long.2

A smart contract's address is made differently. It usually comes from the creator's address and a counter of the creator's transactions.2 Contract accounts have no private key at all (Module 4 covers them).2

Bitcoin addresses

Bitcoin has several kinds of address. You can tell them apart by how they start (Module 3 covers them).1

Starts with Kind of address
1 A legacy address, in a format called base58check1
3 A script address, also base58check1
bc1q SegWit version 0, in a format called bech321
bc1p SegWit version 1, also called Taproot, in a format called bech32m1

The EIP-55 checksum

A checksum is extra information that lets software spot a typing mistake.6,3 Mastering Ethereum says Ethereum addresses first had none, and that this led to lost funds from mistyped addresses.3

A 2016 standard, EIP-55, added a checksum without changing the address. It works by choosing which letters (a to f) are written as capitals, based on a hash of the address itself.6 The address stays 40 characters long, and software that ignores capitals still reads it.6

EIP-55 says that, on average, a mistyped address will pass its check by accident only 0.0247% of the time.6 Wallets that support EIP-55 check the capitals when an address mixes capitals and lowercase letters.3 An address pasted all in lowercase still works, but a wallet may have nothing to check, so a typo in it can go unnoticed.6,3

What a checksum can't do

A checksum catches typos. It can't tell you who owns an address.6,7 ethereum.org says to make sure the address you send to exactly matches the one you want.7

That matters because of a scam called address poisoning (Module 10 covers this scam). MetaMask, a wallet maker, says scammers send you a tiny transaction from an address that looks like one you've used, hoping you'll copy it later.8 MetaMask says to check the middle characters, not just the start and the end.8

How to compare two addresses

Line them up and check every character, including the middle. Matching the first and last few characters is not enough.8 Some quiz questions show four made-up addresses that differ in one character.

Our viewThink of the address as a postbox that anyone can post into, and the private key as the only key that opens it. You can hand out the address freely. The key never leaves your hands.
Sources
  1. Mastering Bitcoin, 3rd edition, chapter 4: Keys and Addresses. Andreas M. Antonopoulos and David A. Harding (CC BY-SA 4.0), GitHub, December 2023.
  2. Ethereum accounts. ethereum.org (developer documentation), page updated 6 August 2026.
  3. Mastering Ethereum, 2nd edition, chapter 4: Cryptography. Andreas M. Antonopoulos, Gavin Wood and co-authors (CC BY-NC-ND 4.0 for its first 12 months, then CC BY-SA 4.0), GitHub, checked 22 October 2026.
  4. Ethereum: A Secure Decentralised Generalised Transaction Ledger (the Yellow Paper), Shanghai version. Gavin Wood, Ethereum (ethereum.github.io/yellowpaper), version of 4 February 2025.
  5. Crypto Asset Custody Basics for Retail Investors – Investor Bulletin. US Securities and Exchange Commission, Office of Investor Education and Assistance (Investor.gov), 12 December 2025.
  6. ERC-55: Mixed-case checksum address encoding. Ethereum Improvement Proposals (eips.ethereum.org), created 14 January 2016; status Final.
  7. Ethereum security and scam prevention. ethereum.org, page updated 6 June 2026.
  8. Address poisoning scams. MetaMask Help Center (wallet maker's documentation), checked 22 October 2026.

General education built from the publicly available sources listed above. Not financial, legal, tax or investment advice. Naming a company, project or regulator is not an endorsement either way. Last checked 2026-10-22. Terms and disclaimer.