Elliptic curve → torus: tutorials

Tutorials for Elliptic curve → torus, the single-file, offline visualizer of elliptic curves over finite fields by Idle (idlebg.com). They show how to use it properly and what it can show, with many worked examples, for every level: from no maths at all to Bitcoin keys and research on elliptic curves.

The visualizer draws the points of y² = x³ + ax + b over F_p on a donut (a torus) and on eight other shapes, with the group law, negation as a mirror, the GLV endomorphism of Bitcoin’s curve, a flat map, orders and discrete logs on toy curves, and every way of writing a public key.

Start reading: 11 Start here, or pick a path below. All examples lists every example with a picture.

The visualizer

Every example opens the visualizer, elliptic_curve_torus_visualizer_v3.html: version 3.2.2, the released build, SHA-256 57b068d91e8c227af4066da6425144163eff10a671ef9f3852e3b1fb32663370. It is one HTML file that runs from disk in any current browser, with no network and no install. It comes from https://github.com/idlebg/EllipticTorus3d (source, MIT licence) and https://idlebg.com/idleGevrek/ (a gallery).

Every example has a screenshot, an Open this view link that opens the visualizer in exactly that state in a new tab, the steps to build it by hand, what to look at, and why it looks that way. Opening an example replaces the view the visualizer remembered; 11 Start here explains how to keep your own.

Where to start

if you want to read
just see what it does 11 to 16: Start here, dots, donut, distance, mirror, shapes
understand how Bitcoin keys work 11, 13 to 15, then 31 to 36: secp256k1, private to public, formats, parity, GLV, invalid points
teach this Level 1 and Level 2, then 96 For teachers
research elliptic curves 28 and 29, then 41 to 49, from The mapping

The four levels:

level for assumes
1 Explorer anyone curious a browser and a mouse
2 Learner students, teachers, developers new to elliptic curves school algebra; clock arithmetic is taught here
3 Bitcoiner Bitcoin users and developers has heard of keys and addresses
4 Researcher mathematicians, cryptographers groups and finite fields

Contents

Level 1 · Explorer

Level 2 · Learner

Level 3 · Bitcoiner

Level 4 · Researcher

Reference

How the numbers are checked

Every number, point, key, order or count in these tutorials is computed, never typed from memory, and checked twice:

  1. The live visualizer must show it. Each example is built by a script that opens the tutorials’ copy of the visualizer, sets the state the way a person would, and checks the claims of the text against what the page computes and shows (its model and the text of its panel) before it takes the screenshot.
  2. An independent computation must agree. Toy curves are checked by brute force, written separately from the visualizer; Bitcoin’s curve secp256k1 by the idleCore library and by OpenSSL; P-256 by OpenSSL.

49 Trusting the numbers shows how to redo any claim yourself.