
Finite Fields
A cryptographic calculation must give the same answer on every machine. Finite fields let us add, multiply and divide exactly while keeping every result inside a fixed set.
A finite field, also called a Galois field, is a finite set with addition and multiplication satisfying the field axioms. Subtraction and division by nonzero elements stay within the same set. A prime field with p elements is written Fp or GF(p).
Keep the remainder
For a prime p, the field Fp contains the integers 0 through p−1. Arithmetic wraps around modulo p. Two integers are congruent when they have the same remainder:
5+4≡2(mod7),2−5≡4(mod7).
The answer stays in the set. A negative intermediate value is reduced too: −3 and 4 differ by a multiple of 7.
Read the operation tables
Switch between addition and multiplication, then change the prime. Every result stays within the field: this is closure. Symmetry across the diagonal shows commutativity. Rows and columns are numbered from zero; an entry gives the result of combining its row and column.
Undo multiplication
Division means multiplying by an inverse. The inverse of a nonzero element a is the element a−1 satisfying aa−1≡1(modp).
Select a row in the multiplication table. Its entry equal to 1 identifies the inverse; row zero has none.
Modulo 7, 3×5=15≡1, so 3−1=5. Dividing 4 by 3 gives:
4÷3≡4×5≡6(mod7).
Check by multiplying back: 3×6≡4. This is exact division in the field, not a rounded version of 4/3 over the real numbers.
Why prime matters
Change the table's modulus to 6 and select row 2. No entry equals 1: multiplying by 2 only reaches 0, 2 and 4. In particular,
2×3≡0(mod6).
Two nonzero elements have multiplied to zero. Such elements are called zero divisors. Integer arithmetic modulo a composite number is not a field. Modulo a prime, every nonzero element has an inverse; division by zero remains undefined.
Finite fields can also contain pm elements for prime p and integer m>1. Those extension fields use a different construction, not ordinary integer arithmetic modulo pm.
Multiplication forms a group
The p−1 nonzero elements form a cyclic group under multiplication. A generator reaches all of them through repeated multiplication. Modulo 7, the powers of 3 visit
3, 2, 6, 4, 5, 1.
Not every element is a generator: powers of 2 only visit 2,4,1. The full multiplicative group has order p−1; an individual element can have a smaller order.
From numbers to points
A coordinate pair (x,y) takes two elements of the field. The grid below contains all p2 possible pairs. An elliptic curve
keeps only the pairs satisfying its equation, then adds a point at infinity.
Field size and security
secp256k1 uses the prime
p=2256−232−977.
The prime’s form makes modular reduction efficient: 2256≡232+977(modp), so high bits can be folded back into smaller terms. This field underpins the curve arithmetic used for Bitcoin’s public keys and signatures.
Its coordinates fit in 256 bits. That does not mean 256-bit security: the curve targets roughly 128-bit classical security. Field size, curve choice and subgroup order all matter; a larger coordinate representation is not itself a security proof. See SEC 2, §2.4.1 for the parameters and NIST SP 800-57, Table 2 for the security-strength comparison.
Other applications
AES uses F28 for byte arithmetic, while Curve25519 uses the prime field F2255−19. The AES field is an extension field: its multiplication is not integer multiplication modulo 256. See FIPS 197, §4 and RFC 7748, §4.1.
Finite fields also support error-correcting codes. Reed–Solomon codes evaluate polynomials over a finite field, allowing missing symbols to be recovered from enough remaining evaluations. Here the same exact arithmetic serves reliable transmission and storage.