Skip to content
 
 

Latest commit

 

History

179 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bitcoin and Blockchain Technology

The course is taught at:

  • University of Milano-Bicocca
  • Politecnico di Milano
  • University of Milano

The latest version of the course slides is available from the course page at http://www.ametrano.net/bbt/.

Other material available in this repo:

  • the calc folder includes LibreOffice Calc spreadsheets illustrating finite fields and elliptic curves
  • the excel folder includes Excel spreadsheets illustrating finite fields and elliptic curves
  • the ipynb folder includes Jupyter notebooks
  • the py-scripts folder includes Python scripts: most of them require the btclib library, and pyproject.toml declares which interpreter and which packages the environment is built with
  • the regtest-lab folder includes information for a regtest session using Bitcoin Core

There is no release: nothing here is published to an index or cut as a GitHub release, the material ships by being read here and by being cloned, and CONTRIBUTING.md's A version, and no release is what the placeholder version in pyproject.toml is for.

Limitations, not vulnerabilities

These are known and inherent, and each is what the material is for. They are here rather than in a security policy because this repository publishes nothing and so keeps no SECURITY.md of its own: the policy shown at security/policy is the organization's, and a shared file cannot name what is this tree's.

  • lab-tutorial/01.md publishes a private key, its WIF and the address it derives, as the worked example of importing one into a wallet. Anybody who reads the page can spend anything sent to that address. It is published deliberately, and it is the reason the page is a tutorial and not a wallet guide: use a key of your own, generated as the page describes, and treat every key printed in this repository as somebody else's.
  • The secret scanner does not catch that, and would not with its entropy plugins on either — measured, detect-secrets scan lab-tutorial/01.md with every plugin enabled reports nothing, a WIF key in prose being neither hex nor base64 to it. .pre-commit-config.yaml says what the scanner is kept for; a key in a page is a reader's job to notice, and this section is that notice.
  • py-scripts/speedup_*.py seed random with a constant, so the scalars they multiply are the same on every run. That is what makes a timing comparison a comparison. None of those values is a key, and no script that yields one draws it from randomgrep -l "import random" py-scripts/*.py names them, all of them speedup_*. The scripts that generate a key use secrets; the rest start from a published test vector.
  • The scripts print what they compute, keys included, because showing the intermediate value is the whole of the demonstration. A terminal history is not a place to leave one.
  • Nothing here has been audited as an implementation. The point of a script that reimplements a curve operation is that a reader can follow it, and the version that is easiest to follow is not the version to put a key into.

What is worth reporting is narrow for the same reason: a step that would lose somebody money if they followed it, a key committed that was not meant to be published, a script that does something other than what its page says. A defect in what the scripts call is btclib's, and a defect in a wallet, a key generator or a block explorer that lab-tutorial/ walks through is its author's — though routing a report is the maintainers' job, not the reporter's, so report it wherever you found it.

Working here: CONTRIBUTING.md for how to, REVIEWING.md for what a pull request is answered against.

About

Bitcoin and Blockchain Technology Course Material

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

5 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages