liveBook · Manning

Finite field

As explained in Elliptic Curve Cryptography for Developers

A finite field is a field containing a finite number of elements, with addition, subtraction, multiplication, and division by nonzero elements defined within the set.

A finite field is a finite set of objects with closed addition, multiplication, and division through nonzero inverses. Addition has identity 0, multiplication has identity 1, and operations stay inside the set. Cryptographic elliptic curves use these rules to manipulate curve points with bounded, very large numbers. section 2.1 section 1.5

Prime fields make the idea operational: choose a prime p and compute values modulo p. Like a clock, results wrap around; 15 is congruent to 3 modulo 12. A prime-field clock with p = 43 returns to 0 after 42, while cryptographic field sizes can be astronomical. section 2.1

Figure 2.1 Adding 6 + 9 modulo 12 and modulo 24
figure

Use the clock view to see how the modulus changes an addition result: 6 + 9 wraps to 3 modulo 12 but remains 15 modulo 24. section 2.1

Prime-field routines provide the arithmetic needed for elliptic-curve work:

  • Addition, subtraction, multiplication, inversion, and division keep computations in the field. section 2.7
  • Quadratic residues determine whether an element is a perfect square in the field before attempting a modular square root. section 2.0 section 2.7
  • For prime moduli, square roots use exponentiation when the prime is congruent to 3 modulo 4 and Tonelli–Shanks when it is congruent to 1 modulo 4. section 2.7

From curve equation to field computation

For the ordinary curve equation y² = x³ + a₄x + a₆, first evaluate the right side in the chosen prime field. Then test whether it is a quadratic residue; only then compute a modular square root to obtain a possible y value. This avoids seeking a field element that does not exist. section 2.0

Finite-field arithmetic is the implementation layer beneath elliptic-curve point addition and multiplication. Large-integer routines from GMP support the modular operations used by cryptographic protocols, while curve and point structures organize those operations in code. section 2.0 section 3.2

Finite fields also give a geometric mental model for elliptic curves: repeating grids on a torus map to field elements, and cyclic behavior parallels the repetition of the curve picture. The practical focus remains fields based on large primes; fields based on powers of 2 or 3 are noted for constrained processors. section 3.1.2

How Elliptic Curve Cryptography for Developers covers it

How deep it goes
Defines prime-field rules, develops arithmetic subroutines, and explains residue testing and modular square-root algorithms.
Examples
Uses 12- and 24-hour clocks, a prime-field clock with 43, and the equation y² = x³ + a₄x + a₆.
What it assumes
Introduces prime-field basics while assuming multivariable equation manipulation, linear algebra, and polynomial familiarity.
What you can do after
Apply it via GMP-backed routines to perform prime-field arithmetic and support elliptic-curve computations.
How it connects
Connects modular arithmetic, prime numbers, quadratic residues, elliptic curves, point addition, and point multiplication.

Also explained in

Compare how 2 books explain finite field →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Elliptic Curve Cryptography for Developers. The section links point to the parts of the book it draws on.