Cryptography

Cryptography is the science of protecting information with mathematics: encrypting data and proving that messages are authentic and unaltered. Every cryptocurrency rests on it: hash functions link the blocks, and digital signatures prove the right to spend coins.

The word and why crypto needs it

“Cryptography” comes from Greek words for “hidden writing”. For a long time it was the art of ciphers for soldiers and diplomats, and in the twentieth century it became a rigorous branch of mathematics. The “crypto” in “cryptocurrency” comes straight from here: coins are not printed or kept in a bank, and their movement is secured by cryptographic algorithms. It is worth knowing that a blockchain itself is usually not encrypted: addresses, amounts and transfer times are visible to everyone. Cryptography is used here not for secrecy but for trust without an intermediary.

Hash functions

A hash function turns data of any size into a short string of fixed length, a fingerprint. Change a single letter in the input and the fingerprint becomes completely different, while recovering the original data from it is practically impossible. Bitcoin uses the SHA-256 function, Ethereum uses Keccak-256. Every block contains the hash of the previous one, so an old record cannot be forged unnoticed: all later blocks would change. Mining is built on hashes too: miners try variant after variant until the block's hash falls below a set target.

Keys and digital signatures

Owning coins on a blockchain means knowing a private key, a large random number. A public key is derived from it mathematically, and an address from the public key. Going the other way is practically impossible. To send coins, a wallet signs the transfer with the private key, and the network checks the signature against the public key without ever learning the private one. Bitcoin and Ethereum use elliptic-curve signatures, and since 2021 Bitcoin has also supported Schnorr signatures. A seed phrase is a human-readable form of the same secret from which a wallet derives all its keys.

Where the weak spot is

The algorithms behind cryptocurrencies have been studied by mathematicians for decades, and no one today knows how to break them head-on. People lose money not because of weak mathematics but because of humans and software: keys stored in notes or screenshots, seed phrases typed into fake websites, key generators with poor randomness, malicious smart contracts signed by mistake. Quantum computers are a separate topic: in the future they could threaten elliptic-curve signatures, and network developers are discussing a move to resistant algorithms. Hash functions are much more robust against that threat.

Example

Hypothetical example: a block records the transfer “Alice → Bob: 1 coin”. Its hash starts with, say, 00a7f3. If someone changes the amount to 10 coins, the hash becomes something like 9c41be, completely different. The next block stores the old hash, so the network spots the forgery at once. And no one can sign a new transfer on Alice's behalf without her private key.

Related terms

Private KeyPublic KeyBlockchainSeed PhraseQuantum computers and BitcoinMultisignature

On the site

CryptocurrenciesHow to buy cryptoBitcoin Price PredictionCrypto market Monopoly

This article was written by AI. Check specific rates, taxes and broker terms with primary sources.

↑ Top