Top Description Inners Constructors Methods
org.bouncycastle.pqc.legacy.math.linearalgebra

public final Class GoppaCode

extends Object
Class Inheritance
Imports
java.security.SecureRandom

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 and Inner Type Summary

Modifier and TypeClass and Description
public static class
GoppaCode.MaMaPe

This class is a container for two instances of GF2Matrix and one instance of Permutation.

public static class
GoppaCode.MatrixSet

This class is a container for an instance of GF2Matrix and one int[].

Constructor Summary

AccessConstructor and Description
private
GoppaCode()

Default constructor (private).

Method Summary

Modifier and TypeMethod and Description
public static GoppaCode.MaMaPe

Returns:

the tuple (S^-1, M, P)
computeSystematicForm
(GF2Matrix
the check matrix
h
,
SecureRandom
a source of randomness
sr
)

Given a check matrix H, compute matrices S, M, and a random permutation P such that S*H*P = (Id|M).

public static GF2Matrix
createCanonicalCheckMatrix(GF2mField
the finite field
field
,
PolynomialGF2mSmallM
the irreducible Goppa polynomial
gp
)

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

public static GF2Vector

Returns:

the error vector
syndromeDecode
(GF2Vector
the syndrome
syndVec
,
GF2mField
the finite field
field
,
PolynomialGF2mSmallM
the irreducible Goppa polynomial
gp
,
PolynomialGF2mSmallM[]
the matrix for computing square roots in (GF(2m))t
sqRootMatrix
)

Find an error vector e over GF(2) from an input syndrome s over GF(2m).

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

GoppaCodeback to summary
private GoppaCode()

Default constructor (private).

Method Detail

computeSystematicFormback to summary
public static GoppaCode.MaMaPe computeSystematicForm(GF2Matrix h, 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 MaMaPe. The matrix (Id | M) is called the systematic form of H.

Parameters
h:GF2Matrix

the check matrix

sr:SecureRandom

a source of randomness

Returns:GoppaCode.MaMaPe

the tuple (S^-1, M, P)

createCanonicalCheckMatrixback to summary
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:GF2mField

the finite field

gp:PolynomialGF2mSmallM

the irreducible Goppa polynomial

syndromeDecodeback to summary
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:GF2Vector

the syndrome

field:GF2mField

the finite field

gp:PolynomialGF2mSmallM

the irreducible Goppa polynomial

sqRootMatrix:PolynomialGF2mSmallM[]

the matrix for computing square roots in (GF(2m))t

Returns:GF2Vector

the error vector

org.bouncycastle.pqc.legacy.math.linearalgebra back to summary

public Class GoppaCode.MaMaPe

extends Object
Class Inheritance
  • java.lang.Object
  • org.bouncycastle.pqc.legacy.math.linearalgebra.GoppaCode.MaMaPe

This class is a container for two instances of GF2Matrix and one instance of Permutation. It is used to hold the systematic form S*H*P = (Id|M) of the check matrix H as returned by GoppaCode#computeSystematicForm(GF2Matrix, SecureRandom).
See Also
GF2Matrix, Permutation

Field Summary

Modifier and TypeField and Description
private GF2Matrix
h

private Permutation
p

private GF2Matrix
s

Constructor Summary

AccessConstructor and Description
public
MaMaPe(GF2Matrix
the first matrix
s
,
GF2Matrix
the second matrix
h
,
Permutation
the permutation
p
)

Construct a new MaMaPe container with the given parameters.

Method Summary

Modifier and TypeMethod and Description
public GF2Matrix

Returns:

the first matrix
getFirstMatrix
()

public Permutation

Returns:

the permutation
getPermutation
()

public GF2Matrix

Returns:

the second matrix
getSecondMatrix
()

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

hback to summary
private GF2Matrix h
pback to summary
private Permutation p
sback to summary
private GF2Matrix s

Constructor Detail

MaMaPeback to summary
public MaMaPe(GF2Matrix s, GF2Matrix h, Permutation p)

Construct a new MaMaPe container with the given parameters.

Parameters
s:GF2Matrix

the first matrix

h:GF2Matrix

the second matrix

p:Permutation

the permutation

Method Detail

getFirstMatrixback to summary
public GF2Matrix getFirstMatrix()
Returns:GF2Matrix

the first matrix

getPermutationback to summary
public Permutation getPermutation()
Returns:Permutation

the permutation

getSecondMatrixback to summary
public GF2Matrix getSecondMatrix()
Returns:GF2Matrix

the second matrix

org.bouncycastle.pqc.legacy.math.linearalgebra back to summary

public Class GoppaCode.MatrixSet

extends Object
Class Inheritance
  • java.lang.Object
  • org.bouncycastle.pqc.legacy.math.linearalgebra.GoppaCode.MatrixSet

This class is a container for an instance of GF2Matrix and one int[]. It is used to hold a generator matrix and the set of indices such that the submatrix of the generator matrix consisting of the specified columns is the identity.
See Also
GF2Matrix, Permutation

Field Summary

Modifier and TypeField and Description
private GF2Matrix
g

private int[]

Constructor Summary

AccessConstructor and Description
public
MatrixSet(GF2Matrix
the generator matrix
g
,
int[]
the set of indices such that the submatrix of the generator matrix consisting of the specified columns is the identity
setJ
)

Construct a new MatrixSet container with the given parameters.

Method Summary

Modifier and TypeMethod and Description
public GF2Matrix

Returns:

the generator matrix
getG
()

public int[]

Returns:

the set of indices such that the submatrix of the generator matrix consisting of the specified columns is the identity
getSetJ
()

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

gback to summary
private GF2Matrix g
setJback to summary
private int[] setJ

Constructor Detail

MatrixSetback to summary
public MatrixSet(GF2Matrix g, int[] setJ)

Construct a new MatrixSet container with the given parameters.

Parameters
g:GF2Matrix

the generator matrix

setJ:int[]

the set of indices such that the submatrix of the generator matrix consisting of the specified columns is the identity

Method Detail

getGback to summary
public GF2Matrix getG()
Returns:GF2Matrix

the generator matrix

getSetJback to summary
public int[] getSetJ()
Returns:int[]

the set of indices such that the submatrix of the generator matrix consisting of the specified columns is the identity