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Γ—3≑0(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 pβˆ’1p-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.

(x,y)∈FpΓ—Fp(x,y) \in \mathbb{F}_p \times \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}

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.

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=2256βˆ’232βˆ’977.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 F2255βˆ’19\mathbb{F}_{2^{255}-19} is used in Curve25519, both critical components of modern cryptographic systems.