Lecture 15 - Cryptocurrencies III

Introduction

This lecture examines the technical foundations of cryptocurrencies, focusing on the mechanisms introduced in Satoshi Nakamoto’s Bitcoin protocol. The key objective of the protocol is to create a decentralised ledger that records transactions securely without relying on a central authority.

The fundamental economic and technological problem is the trust problem in decentralised systems. In traditional financial systems, institutions such as banks validate and record transactions. Cryptocurrencies attempt to replicate these functions through cryptography, incentives, and distributed verification.

The lecture therefore explores three core mechanisms:

  1. Cryptographic hash functions
  2. Proof-of-work and blockchain structure
  3. Digital signatures and authentication of transactions

Together these mechanisms ensure immutability, consensus, and trustless verification in cryptocurrency systems.


1. Cryptographic Hash Functions

Definition

A Cryptographic Hash Function (CHF) is a mathematical function that takes a bit string of arbitrary length and outputs a bit string of fixed length.

Bit Strings and Data Representation

All information stored digitally can be represented as bit strings, which are sequences of zeros and ones.

Examples of data represented as bit strings include:

  • Text
  • Images
  • Audio
  • Transaction records

Thus, in blockchain systems, all transaction data ultimately reduces to bit strings.

If a CHF is denoted by and the input bit string is , then the output

is called the hash of .


Properties of Cryptographic Hash Functions

A secure cryptographic hash function satisfies several crucial properties.

1. Fixed-Length Output

Regardless of the length of the input string, the output hash has constant length.

For example:

  • Bitcoin uses SHA256
  • Output length is 256 bits

Thus:


2. Efficiency

Definition

A function is efficient if computing is computationally easy.

Hash functions must be fast to compute, enabling nodes to verify transactions quickly.


3. Collision Resistance

Definition

A function is collision resistant if it is computationally infeasible to find two different inputs such that

This property ensures:

  • Data integrity
  • Tamper resistance

If an attacker modifies data, the hash changes.


4. Pseudo-randomness

Hash outputs appear random, even though the function itself is deterministic.

If the output length is , then the probability of obtaining a particular hash value is approximately:

Economic Intuition

Hash functions create a system where finding a specific output requires brute force search. This feature is crucial for the design of proof-of-work systems.


Pre-images

The pre-image of a hash refers to the set of inputs that produce that hash.

Given a hash value , finding an such that

is computationally difficult.

This is known as pre-image resistance.


Theoretical Interpretation

Cryptographic hash functions create computational asymmetry:

  • Creating valid structures (such as blocks) requires large computational effort.
  • Verifying validity requires minimal effort.

This asymmetry forms the economic foundation of blockchain security, as attackers must expend massive computational resources to manipulate the ledger.


2. Satoshi’s Protocol: Core Mechanism

The protocol can be understood through a simplified analogy involving a book composed of pages.

Each page represents what in Bitcoin is called a block.


Structure of the Ledger

A ledger is valid if:

  1. Page contains a predefined text.
  2. For every page :

The page contains:

  1. The hash of page
  2. Additional content
  3. A special number called a nonce

The nonce must satisfy a cryptographic condition.


Hash Linking

Each page begins with the hash of the previous page.

Thus

This creates a chain structure.

Definition

A Blockchain is a sequence of blocks where each block contains the hash of the previous block.


Proof-of-Work Condition

The page must also include a number such that the hash of the page begins with zeros.

This number is called the nonce.

Definition

A Proof-of-work is a nonce such that the hash of the block satisfies the difficulty condition.


Difficulty Parameter

The parameter determines the difficulty of mining.

Because hashes behave randomly:

Thus the expected number of attempts is:

Economic Intuition

Proof-of-work introduces computational scarcity. Producing a block requires large computational investment, which creates a cost that secures the network.


3. Consensus Rule

Participants follow a simple rule:

Always work on the longest valid blockchain known to you.

This ensures that the network converges toward a single shared ledger.

If two chains of equal length appear, nodes ignore the alternative until one becomes longer.


Theoretical Interpretation

This rule implements a decentralised consensus mechanism.
Rational participants coordinate on the longest chain because it represents the chain with the greatest cumulative computational work.


4. Security of the Protocol

To verify that the protocol is stable, several deviations must be considered.


Deviation 1: Modifying Previous Blocks

Suppose an attacker modifies block where .

Because hashes are linked, the attacker must recompute:

  • block
  • block
  • ...
  • block

Total work required:

Meanwhile the honest chain continues to grow.

Economic Intuition

The attacker must catch up with the entire network's computational power, making the attack extremely unlikely unless the attacker controls the majority of computing power.


Deviation 2: Ignoring Updates

A miner could ignore newly discovered blocks and continue mining their own chain.

However:

  • The rest of the network grows faster
  • Their chain falls behind

Expected growth rate is lower.


Deviation 3: Withholding a Block

A miner might discover a valid block but keep it secret to gain a head start.

However:

  • The network continues mining
  • The secret advantage disappears quickly

This makes withholding unprofitable in expectation.


Summary

The protocol discourages deviations because:

  • Rewriting history requires enormous computation
  • Ignoring consensus reduces expected rewards
  • Withholding blocks provides little advantage

5. Digital Signatures

While the blockchain structure secures the ledger, it does not yet guarantee that transactions are authorised.

Bitcoin therefore uses digital signatures.


Definition

A digital signature is a cryptographic method that verifies the identity of the sender of a message.


Public and Private Keys

Each individual generates two mathematical functions:

  • Public key:
  • Private key:

These functions satisfy

The public key is shared publicly, while the private key remains secret.


Authentication Process

To send a message , individual sends

where

Others verify authenticity by computing$$
s_A(\tilde{m}) = m

Only $A$ could produce $\tilde{m}$ because only $A$ knows the private key. --- > [!abstract] Theoretical Interpretation > Asymmetric cryptography solves the **authentication paradox** in trustless environments: > > - Anyone can verify a signature > - Only the owner can generate it This allows secure transaction validation without central authority. --- # 6. Blockchain Transactions In the final version of the protocol, the blockchain records **transactions instead of messages**. --- ## Authenticated Transactions A transaction is represented as

(A, x, B, \tilde{m})

s_A(\tilde{m}) = (A,x,B)

--- ## Block Structure Each block contains: 1. Hash of previous block 2. Sequence of authenticated transactions 3. Nonce satisfying proof-of-work A transaction is only valid if the sender's balance is sufficient. --- > [!info] Economic Intuition > The blockchain effectively becomes a **distributed accounting ledger** where balances update through validated transactions. --- # 7. Economic Significance of Blockchain Blockchain combines several mechanisms to achieve decentralised trust. Core features include: - **Immutability** Past records cannot be modified. - **Decentralisation** No central authority controls the ledger. - **Incentive compatibility** Participants are rewarded for following the protocol. - **Security through computation** Manipulating the system requires overwhelming computational resources. --- > [!tip] Exam Insight > <span class="ob-exam">Typical exam question:</span> > Explain how proof-of-work and cryptographic hashing ensure the integrity of blockchain systems. > > High-scoring answers should discuss: > - hash linking of blocks > - difficulty parameter > - probabilistic mining process > - economic incentives --- # Key Takeaways > [!summary] >- Cryptographic hash functions transform arbitrary data into fixed-length hashes. >- Hash properties include efficiency, pseudo-randomness, and collision resistance. >- Proof-of-work requires miners to find a nonce producing a hash with $d$ leading zeros. >- Blockchain security arises from the cost of recomputing hashes. >- Digital signatures allow transaction authentication. >- Bitcoin combines cryptography and economic incentives to create decentralised trust. --- # References Mankiw, N. G. and Taylor, M. P. (2023) *Macroeconomics*. 6th ed. Andover: Cengage Learning. Nakamoto, S. (2008) *Bitcoin: A Peer-to-Peer Electronic Cash System*. Vigier, A. (2026) *Cryptocurrencies – Lecture 3*. University of Nottingham.