GoppaCode (Bouncy Castle Library 1.54 API Specification)
Date: 2015-12-29

org.bouncycastle.pqc.math.linearalgebra

## Class GoppaCode

- java.lang.Object
- - org.bouncycastle.pqc.math.linearalgebra.GoppaCode

-     public final class GoppaCode
      extends java.lang.Object

  This class describes decoding operations of an irreducible binary Goppa code. A check matrix H of the Goppa code and an irreducible Goppa polynomial are used the operations are worked over a finite field GF(2^m)
  See Also:
    `GF2mField`, `PolynomialGF2mSmallM`

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `GoppaCode.MaMaPe` This class is a container for two instances of `GF2Matrix` and one instance of `Permutation`.
    `static class` | `GoppaCode.MatrixSet` This class is a container for an instance of `GF2Matrix` and one int[].

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static GoppaCode.MaMaPe` | `computeSystematicForm(GF2Matrix h, java.security.SecureRandom sr)` Given a check matrix `H`, compute matrices `S`, `M`, and a random permutation `P` such that `S*H*P = (Id|M)`.
    `static GF2Matrix` | `createCanonicalCheckMatrix(GF2mField field, PolynomialGF2mSmallM gp)` Construct the check matrix of a Goppa code in canonical form from the irreducible Goppa polynomial over the finite field `GF(2m)`.
    `static GF2Vector` | `syndromeDecode(GF2Vector syndVec, GF2mField field, PolynomialGF2mSmallM gp, PolynomialGF2mSmallM[] sqRootMatrix)` Find an error vector `e` over `GF(2)` from an input syndrome `s` over `GF(2m)`.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### createCanonicalCheckMatrix

          public static GF2Matrix createCanonicalCheckMatrix(GF2mField field,
                                             PolynomialGF2mSmallM gp)

      Construct the check matrix of a Goppa code in canonical form from the irreducible Goppa polynomial over the finite field `GF(2m)`.
      Parameters:
        `field` - the finite field
        `gp` - the irreducible Goppa polynomial

    - #### computeSystematicForm

          public static GoppaCode.MaMaPe computeSystematicForm(GF2Matrix h,
                                               java.security.SecureRandom sr)

      Given a check matrix `H`, compute matrices `S`, `M`, and a random permutation `P` such that `S*H*P = (Id|M)`. Return `S^-1`, `M`, and `P` as `GoppaCode.MaMaPe`. The matrix `(Id | M)` is called the systematic form of H.
      Parameters:
        `h` - the check matrix
        `sr` - a source of randomness
      Returns:
        the tuple `(S^-1, M, P)`

    - #### syndromeDecode

          public static GF2Vector syndromeDecode(GF2Vector syndVec,
                                 GF2mField field,
                                 PolynomialGF2mSmallM gp,
                                 PolynomialGF2mSmallM[] sqRootMatrix)

      Find an error vector `e` over `GF(2)` from an input syndrome `s` over `GF(2m)`.
      Parameters:
        `syndVec` - the syndrome
        `field` - the finite field
        `gp` - the irreducible Goppa polynomial
        `sqRootMatrix` - the matrix for computing square roots in `(GF(2m))t`
      Returns:
        the error vector