0x

Finite Fields

A finite field (or Galois field) is a set of elements with two operations (addition and multiplication) that satisfy the field axioms, and the set contains a finite number of elements. The most common finite fields are those with a prime number of elements, denoted as Fp\mathbb{F}_p or GF(p)GF(p), where pp is a prime number.

Why Prime Matters

If the modulus is prime, then no zero divisors exist, so every nonzero element has an inverse. For example, modulo 6 (which is not prime), we have

2×30(mod6)2 \times 3 \equiv 0 \pmod 6

even though neither 2 nor 3 is zero modulo 6. This means zero divisors exist and inverses do not always exist, breaking the field structure. In contrast, modulo 7 (which is prime), no such zero divisors exist, and every nonzero element has a multiplicative inverse.

Primes guarantee that the multiplicative group of nonzero elements forms a clean cycle of length p1p-1, ensuring a well-behaved algebraic structure.

To make this more concrete, we can visualize the field as a two-dimensional Cartesian grid, where each axis corresponds to an element of the field and each point represents a pair (x,y)Fp×Fp(x,y) \in \mathbb{F}_p \times \mathbb{F}_p. This helps us see the finite “universe” we are working in.

Fp\mathbb{F}_{p}

Another way to understand finite fields is through operation tables: addition and multiplication tables modulo a prime.

Tables below show addition and multiplication modulo a prime. These tables illustrate the closure property (results always stay within the field) and the existence of inverses (each element can be "undone" by another). The symmetry in the tables reflects commutativity of addition and multiplication in the field.

Fp\mathbb{F}_{p}

Addition table for 𝔽_17
012345678910111213141516
123456789101112131415160
234567891011121314151601
345678910111213141516012
456789101112131415160123
567891011121314151601234
678910111213141516012345
789101112131415160123456
891011121314151601234567
910111213141516012345678
101112131415160123456789
111213141516012345678910
121314151601234567891011
131415160123456789101112
141516012345678910111213
151601234567891011121314
160123456789101112131415
Multiplication table for 𝔽_17
00000000000000000
012345678910111213141516
024681012141613579111315
036912151471013162581114
048121637111526101415913
051015381316111649142712
061217132814391541016511
071441118155122916613310
081671561451341231121019
091102113124135146157168
010313616921251581114147
011516104159314821371126
012721494161161138315105
013951141062151173161284
014118521613107411512963
015131197531161412108642
016151413121110987654321

Addition and multiplication of a finite field always yield results within the field, and every nonzero element has a multiplicative inverse.

Finally, we can visualize finite fields as rings, highlighting their cyclic multiplicative structure.

Below is a ring representation of finite field. This ring visualization emphasizes cyclic structures and primitive roots, highlighting how the multiplicative group is generated.

Fp\mathbb{F}_{p}

Addition
3 + 58 (mod 17)
314
Multiplication
3 · 515 (mod 17)
In GF(p) with prime p, every nonzero element has a multiplicative

inverse; the multiplicative group is cyclic of order p−1. Primitive roots generate that group.

These three visualization approaches are complementary ways to understand finite fields: the Cartesian grid shows the universe of elements, the operation tables illustrate algebraic closure and the existence of inverses, and the ring diagrams highlight the cyclic multiplicative structures within the field.

Application to Crypto

Finite fields are fundamental in cryptography because they provide a finite but well-structured environment where addition, subtraction, multiplication, and division are always possible. This structure is essential for many cryptographic protocols, including Bitcoin, elliptic curve cryptography, and error-correcting codes, enabling secure and efficient computations.

Bitcoin's cryptography uses the finite field Fp\mathbb{F}_p where

p=2256232977.p = 2^{256} - 2^{32} - 977.

This prime was chosen because it is large enough to provide 256-bit security, has a special form that allows efficient arithmetic computations, and was designed transparently to avoid hidden weaknesses. This finite field underpins the secp256k1 elliptic curve used in Bitcoin's digital signatures and key generation.

Beyond Bitcoin, other finite fields like F28\mathbb{F}_{2^8} are used in AES encryption, and F225519\mathbb{F}_{2^{255}-19} is used in Curve25519, both critical components of modern cryptographic systems.