Bitcoin and Blockchain Technology, April-June 2024

Department of Mathematics, University of Milan

If you have an e-mail please join the 202404-math channel in the Slack BBT workspace using your first and last name (no nicknames) and a profile picture. Updates and conversations about the course will be posted in the Slack channel.

The course is for the students of University of Milan (La Statale) only; anyone else, please consider

Learning objectives

The course is an introduction to bitcoin and the associated blockchain technology.

Starting from a computationally focused approach to elliptic curves over finite fields and presenting the discrete logarithm problem as the cornerstone of public-key cryptography, bitcoin is introduced as ingenious breakthrough innovation.

Its game theory, computer science (distributed systems, distributed consensus), and monetary theory elements are examined in the attempt to properly convey the interdisciplinarity of the topic and appreciate its relevance.

Technical and programming elements about digital signatures, blockchain, Merkle tree, addresses, transactions, and timestamping are also provided to assess features and limits of the Bitcoin protocol.


There are no strict prerequisites, even if a computer science mindset and some familiarity with algebra and finance might help to appreciate the course. While a rigorous formal approach is almost impossible in a course touching on so many and so different knowledge areas, intellectual curiosity is stimulated about the interplay between maths, cryptography, economic incentives, technology, monetary theory, regulatory issues, and politics.


  • Cash, Electronic Money, Central Bank Money, eCash
  • Internet Money
  • Bitcoin Transactions
  • About Money
  • Private Money and the Centralization Dilemma
  • The Double Spending Problem
  • Bitcoin as Digital Gold
  • Bitcoin as Investment Asset
  • Bitcoin Financial Services
  • Discrete Logarithm Problem on Finite Cyclic Groups
  • Modular Arithmetic
  • Finite Fields
  • Elliptic Curves Over Real Numbers
  • DLP on Elliptic Curves Over Finite Fields
  • Hash Functions
  • Partial Hash Inversion
  • Hash Pointer Data Structures: Blockchain and Merkle Tree
  • Design of A Simplified Digital Currency
  • Distributed Consensus
  • Mining
  • P2P Network
  • Protocol Governance
  • Elliptic curve digital signature algorithm
  • Elliptic curve Schnorr signature algorithm: Mu(lti)Sig(nature), threshold signature, batch verification
  • Addresses and WIFs
  • Hierarchical deterministic wallets: BIP32, BIP43, BIP44
  • Mnemonic phrase: BIP39 and Electrum
  • TxIns, TxOs, UTxO, nLockTime
  • Bitcoin script language
  • Transactions
  • Blocks
  • Wallets and Bitcoin Core
  • Testnet, regtest, and wallet workshop
  • Money and innovation: monetary and token engineering
  • Hayek money and dual asset ledger money
  • Blockchain beyond bitcoin
  • Finance and blockchain
  • Timestamping, notarization, and anchoring
  • Smart contracts
  • Distributed ledger technology

Teaching method

  • Slide based lessons with associated bibliography
  • Python 3 programming assignments and technology assignments (workbooks)
  • Workshop labs on Bitcoin Core, Electrum, and OpenTimestamps

Teaching language

Italian or English, the latter if foreign students are present.


To pass the exam each student must solve all the assignments for every lesson. Please send the assignments to the e-mail that will be indicated with subject bbt202404-math #1 for the first lesson, bbt202404-math #2 for the second lesson, etc.


  1. 2024-04-15 Monday 17:15-19:00, aula 5
    Bitcoin as Digital Gold (Part 1)
  2. 2024-04-22 Monday 17:15-19:00, aula 5
    Bitcoin as Digital Gold (Part 2)
  3. 2024-05-06 Monday 17:15-19:00, aula 5
    Discrete Logarithm Problem on Finite Fields and Elliptic Curves
  4. 2024-05-08 Wednesday 17:15-19:00, aula 5
    Hash Functions
    Blockchain, Mining, and Distributed Consensus (Part 1)
  5. 2024-05-15 Wednesday 17:15-19:00, aula 5
    Blockchain, Mining, and Distributed Consensus (Part 2)
  6. 2024-05-20 Monday 17:15-19:00, aula 5
    Elliptic Curve Digital Signature Algorithm (ECDSA)
    Schnorr Signature Algorithm (BIP340)
    Optimization of The Elliptic Curve Scalar Multiplication
  7. 2024-05-22 Wednesday 16:15-19:00, aula 10
    Addresses, WIFs, and Bitcoin Message Signing
    Transactions and Scripts
  8. 2024-06-03 Monday 17:00-19:00, aula 10
    Deterministic Key Chains
    Wallets and Custody
    Timestamping and the OpenTimestamps Protocol
  9. 2024-06-05 Wednesday 17:00-19:00, online
    Beyond Bitcoin: Between Hype and Reality
    Financial Products and Services for the Blockchain Economy
  10. 2024-06-10 Monday 16:15-19:00, aula 10
    The Cryptocurrency Frontier in Monetary Engineering
    slides and video
    Bitcoin: oro digitale per nuovi standard monetari
    Hayek Money: The Cryptocurrency Price Stability Solution

Python library

Python scripts, Excel spreadsheets, and regtest lab material

Introductory reading

Technology references

Cryptography references

Monetary theory references