Cryptography
Bitcoin cryptography rests on two tools, hash functions and digital signatures on the secp256k1 curve. Read this section to see how each works.
By Dimitar Zurnov · Updated 4 Nov 2026
Adapted from Learn Me a Bitcoin by Greg Walker.
Bitcoin uses cryptography, which is why people call it a cryptocurrency. It uses only two tools from the cryptographic toolbox: hash functions and public key cryptography. Satoshi Nakamoto did not invent new cryptography for Bitcoin. Bitcoin combines existing tools in a new way.
Why does Bitcoin need cryptography?
Bitcoin has no bank to keep the ledger or check who owns what. Cryptography replaces that trust with mathematics that anyone can check. Two jobs need it. Blocks and transactions must link into a chain that nobody can edit quietly. Coins must be locked so that only their owner can spend them.
What are the two tools?
- Hash function: turns any data into a fixed-size fingerprint. Bitcoin uses fingerprints as reference numbers for blocks and transactions, to link blocks together, and in mining.
- Public key cryptography: a pair of keys. The public key can be shared, and the private key stays secret. The private key makes a signature that proves ownership without revealing the key. Each signature is tied to one transaction, so it cannot be reused for another.
Bitcoin uses these tools to prove ownership, not to hide data. Transactions are public, and the protocol does not encrypt them.
Where do these tools come from?
Public key cryptography dates from the 1970s. Before it, the same secret key had to encrypt and decrypt, so two people had to share it first. RSA, published in 1977, was the first public key system. DSA, proposed in 1991, was the first scheme built for signatures alone. ECDSA, standardised in 1998, runs on elliptic curves. Schnorr signatures, described in 1989, are simpler to compute still. Bitcoin uses neither RSA nor DSA.
How do the signature pages fit together?
Bitcoin's public key cryptography rests on one curve, called secp256k1, and on one operation: multiplying a point on the curve by a number. Two signature schemes use it. ECDSA came first and is still used for most older locking scripts. Schnorr signatures arrived with Taproot in 2021. They are simpler to compute, and they can be combined, which makes shared signatures possible.
What makes mining different?
Mining is where hashing does the most work. Miners hash block headers until one hash falls below a target. A hash cannot be predicted, so each win comes from luck and repeated attempts. No single party decides which blocks are added. That is why no central authority controls the ledger.
Which order should you read this section in?
Read the pages in this order. Each one builds on the ones before it. You do not need this maths to use Bitcoin, because libraries do the work. These pages are for when you want to know what the libraries do.
- Hash function: the fingerprint maths, and the hash types Bitcoin uses.
- Elliptic curve: the curve, point addition and point multiplication.
- ECDSA: the signature scheme of the first Bitcoin transactions.
- Schnorr signatures: the newer scheme, used by Taproot outputs.
Once the signing maths makes sense, the private key and public key pages show how the same curve turns a secret number into an address you can pay.
In this section
- 1Hash functionA Bitcoin hash function turns any data into a fixed-size fingerprint. Learn how Bitcoin uses SHA-256, HASH256, HASH160 and tagged hashes.
- 2Elliptic curveBitcoin's elliptic curve, secp256k1, is the maths behind its keys and signatures. Learn point addition, doubling and multiplication.
- 3ECDSABitcoin ECDSA is the signature scheme behind most older transactions. Learn how to sign, verify and recover a key from a reused nonce.
- 4Schnorr signaturesBitcoin Schnorr signatures, defined in BIP 340, are the scheme behind Taproot. Learn how to sign, verify and encode them, with a worked example.
Something look wrong? Tell us