pk.org: CS 419/Lecture Notes

Bitcoin and Blockchain

Terms and concepts you should know

Paul Krzyzanowski – 2025-10-09

Cryptographic Background

Hash function
A deterministic function that maps data to a fixed-length digest with properties such as preimage resistance and collision resistance.
SHA-256
The 256-bit cryptographic hash function used throughout Bitcoin for hashing blocks, transactions, and keys.
Hash pointer
A reference to data that also stores the data’s hash so any modification can be detected.
Merkle tree
A binary tree of hashes that summarizes a large dataset so membership can be verified with a small proof.
Merkle root
The single hash at the top of a Merkle tree that commits to all the data beneath it.
Merkle proof
The minimal set of sibling hashes needed to prove that a given item is included under a Merkle root.
Digital signature
A cryptographic proof that the transaction was authorized by the holder of the corresponding private key.
Public key
The key used by others to verify signatures, derived from the private key.
Private key
A secret 256-bit value used to create digital signatures that authorize spending.
RIPEMD-160
A 160-bit hash function used with SHA-256 to derive short public key hashes for addresses.
Hashcash
An early proof-of-work system designed to make sending spam computationally expensive. Bitcoin adapts this concept for mining, requiring miners to find a hash below a target threshold to create a valid block.

Bitcoin Ledger and Transactions

Transaction
A record that spends earlier outputs and creates new outputs to transfer value to recipients.
Input
A reference to a specific output of a previous transaction, accompanied by data proving the right to spend it.
Output
A record specifying a destination address and amount that can later be spent as an input.
Change output
An output that returns excess value back to the sender because inputs must be spent in full.
Transaction fee
The difference between total input value and total output value that is paid to the miner who includes the transaction in a block.
UTXO (Unspent Transaction Output)
A spendable output that has not yet been used as an input in another transaction.
Satoshi
The smallest Bitcoin unit, where 1 BTC equals 100,000,000 satoshis.
Address
A compact, checksummed encoding of a public key hash that identifies who can spend an output.
Transaction ID (txid)
The hash of a serialized transaction that uniquely identifies it within the blockchain.

Blocks and Blockchain Structure

Blockchain
A chain of blocks linked by hash pointers that creates an append-only, tamper-evident history of transactions.
Block
A container of validated transactions plus a header that links it to the previous block.
Block header
The metadata of a block, including the previous block hash, Merkle root, timestamp, difficulty target, and nonce.
Previous block hash
The hash pointer that links a block to its predecessor in the chain.
Timestamp
An approximate creation time recorded in the block header.
Difficulty target
The value that the block header hash must be less than in order for the block to be valid.
Target hash
Another name for the difficulty target, the threshold a block’s hash must fall below for the block to be accepted as valid.
Nonce
A number in the block header that miners vary in order to search for a valid hash under the target.
Fork
A temporary split in the blockchain when competing blocks reference the same parent, resolved by the longest chain rule.
Mempool
The set of valid, unconfirmed transactions that nodes hold before inclusion in a block.

Proof of Work and Mining

Proof of Work (PoW)
A consensus mechanism where miners expend computation to find a block hash below a target, making blocks costly to produce but easy to verify.
Difficulty adjustment
The process that recalculates the target every 2016 blocks to keep the average block interval close to ten minutes.
Chain selection rule
The rule by which nodes follow the chain with the most accumulated proof of work, resolving temporary forks.
Miner
A node that aggregates transactions into blocks and competes to publish the next block by performing proof of work.
Full node
A node that maintains the entire blockchain and verifies every transaction and block but does not perform mining.
Mining pool
A group of miners who combine hashing power and share rewards to reduce variance in earnings.
ASIC
Application-Specific Integrated Circuit: specialized hardware designed to compute SHA-256 hashes far more efficiently than CPUs, GPUs, or FPGAs.
Coinbase transaction
The special transaction in each block that creates new bitcoins and pays the miner their reward and fees.
Block reward
Newly minted bitcoins given to the miner of a valid block, in addition to collected transaction fees.
Halving
The event that reduces the block reward by half every 210,000 blocks, roughly every four years.
51% attack
A potential attack where an entity controlling a majority of the network’s hashing power can rewrite recent history or censor transactions.