Bitcoin and Blockchain Technology, February-April 2021
Department of Law, University of Milano-Bicocca
e-learning: https://elearning.unimib.it/course/view.php?id=31997
If you have an e-mail @campus.unimib.it please join the 202102-bicocca 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 Milano-Bicocca only; anyone else, please consider https://dgi.io/workshop.
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.
Prerequisites
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.
Contents
- 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
- Workshop labs on Bitcoin Core, Electrum, and OpenTimestamps
Teaching language
Italian lessons, English slides.
Assessment
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 BBT202102-BICOCCA #1 for the first lesson, BBT202102-BICOCCA #2 for the second lesson, etc.
Schedule
Assistant lecturer: Paolo Mazzocchi.
- 2021-02-22 Monday 11:30-13:30
Bitcoin as Digital Gold
slides - 2021-02-24 Wednesday 11:30-13:30
Bitcoin as Digital Gold
slides - 2021-02-25 Thursday 09:30-11:30
Bitcoin as Digital Gold (Q&A)
slides - 2021-03-01 Monday 11:30-13:30
Hash Functions
slides
Discrete Logarithm Problem on (Finite Fields and) Elliptic Curves
slides - 2021-03-03 Wednesday 11:30-13:30
Discrete Logarithm Problem on (Finite Fields and) Elliptic Curves
slides - 2021-03-04 Thursday 09:30-11:30
Elliptic Curve Digital Signature Algorithm
slides
Extra: Schnorr Signature Algorithm (BIP340), Diffie-Hellman, Encryption Using AES
slides - 2021-03-08 Monday 11:30-13:30
Python workshop on Hash Functions and Elliptic Curve Digital Signature Algorithm
Blockchain, Mining, and Distributed Consensus
slides - 2021-03-10 Wednesday 11:30-13:30
Blockchain, Mining, and Distributed Consensus
slides - 2021-03-11 Thursday 09:30-11:30
Blockchain, Mining, and Distributed Consensus (Q&A)
slides - 2021-03-18 Thursday 09:30-11:30
Addresses, WIFs, and Bitcoin Message Signing
slides - 2021-03-22 Monday 11:30-13:30
Transactions and Scripts
slides - 2021-03-24 Wednesday 11:30-13:30
Timestamping and the OpenTimestamps Protocol
with Paolo Mazzocchi
slides - 2021-03-25 Thursday 09:30-11:30
Beyond Bitcoin: Altcoins, Tokens, Smart Contract, and Blockchain Applications
slides - 2021-03-29 Monday 11:30-13:30
Beyond Bitcoin: Altcoins, Tokens, Smart Contract, and Blockchain Applications
slides - 2021-03-31 Wednesday 11:30-13:30
Digital Signature and Digital Identity: From RSA to eIDAS
with Emanuele Cisbani
slides - 2021-04-07 Wednesday 11:30-13:30
New trends in FinTech: Blockchain and AI
with Filippo Annunziata
slides - 2021-04-08 Thursday 09:30-11:30
Regulation on Markets in Crypto-assets (MiCA)
with Andrea Conso
slides - 2021-04-12 Monday 11:30-13:30
The Tax Aspects of Crypto-Assets
with Francesco Avella
slides - 2021-04-15 Thursday 09:30-11:30
Le misure di prevenzione dei reati finanziari in ambito crypto-asset
with Vito Barbera
slides - 2021-04-19 Monday 11:30-13:30
Wallets and Deterministic Key Chains
slides - 2021-04-21 Wednesday 11:30-13:30
CBDC e Euro digitale
with Francesca Mattassoglio
slides - 2021-04-22 Thursday 09:30-11:30
The Cryptocurrency Frontier in Monetary Engineering
Bitcoin: oro digitale per nuovi standard monetari
Hayek Money and Dual Asset Ledger
slides and video
Hayek Money: The Cryptocurrency Price Stability Solution
In the last lesson anonymous course evaluation forms will be collected
Python library
btclib.org github.com/btclib-org/btclib
Python scripts, Excel spreadsheets, and regtest lab material
Introductory reading
- Ferdinando Ametrano,
“Bitcoin: oro digitale, finanza e tulipani”,
https://docs.google.com/document/d/1gecm0uT43tl8d4WFYNs9H_v3p70PPfPmQITR4GxSWkE
Technology references
- Satoshi Nakamoto,
“Bitcoin: A Peer-to-Peer Electronic Cash System” (2008),
https://bitcoin.org/bitcoin.pdf - Andreas M. Antonopoulos,
“Mastering Bitcoin: Programming the Open Blockchain” (2nd edition, 2017),
Oreilly & Associates Inc, 978-1491954386,
https://github.com/bitcoinbook/bitcoinbook - Jimmy Song,
“Programming Bitcoin: Learn How to Program Bitcoin from Scratch” (2020)
Oreilly & Associates Inc, 978-1492031499,
https://github.com/jimmysong/programmingbitcoin - A. Narayanan, et al.,
“Bitcoin and Cryptocurrency Technologies: A Comprehensive Introduction” (2016),
Princeton University Press, 978-0691171692,
https://www.coursera.org/learn/cryptocurrency, https://bitcoinbook.cs.princeton.edu, https://bitcoinbook.cs.princeton.edu, https://www.lopp.net/pdf/princeton_bitcoin_book.pdf - Pedro Franco,
“Understanding Bitcoin: Cryptography, Engineering and Economics” (2014),
Wiley, 978-1119019169 - Ferdinando Ametrano,
“Bitcoin, Blockchain, and Distributed Ledgers: Between Hype and Reality” (2017),
https://ssrn.com/abstract=2832249 - Roger Wattenhofer,
“Blockchain Science: Distributed Ledger Technology” (3rd edition, 2020),
Independently published, 978-1793471734
Cryptography references
- Christof Paar, Jan Pelzl,
“Understanding Cryptography”,
Springer, 978-3642041006
https://wiki.crypto.rub.de/Buch/en/slides.php, https://youtube.com/channel/UC1usFRN4LCMcfIV7UjHNuQg/videos - Dan Boneh,
“A Graduate Course in Applied Cryptography”,
Stanford University
https://www.coursera.org/learn/crypto, https://toc.cryptobook.us/ - Lawrence C. Washington,
“Elliptic Curves: Number Theory And Cryptography” (2008),
Chapman and Hall, 978-1420071467 - Standards for Efficient Cryptography Group
SEC 1: Elliptic Curve Cryptography, March 2009. Version 2.0.
https://www.secg.org/sec1-v2.pdf - Standards for Efficient Cryptography Group
SEC 2: Recommended Elliptic Curve Domain Parameters, March 2009. Version 2.0.
https://www.secg.org/sec2-v2.pdf - Guidelines for Efficient Cryptography
GEC 2: Test Vectors for SEC 1, September 1999. Version 0.3.
http://read.pudn.com/downloads168/doc/772358/TestVectorsforSEC%201-gec2.pdf
Monetary theory references
- Friedrich A. Hayek,
“Denationalisation of Money: The Argument Refined”,
https://mises.org/library/denationalisation-money-argument-refined - Saifedean Ammous,
“The Bitcoin Standard: The Decentralized Alternative to Central Banking” (2018),
Wiley, 978-1119473862 - Ferdinando Ametrano,
“Hayek Money: The Cryptocurrency Price Stability Solution” (2014),
https://ssrn.com/abstract=2425270 - Robert Sams,
“A Note on Cryptocurrency Stabilisation: Seigniorage Shares” (2015),
https://github.com/rmsams/stablecoins/blob/master/paper.pdf - Ferdinando Ametrano,
“Bitcoin: oro digitale per nuovi standard monetari (2020),
published in “Dal sesterzio al bitcoin”, Rubettino Editore (edited by Angelo Miglietta, and Alberto Mingardi)
https://drive.google.com/file/d/1-1k3wlL6ElZzJMjSakTjTNetJI5ws6wL