Cryptography → Cryptocurrency

How hashing, keys, and signatures turn pure math into digital money you can actually own.

01

Money made of math 🧠💰

Start Here

A cryptocurrency has no coins, no vault, and no bank. So what stops you from spending money you don\u2019t have, or someone copying your balance? The answer is cryptography. Three mathematical tools — hash functions, key pairs, and digital signatures — do the entire job. Let\u2019s see how each one turns abstract math into real, ownable money.

🔢 Hashing+ 🔑 Key pairs+ ✍️ Signatures= ₿ Cryptocurrency
02

Hashing — the digital fingerprint 🔢

Tool 1

A hash function like SHA-256 takes any input and returns a fixed 256-bit fingerprint. Change one letter and the entire output scrambles — the avalanche effect. It\u2019s a one-way street: easy to compute forward, impossible to reverse.

SHA-256("hello") = 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824
SHA-256("hellp") = totally different 256-bit value

Blockchains use hashing to chain blocks together. Each block stores the hash of the previous block, so editing an old block changes its hash and breaks every block after it. That\u2019s what makes the ledger tamper-evident.

Block 1
hash: 0000a3…
Block 2
prev: 0000a3…
Block 3
prev: 9f21c…

🧪 Try real SHA-256 in your browser

This uses your browser\u2019s built-in cryptography — the same SHA-256 Bitcoin uses. Type anything and watch the fingerprint change instantly.

hashing...
03

Key pairs & wallets 🔑

Tool 2

A wallet is really just a pair of numbers linked by elliptic-curve math. Your private key is a giant secret number. Multiply the curve\u2019s base point G by it and you get your public key — easy forward, impossible to reverse (the ECDLP from the Quantum page).

private key d = random 256-bit number  (keep secret!)
public key Q = d · G  (share freely)
address = RIPEMD160( SHA-256( Q ) )  (what you give people)

Notice the address is a hash of the public key. That extra layer is exactly why an un-spent Bitcoin address hides your public key from a future quantum attacker.

🎲 Private key
secret number
×G → 📢 Public keyhash → 🏷️ Address
04

Digital signatures — proving it\u2019s you ✍️

Tool 3

To spend coins you sign the transaction with your private key using ECDSA. Anyone can verify the signature with your public key, but nobody can forge it without the secret. This proves ownership without ever revealing the private key.

sign:   signature = ECDSA_sign( d, transaction )
verify: ECDSA_verify( Q, transaction, signature ) → true / false

Three guarantees fall out of this single step:

  • Authentication — only the key owner could sign.
  • Integrity — changing the transaction invalidates the signature.
  • Non-repudiation — you can\u2019t later deny you sent it.
05

The Merkle tree 🌳

Fun Graphic

Thousands of transactions get hashed in pairs, again and again, until a single Merkle root summarises them all. Change any transaction and the root changes — so a tiny 32-byte number guards the whole block.

Merkle Root H(AB) H(CD) H(A) H(B) H(C) H(D) Tx A Tx B Tx C Tx D
One root hash proves the integrity of every transaction beneath it.
06

The life of a transaction 🚀

Putting It Together

1 · Create
You build a transaction: “send 0.5 BTC to this address.”
2 · Sign
Your wallet signs it with your private key (ECDSA). The key never leaves your device.
3 · Broadcast
The signed transaction is sent to thousands of nodes, who verify the signature with your public key.
4 · Mine
Miners bundle it into a block and search for a nonce so the block\u2019s hash meets the difficulty target (proof-of-work).
5 · Confirm
The block links to the chain via the previous block\u2019s hash. Your payment is now permanent and tamper-evident.
07

Proof-of-work, in symbols ⛏️

The Math of Mining

Miners repeatedly change a nonce until the block hash is smaller than a target value — i.e. it starts with enough leading zeros.

find nonce such that:
SHA-256( SHA-256( block_header + nonce ) ) < target
Smaller target = more leading zeros = harder = more hashing power needed.

There\u2019s no shortcut — you just keep guessing. With difficulty this high, the whole Bitcoin network computes hundreds of quintillions of hashes per second. That mountain of work is what makes rewriting history economically impossible.

🔗 Connect the dots

Hashing secures the chain, key pairs prove ownership, and signatures authorise spending. Remove any one and the whole system collapses. That\u2019s why a threat to cryptography — like quantum computing — is really a threat to cryptocurrency. Explore that on the Quantum page.

CryptoMath AI

Online • Ready to help

Hi! I'm CryptoMath AI, your personal assistant for cryptography and blockchain mathematics. Ask me anything about:

  • Modular arithmetic & prime numbers
  • RSA, SHA-256, ECDSA encryption
  • Blockchain & cryptocurrency concepts
  • Solving math problems step-by-step

AI can make mistakes. Verify important information.