# 有限域算术

**有限域算术**是在有限域中进行的算术；有限域是仅含有限个元素的域，与有理数等无限域中的算术相对<sup>[23](https://people.computing.clemson.edu/~jmarty/papers/IntroToGaloisFieldsAndRSCoding.pdf)</sup>。由于对域元素的每次运算总是产生同一有限集合中的另一个元素，这种算术构成一个封闭系统，其中加法、减法、乘法和除法均有定义<sup>[1](https://www.cs.cmu.edu/~realworld/reedsolomon/reed_solomon_codes.html)</sup>。它是高级加密标准、里德-所罗门纠错、椭圆曲线密码学和零知识证明系统的基础。

| 关键事实 | 详情 |
|---|---|
| 定义 | 在含有限个元素的域中进行的算术，与有理数等无限域中的算术相对<sup>[23](https://people.computing.clemson.edu/~jmarty/papers/IntroToGaloisFieldsAndRSCoding.pdf)</sup> |
| 存在哪些域 | 对每个素数幂 \( q = p^{d} \)（\( d \geq 1 \)），在同构意义下存在唯一的含 \( q \) 个元素的有限域 \( \mathbb{F}_q \)，且每个有限域都具有这种形式<sup>[2](https://charleshzh.github.io/oCAS/latest/en/math/finite-fields.html)</sup> |
| 素域 | 素数阶 \( p \) 的域中的算术，就是整数模 \( p \) 的算术<sup>[3](https://ocw.mit.edu/courses/18-783-elliptic-curves-spring-2021/0426951d57469c4b4699f47dd82b047b_MIT18_783S21_Slides3.pdf)</sup> |
| 扩域 | \( \mathbb{F}_{p^d} \) 表示为 \( \mathbb{F}_p[x]/(f) \)，其中 \( f \) 是次数为 \( d \) 的不可约多项式，从而把所有计算归结为整数和多项式算术<sup>[3](https://ocw.mit.edu/courses/18-783-elliptic-curves-spring-2021/0426951d57469c4b4699f47dd82b047b_MIT18_783S21_Slides3.pdf)</sup> |
| 特征 2 | 在 \( \mathrm{GF}(2^w) \) 中，加法和减法是按位异或，而乘法更复杂，通常用乘法表或离散对数表实现<sup>[4](https://lihaoxu.eng.wayne.edu/NISL/Papers/Journals/Code_Perf.pdf)</sup> |
| 标准化示例 | AES 将每个字节解释为 \( \mathrm{GF}(2^8) \) 的一个元素，乘法按 \( m(x) = x^8 + x^4 + x^3 + x + 1 \) 取模约简<sup>[5](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.197-upd1.ipd.pdf)</sup> |
| 软件支持 | Sage、FLINT 和 GF-Complete 等库提供具有多种内部表示的有限域算术<sup>[6](https://doc.sagemath.org/html/en/reference/finite_rings/sage/rings/finite_rings/finite_field_constructor.html)</sup><sup> • </sup><sup>[7](https://flintlib.org/doc/fq_nmod.html)</sup><sup> • </sup><sup>[8](https://web.eecs.utk.edu/~jplank/plank/papers/UT-CS-13-717.html)</sup> |

## 域及其分类

有限域所含元素个数必定是素数幂。分类定理指出，对每个满足 \( d \geq 1 \) 的素数幂 \( q = p^d \)，在同构意义下存在唯一的含 \( q \) 个元素的有限域 \( \mathbb{F}_q \)，并且每个有限域都具有这种形式<sup>[2](https://charleshzh.github.io/oCAS/latest/en/math/finite-fields.html)</sup>。素数 \( p \) 是该域的特征。当 \( d = 1 \) 时，该域就是素域 \( \mathbb{F}_p \)，其算术就是整数模 \( p \) 的算术<sup>[3](https://ocw.mit.edu/courses/18-783-elliptic-curves-spring-2021/0426951d57469c4b4699f47dd82b047b_MIT18_783S21_Slides3.pdf)</sup>。

次数为 \( d \) 的扩域通过添加一个不可约多项式的根来构造：\( \mathbb{F}_{p^d} \cong \mathbb{F}_p[x]/(f) \)，其中 \( f \) 是次数为 \( d \) 的不可约多项式<sup>[3](https://ocw.mit.edu/courses/18-783-elliptic-curves-spring-2021/0426951d57469c4b4699f47dd82b047b_MIT18_783S21_Slides3.pdf)</sup><sup> • </sup><sup>[7](https://flintlib.org/doc/fq_nmod.html)</sup>。\( f \) 的选择在同构意义下不改变域，但某些选择比其他选择给出更快的算术<sup>[3](https://ocw.mit.edu/courses/18-783-elliptic-curves-spring-2021/0426951d57469c4b4699f47dd82b047b_MIT18_783S21_Slides3.pdf)</sup>。一个相关的结构事实是有限域是完美域：有限域上的每个不可约多项式都是可分的<sup>[9](https://ocw.mit.edu/courses/18-783-elliptic-curves-spring-2021/b6d0aef71278ad8c1d8b5144c4138cb7_MIT18_783S21_notes3.pdf)</sup>。

## 特征 2 中的算术

形如 \( \mathrm{GF}(2^w) \) 的域在实际计算中占主导地位，因为其元素是 \( w \) 位字。加法和减法都是按位异或，因此在硬件或软件中几乎不花代价<sup>[4](https://lihaoxu.eng.wayne.edu/NISL/Papers/Journals/Code_Perf.pdf)</sup>。乘法更复杂。一种常见的软件方法使用乘法表或离散对数表，把乘法转换为查表和一次整数加法<sup>[4](https://lihaoxu.eng.wayne.edu/NISL/Papers/Journals/Code_Perf.pdf)</sup>。

高级加密标准完整展示了这种方法。FIPS 197 将状态数组的每个字节解释为 \( \mathrm{GF}(2^8) \) 的 256 个元素之一，\( \mathrm{GF}(2^8) \) 也称为伽罗瓦域<sup>[5](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.197-upd1.ipd.pdf)</sup>。每个字节 \( \{b_7 \ldots b_0\} \) 被读作多项式 \( b(x) = b_7 x^7 + \cdots + b_1 x + b_0 \)。加法是系数逐项模 2 相加，即两个字节的异或；由于系数按模 2 约简，加法等于减法，且任何元素与自身之和为零<sup>[5](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.197-upd1.ipd.pdf)</sup>。乘法先将两个多项式相乘，再把结果对固定多项式 \( m(x) = x^8 + x^4 + x^3 + x + 1 \) 取模约简<sup>[5](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.197-upd1.ipd.pdf)</sup>。乘以 \( x \) 的运算被 AES 称为 xtime()，它是一次左移，随后与 \( \{1b\} \) 进行条件异或；乘以任何常数都由重复的 xtime 步骤构成；例如 \( \{57\} \cdot \{13\} = \{fe\} \)<sup>[5](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.197-upd1.ipd.pdf)</sup>。逆元用扩展欧几里得算法求得<sup>[5](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.197-upd1.ipd.pdf)</sup>。FIPS 197 于 2001 年 11 月 26 日发布，并于 2023 年 5 月 9 日更新；更新为编辑性修改，算法没有技术性变化<sup>[10](https://csrc.nist.gov/pubs/fips/197/final)</sup>。

## 表示与基

同一个域可以用不同的基来表示，而基的选择会强烈影响性能。在多项式基中，一个元素是 \( \mathbb{F}_p \) 上 \( d \) 个系数构成的向量；在正规基中，即形如 \( \{\alpha, \alpha^q, \ldots, \alpha^{q^{n-1}}\} \) 的基中，元素的 \( q \) 次幂是其坐标的循环移位<sup>[11](https://arxiv.org/abs/1807.09927)</sup>。正规基适合硬件实现，因为其运算主要由旋转、移位和异或组成<sup>[12](https://scialert.net/fulltext/?doi=jas.2006.1362.1372)</sup>。在正规基中，平方只是比特串的简单旋转；这一性质是正规基相对于多项式基表示的主要优势<sup>[13](https://diglib.tugraz.at/download.php?id=576a791f4741d&location=browse)</sup>。

为使结果在不同系统间可复现，许多工具标准化采用康威多项式；康威多项式为每一对 \( (p, n) \) 固定一个规范不可约多项式。Sage 对小域默认使用康威多项式<sup>[6](https://doc.sagemath.org/html/en/reference/finite_rings/sage/rings/finite_rings/finite_field_constructor.html)</sup>；FLINT 的 \( \texttt{fq\_nmod} \) 模块在可用时从弗兰克·吕贝克（Frank Lübeck）的数据库中选取 \( (p, n) \) 对应的康威多项式，否则回退到随机不可约多项式<sup>[7](https://flintlib.org/doc/fq_nmod.html)</sup>。

## 软件与硬件实现

**软件库。** Sage 用若干整数模类原生实现素域；对于元素数低于 \( 2^{16} \) 的小扩域，通过 Givaro C++ 库使用泽赫对数表实现；特征 2 扩域通过 NTL 实现；所有其他扩域通过 PARI 实现<sup>[6](https://doc.sagemath.org/html/en/reference/finite_rings/sage/rings/finite_rings/finite_field_constructor.html)</sup>。FLINT 是一个数论 C 库，提供有限域模块，包括用于特征可用一个机器字表示的有限域的 \( \texttt{fq\_nmod} \)、用于泽赫对数表示的 \( \texttt{fq\_zech} \)，以及统一的 \( \texttt{fq\_default} \) 接口<sup>[7](https://flintlib.org/doc/fq_nmod.html)</sup><sup> • </sup><sup>[14](https://flintlib.org/doc/)</sup>。针对纠删码，普兰克（Plank）及其同事综述了 \( \mathrm{GF}(2^w) \) 算术的软件实现技术，并发布了实现这些技术的开源库 GF-Complete<sup>[8](https://web.eecs.utk.edu/~jplank/plank/papers/UT-CS-13-717.html)</sup>。

**硬件与电路。** 里德-所罗门编码器和解码器需要在硬件中执行有限域运算，而通用处理器不原生提供伽罗瓦域指令，因此需要专用电路或软件例程<sup>[1](https://www.cs.cmu.edu/~realworld/reedsolomon/reed_solomon_codes.html)</sup>。NIST 的电路复杂度项目报告称，广泛使用的里德-所罗门码 RS(255,223) 的标准实现需要 768 个门，而其线性电路优化技术生成了一个含 412 个门的电路<sup>[15](https://csrc.nist.gov/Projects/circuit-complexity)</sup>。同一团队给出了用于二进制多项式乘法的卡拉楚巴型递归：\( M(8n) \leq 26 \cdot M(n) + 147n - 40 \)，意思是两个次数为 \( 8n - 1 \) 的多项式相乘，可以使用 26 次次数为 \( n \) 的多项式乘法，加上 \( 147n - 40 \) 个异或门<sup>[15](https://csrc.nist.gov/Projects/circuit-complexity)</sup>。

## 应用

**纠错。** 里德-所罗门码定义在有限域上，其编码器和解码器直接执行有限域算术；生成多项式构造使每个有效码字都能被生成多项式整除<sup>[1](https://www.cs.cmu.edu/~realworld/reedsolomon/reed_solomon_codes.html)</sup>。BCH 和里德-所罗门码的实现同样依赖 \( \mathrm{GF}(2^m) \) 上的算术<sup>[16](https://arxiv.org/abs/2310.12319)</sup>。数据存储中的纠删码是这种算术的主要使用者<sup>[8](https://web.eecs.utk.edu/~jplank/plank/papers/UT-CS-13-717.html)</sup>。

**密码学。** 除 AES 之外，有限域还支撑椭圆曲线密码学和其他公钥方案；在这些方案中，上层算法的效率在很大程度上取决于底层域算术<sup>[17](https://dna.cs.byu.edu/papers/pdf/mascots.pdf)</sup>。零知识证明系统将其约束表示为有限域上的多项式方程组，其中所用的有限域通常是元素位数介于 64 位与 256 位之间的大素域<sup>[18](https://arxiv.org/abs/2604.26709)</sup>。这推动了新的工具开发：有人提出了有限域算术的 SMT-LIB 理论，以支持求解器之间的互操作性<sup>[19](https://arxiv.org/abs/2407.21169)</sup>；基于 SMT 的验证器现在会检查在有限域上表达的零知识电路约束<sup>[20](https://arxiv.org/abs/2601.09372)</sup>。

## 历史

有限素域 \( \mathbb{F}_p \) 的结构理论在 17 世纪和 18 世纪得到了皮埃尔·德·费马（Pierre de Fermat）、莱昂哈德·欧拉（Leonhard Euler）、约瑟夫-路易·拉格朗日（Joseph-Louis Lagrange）和阿德里安-马里·勒让德（Adrien-Marie Legendre）的贡献。一般理论始于卡尔·弗里德里希·高斯（Carl Friedrich Gauss）和埃瓦里斯特·伽罗瓦（Évariste Galois）：高斯的贡献包括多项式环 \( \mathbb{F}_p[x] \) 中的算术，尤其是欧几里得算法和唯一分解；伽罗瓦在其 1830 年发表于费吕萨克公报（Férussac's Bulletin）的论文《论数论》（On the theory of numbers）中构造了有限域，他所描述的 \( p^{\nu} \) 个元素构成了如今所称的伽罗瓦域或阶为 \( p^{\nu} \) 的有限域<sup>[21](https://www.sciencedirect.com/science/article/abs/pii/S1570795496800131)</sup>。在 1893 年芝加哥（Chicago）大会上，E. H. 摩尔（E. H. Moore）指出，每个有限域都是伽罗瓦域 \( \mathrm{GF}(p^n) \) 的“抽象形式”；这一表述有助于把该概念带入抽象代数<sup>[22](https://www.researchgate.net/publication/278618865_A_History_of_Galois_fields)</sup>。

## References

1. [Reed-Solomon Codes, Real World Technologies (CMU)](https://www.cs.cmu.edu/~realworld/reedsolomon/reed_solomon_codes.html)
2. [Foundations: Finite Fields and Modular Arithmetic, oCAS](https://charleshzh.github.io/oCAS/latest/en/math/finite-fields.html)
3. [18.783 S2021 Lecture 3: Finite Field Arithmetic (slides), MIT OpenCourseWare](https://ocw.mit.edu/courses/18-783-elliptic-curves-spring-2021/0426951d57469c4b4699f47dd82b047b_MIT18_783S21_Slides3.pdf)
4. [Performance of Reed-Solomon Codes in Storage Systems (Xu et al.)](https://lihaoxu.eng.wayne.edu/NISL/Papers/Journals/Code_Perf.pdf)
5. [FIPS 197 update 1 (initial public draft), Advanced Encryption Standard, NIST](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.197-upd1.ipd.pdf)
6. [Finite fields, SageMath Reference Manual](https://doc.sagemath.org/html/en/reference/finite_rings/sage/rings/finite_rings/finite_field_constructor.html)
7. [fq_nmod.h – finite fields (word-size characteristic), FLINT documentation](https://flintlib.org/doc/fq_nmod.html)
8. [A Complete Treatment of Software Implementations of Finite Field Arithmetic for Erasure Coding Applications (Plank et al., UT-CS-13-717)](https://web.eecs.utk.edu/~jplank/plank/papers/UT-CS-13-717.html)
9. [18.783 S2021 Lecture 3: Finite Field Arithmetic (notes), MIT OpenCourseWare](https://ocw.mit.edu/courses/18-783-elliptic-curves-spring-2021/b6d0aef71278ad8c1d8b5144c4138cb7_MIT18_783S21_notes3.pdf)
10. [FIPS 197, Advanced Encryption Standard (AES), NIST CSRC](https://csrc.nist.gov/pubs/fips/197/final)
11. [Normal bases and irreducible polynomials, arXiv:1807.09927](https://arxiv.org/abs/1807.09927)
12. [Hardware Implementations of GF(2^m) Arithmetic Using Normal Basis, Journal of Applied Sciences](https://scialert.net/fulltext/?doi=jas.2006.1362.1372)
13. [4. Finite-Field Arithmetic, Graz University of Technology dissertation](https://diglib.tugraz.at/download.php?id=576a791f4741d&location=browse)
14. [FLINT: Fast Library for Number Theory, documentation](https://flintlib.org/doc/)
15. [Circuit Complexity, NIST CSRC](https://csrc.nist.gov/Projects/circuit-complexity)
16. [Arithmetic Operators over Finite Field GF(2^m) for Error Correction Codes Application, arXiv:2310.12319](https://arxiv.org/abs/2310.12319)
17. [Performance of Finite Field Arithmetic in an Elliptic Curve, Brigham Young University](https://dna.cs.byu.edu/papers/pdf/mascots.pdf)
18. [An Effective Orchestral Approach to Satisfiability Modulo Prime Fields, arXiv:2604.26709](https://arxiv.org/abs/2604.26709)
19. [An SMT-LIB Theory of Finite Fields, arXiv:2407.21169](https://arxiv.org/abs/2407.21169)
20. [Formally Verifying Noir Zero Knowledge Programs with NAVe, arXiv:2601.09372](https://arxiv.org/abs/2601.09372)
21. [Finite Fields and Their Applications, Handbook of Algebra, Volume 1 (1996), ScienceDirect](https://www.sciencedirect.com/science/article/abs/pii/S1570795496800131)
22. [A history of Galois fields (Frédéric Brechenmacher, Khronos, 2016)](https://www.researchgate.net/publication/278618865_A_History_of_Galois_fields)
23. [An Introduction to Galois Fields and Reed-Solomon Coding, people.computing.clemson.edu](https://people.computing.clemson.edu/~jmarty/papers/IntroToGaloisFieldsAndRSCoding.pdf)

---
*Initially written Sep 17, 2026 · Reviewed: Oct 15, 2026 · Edited: Oct 15, 2026; Oct 25, 2026 · Last review: Oct 15, 2026*

Topic: 物质世界与数学 › 数学与统计学 › 数与代数 › Algebraic structures › Field and Galois theory › Computational field and Galois theory

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/finite-field-arithmetic

English original: https://www.edgepedia.org/finite-field-arithmetic
