|
Bouncy Castle Cryptography 1.50 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.bouncycastle.pqc.math.linearalgebra.Matrix
org.bouncycastle.pqc.math.linearalgebra.GF2mMatrix
public class GF2mMatrix
This class describes some operations with matrices over finite field GF(2m) with small m (1< m <32).
Matrix| Field Summary | |
|---|---|
protected GF2mField |
field
finite field GF(2^m) |
protected int[][] |
matrix
For the matrix representation the array of type int[][] is used, thus every element of the array keeps one element of the matrix (element from finite field GF(2^m)) |
| Fields inherited from class org.bouncycastle.pqc.math.linearalgebra.Matrix |
|---|
MATRIX_TYPE_RANDOM_LT, MATRIX_TYPE_RANDOM_REGULAR, MATRIX_TYPE_RANDOM_UT, MATRIX_TYPE_UNIT, MATRIX_TYPE_ZERO, numColumns, numRows |
| Constructor Summary | |
|---|---|
|
GF2mMatrix(GF2mField field,
byte[] enc)
Constructor. |
protected |
GF2mMatrix(GF2mField field,
int[][] matrix)
Constructor. |
|
GF2mMatrix(GF2mMatrix other)
Copy constructor. |
| Method Summary | |
|---|---|
Matrix |
computeInverse()
Compute the inverse of this matrix. |
boolean |
equals(java.lang.Object other)
Checks if given object is equal to this matrix. |
byte[] |
getEncoded()
|
int |
hashCode()
|
boolean |
isZero()
Check if this is the zero matrix (i.e., all entries are zero). |
Vector |
leftMultiply(Vector vector)
Compute the product of a vector and this matrix. |
Matrix |
rightMultiply(Matrix a)
Compute the product of this matrix and another matrix. |
Matrix |
rightMultiply(Permutation perm)
Compute the product of this matrix and a permutation. |
Vector |
rightMultiply(Vector vector)
Compute the product of this matrix and a vector. |
java.lang.String |
toString()
|
| Methods inherited from class org.bouncycastle.pqc.math.linearalgebra.Matrix |
|---|
getNumColumns, getNumRows |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected GF2mField field
protected int[][] matrix
| Constructor Detail |
|---|
public GF2mMatrix(GF2mField field,
byte[] enc)
field - a finite field GF(2^m)enc - byte[] matrix in byte array formpublic GF2mMatrix(GF2mMatrix other)
other - another GF2mMatrix
protected GF2mMatrix(GF2mField field,
int[][] matrix)
field - a finite field GF(2^m)matrix - the matrix as int array. Only the reference is copied.| Method Detail |
|---|
public byte[] getEncoded()
getEncoded in class Matrixpublic boolean isZero()
isZero in class Matrixpublic Matrix computeInverse()
computeInverse in class Matrixpublic Matrix rightMultiply(Matrix a)
Matrix
rightMultiply in class Matrixa - the other matrix
public Matrix rightMultiply(Permutation perm)
Matrix
rightMultiply in class Matrixperm - the permutation
public Vector leftMultiply(Vector vector)
Matrix
leftMultiply in class Matrixvector - a vector
public Vector rightMultiply(Vector vector)
Matrix
rightMultiply in class Matrixvector - a vector
public boolean equals(java.lang.Object other)
equals in class java.lang.Objectother - object
public int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class Matrix
|
Bouncy Castle Cryptography 1.50 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||