pk.org: Computer Security/Lecture Notes

Bitcoin

Terms we covered

Paul Krzyzanowski – 2026-10-07

Hash Pointers and Blockchains

Pointer
A reference telling where to find data, without checking its contents.
Hash pointer
A reference to data stored together with a hash of that data.
Blockchain
A linked list in which each block holds a hash pointer to its predecessor.
Head
The pointer identifying the newest block in a blockchain.
Genesis block
The first block in a blockchain.
Tamper-evident log
A record in which any change to past entries can be detected.

Merkle Trees

Merkle tree
A binary tree of hashes whose leaves are hashes of data items.
Merkle root
The single hash at the top of a Merkle tree.
Sibling hash
The other child of a node’s parent in a Merkle tree.
Merkle proof
The sequence of sibling hashes along the path from a leaf up to the root. Also called a proof of inclusion.

Bitcoin’s Goals and Accounts

Bitcoin
A decentralized payment system with a public, replicated transaction history.
Pseudonymity
Using identifiers that carry no name but can still be linked to a person.
Double spending
Signing two transactions that spend the same funds.
Trusted third party
An organization relied on to keep records and transfer money correctly.
Account balance
A stored amount that a bank adjusts with each payment.
Ledger
The complete history of all Bitcoin transactions.
Unspent transaction output (UTXO)
A transaction output that has not yet been spent.

Keys and Addresses

Public/private key pair
Elliptic curve keys where the private key signs and the public key verifies.
Elliptic Curve Digital Signature Algorithm (ECDSA)
The signature algorithm used in traditional Bitcoin transactions.
Wallet
Software that generates and stores a user’s keys and creates transactions.
Address
Encoded data telling a sender how to create an output a recipient can spend.
Pay-to-public-key-hash (P2PKH)
The traditional address format containing a hash of the recipient’s public key.
Base58Check
The text encoding, with a checksum, used for traditional Bitcoin addresses.
Checksum
Extra data added to an address to detect typing errors.
Script-hash address
An address containing the hash of a program that states spending conditions.
Taproot
A newer output type whose spending uses Schnorr signatures.
Schnorr signature
An elliptic curve signature scheme that lets several signatures be combined into one.

Transactions and Verification

Transaction
A signed record that consumes existing outputs and creates new ones.
Input
A reference to an earlier output being spent, with its authorization.
Output
An amount together with the condition required to spend it.
Transaction identifier (txid)
A hash of a transaction’s data used to refer to it.
Change
An output returning unused value to the sender.
Transaction fee
Input value minus output value, collected by the miner.
Full node
A node that independently verifies the entire blockchain and tracks unspent outputs.
Confirmed UTXO set
The unspent outputs implied by the blocks in a node’s active chain.
Mempool
A node’s collection of verified transactions not yet in a block.

Blocks and Replication

Miner
A participant who assembles candidate blocks and searches for valid proof of work.
Block
A header plus an ordered list of transactions.
Block header
The 80-byte summary of a block that is hashed for mining.
Previous block hash
The header field linking a block to its predecessor.
Block hash
The double SHA-256 hash of a block header.
nBits
The compact encoding of the mining target stored in the header.
Nonce
A 32-bit header field changed by the miner between hash attempts.
Lightweight client
A client that checks transaction inclusion with Merkle proofs rather than full validation.
Simplified payment verification (SPV)
Checking a transaction’s inclusion using block headers and a Merkle proof.
Archival full node
A full node that keeps the complete block history.
Pruned full node
A full node that discards old block data after validating it.

Proof of Work and Mining

Hashcash
A 1997 scheme requiring a costly hash search to deter spam.
Proof of work
An input whose hash meets a requirement, expensive to find but cheap to verify.
Target
The largest acceptable block hash value, interpreted as an integer.
Mining
Searching for a block header whose hash is at most the target.
Extra nonce
Variable data in the coinbase transaction that extends the mining search.
Difficulty Adjustment Algorithm (DAA)
Recomputing the target every 2,016 blocks to keep ten-minute average block times.
Hash rate
The number of hash attempts a miner or network makes per second.
Application-specific integrated circuit (ASIC)
A chip designed solely to compute one hash function quickly.
Mining pool
A group of miners who combine their hashing and share rewards.

Chain Selection, Attacks, and Confirmations

Accumulated work
The total expected hashing effort represented by a chain’s blocks. Also called chainwork.
Competing branches
Two or more chains that extend the same previous block.
Chain reorganization
Switching a node’s active chain to a branch with more accumulated work.
51% attack
Using a majority of the hash rate to rewrite or censor recent history.
Confirmation
One count for the transaction’s block plus one for each later block.

Rewards and Fees

Coinbase transaction
The first transaction in a block, creating new bitcoin for the miner.
Block subsidy
Newly created bitcoin a miner may claim in a block.
Block reward
The subsidy plus the fees of a block’s transactions.
Halving
Cutting the subsidy in half every 210,000 blocks.
Coinbase maturity
The rule that a block reward cannot be spent until 100 more blocks are added.