ゴッパ符号(ゴッパふごう、英: Goppa code)または代数幾何符号(だいすうきかふごう、英: algebraic geometric code)は、有限体
上の代数曲線 X を使って構築される線型符号である。V. D. Goppa が考案した。場合によっては、興味深い極値特性(extremal property)を示すことがある。
ゴッパ符号は、
上で定義された非特異の代数多様体 X のいくつかの有理点
- P1, P2, ..., Pn
を使って構築でき、X 上の因子 G は
とは互いに素な有理点からのみ得られる。リーマン=ロッホの定理によれば、因子 G に対応して、一意な有限次元のベクトル空間
が存在する。このベクトル空間は
の関数空間の部分空間である。
このような情報を使って構築されるゴッパ符号には、2種類のものが存在する。
曲線 X、因子 G、有理点群
から構築される関数型符号は以下の通りである。
上の L(G) の固定基底
- f1, f2, ..., fk
について、対応する
内のゴッパ符号は、
- (fi(P1), fi(P2), ..., fi(Pn))
というベクトルによって
上に分布する。等価的に

の像としても定義され、ここで f は
で定義される。
上記で定義された
を使って因子を
とする。通常ゴッパ符号は C(D,G) と記述される。
次に、C 上の因子 D と符号のパラメータの関係を示す。l(D) という記法は L(D) の次元を意味する。
命題 ゴッパ符号 C(D,G) の次元は

であり、2つの符号語間の最小ハミング距離は

である。
証明

なので、次が成り立つことを示さなければならない。

と仮定する。すると
なので、
である。従って
である。逆に
と仮定する。すると

なので

である(G は
で問題を解かないので、代わりに f でそれをする必要がある)。従って

となる。
を示すため、
のハミング重みを d とする。これはつまり、
個の
(例えば
)について
であることを意味する。従って
であり、

である。

であることに着目して両辺の次数をとると

が得られる。従って

である。Q.E.D.
留数型符号は関数型符号の双対として定義されるか、
における何らかの関数の留数として定義される。
暗号理論において、ゴッパ符号はマックエリス暗号で使われている。
一般にゴッパ符号は性質の良い線型符号と見なされ、

の誤りを訂正可能である。また復号も簡単で、ユークリッドの互除法とベールカンプ=マッシー法を使えばよい。