Math Guide
Mathematical foundations for Halo 2 and Zcash Orchard
Abstract
This volume of The Zcash Arboretum develops the mathematics underlying the cryptography of Zcash from first principles, assuming only elementary algebra and calculus. It builds a single tower: the notation of sets, functions, and relations in which every later claim is written and spoken; the integers and their remainders modulo a prime, where an extended Euclidean algorithm turns division into multiplication by an inverse; the abstract structures—groups, rings, and fields—that name the laws this arithmetic obeys; polynomials over a field, whose scarcity of roots lets two enormous polynomials be compared at a single random point; the finite fields, their possible sizes, and their cyclic multiplicative structure; the number theory of squares, square roots, and the discrete logarithm; linear algebra and the inner products behind short algebraic receipts for long lists of secrets; the roots of unity that furnish evaluation domains and the fast Fourier transform; elliptic curves, whose point groups have no known subexponential discrete-log attack when chosen appropriately; and finally the probability, asymptotics, and model of computation required to state—and mean—a claim of 128-bit security.
The series consumes three artefacts of this tower: the Pasta curve cycle, constructed in §10; the polynomial machinery on which Halo 2 rests, developed in §5 and §9; and the security-statement language, fixed in §11. A first reading takes the sections in order; a reader after one artefact may enter at its section and follow its backward references down the tower.
Contents
- 1 Notation: sets, functions, and relations
-
2 The integers and modular arithmetic
- 2.1 Well-ordering and the integers
- 2.2 Divisibility
- 2.3 The division algorithm
- 2.4 The greatest common divisor and the Euclidean algorithm
- 2.5 The Bézout identity and the extended Euclidean algorithm
- 2.6 Primes and the fundamental theorem of arithmetic
- 2.7 Congruences and residue classes
- 2.8 Units modulo and modular inverses
- 3 Groups
- 4 Rings and fields
- 5 Polynomials over a field
- 6 Finite fields
- 7 Number theory for cryptography
- 8 Linear algebra over a field
-
9 Roots of unity and evaluation domains
- 9.1 Roots of unity
- 9.2 Existence over finite fields: the condition
- 9.3 The evaluation domain and its vanishing polynomial
- 9.4 The Lagrange basis on
- 9.5 Evaluation and interpolation as mutually inverse linear maps
- 9.6 The number-theoretic transform and convolution
- 9.7 The fast Fourier transform
- 9.8 The role of smooth multiplicative domains in polynomial proof systems
-
10 Elliptic curves
- 10.1 Weierstrass equations
- 10.2 The point at infinity, geometrically
- 10.3 The chord-and-tangent group law: geometry
- 10.4 Explicit affine formulas
- 10.5 Identity, inverses, commutativity, and associativity
- 10.6 Projective and Jacobian coordinates
- 10.7 Scalar multiplication and double-and-add
- 10.8 The group structure of
- 10.9 Torsion, the cofactor, and prime-order subgroups
- 10.10 Base fields, scalar fields, and the Pasta cycle
- 10.11 The elliptic-curve discrete logarithm problem
- 10.12 The -invariant and the GLV endomorphism
- 10.13 A worked toy example
- 10.14 Pallas and Vesta assembled
-
11 Probability, asymptotics, and computation
- 11.1 Finite probability spaces and events
- 11.2 Conditional probability and independence
- 11.3 Random variables and expectation
- 11.4 The union bound and a birthday calculation
- 11.5 Statistical distance
- 11.6 Uniform sampling and the bias of modular reduction
- 11.7 Beyond finite spaces: countable additivity, limits, and densities
- 11.8 Asymptotic notation
- 11.9 Polynomial, exponential, and negligible functions
- 11.10 Algorithms, running time, and PPT
- 11.11 The security parameter