Package | Description |
---|---|
org.bouncycastle.pqc.math.linearalgebra |
Modifier and Type | Field and Description |
---|---|
protected GF2Polynomial |
GF2nField.fieldPolynomial
the irreducible fieldPolynomial stored in normal order (also for ONB)
|
Modifier and Type | Method and Description |
---|---|
GF2Polynomial |
GF2Polynomial.add(GF2Polynomial b)
Adds two GF2Polynomials, this and b, and returns the
result.
|
GF2Polynomial[] |
GF2Polynomial.divide(GF2Polynomial g)
Divides this by g and returns the quotient and remainder
in a new GF2Polynomial[2], quotient in [0], remainder in [1].
|
GF2Polynomial |
GF2Polynomial.gcd(GF2Polynomial g)
Returns the greatest common divisor of this and g in a
new GF2Polynomial.
|
GF2Polynomial |
GF2nField.getFieldPolynomial()
Returns the fieldpolynomial as a new Bitstring.
|
GF2Polynomial |
GF2nPolynomialField.getSquaringVector(int i)
Return row vector i of the squaring matrix.
|
GF2Polynomial |
GF2Polynomial.increase()
Toggles the LSB of this GF2Polynomial, increasing the value by 'one' and
returns the result in a new GF2Polynomial.
|
protected GF2Polynomial[] |
GF2nField.invertMatrix(GF2Polynomial[] matrix)
Inverts the given matrix represented as bitstrings.
|
GF2Polynomial |
GF2Polynomial.multiply(GF2Polynomial b)
Multiplies this GF2Polynomial with b and returns the result in a
new GF2Polynomial.
|
GF2Polynomial |
GF2Polynomial.multiplyClassic(GF2Polynomial b)
Multiplies this GF2Polynomial with b and returns the result in a
new GF2Polynomial.
|
GF2Polynomial |
GF2Polynomial.quotient(GF2Polynomial g)
Returns the absolute quotient of this divided by g in a
new GF2Polynomial.
|
GF2Polynomial |
GF2Polynomial.remainder(GF2Polynomial g)
Returns the remainder of this divided by g in a new
GF2Polynomial.
|
GF2Polynomial |
GF2Polynomial.shiftLeft()
Returns this GF2Polynomial shift-left by 1 in a new GF2Polynomial.
|
GF2Polynomial |
GF2Polynomial.shiftLeft(int k)
Returns this GF2Polynomial shift-left by k in a new
GF2Polynomial.
|
GF2Polynomial |
GF2Polynomial.shiftRight()
Returns this GF2Polynomial shift-right by 1 in a new GF2Polynomial.
|
GF2Polynomial |
GF2Polynomial.subtract(GF2Polynomial b)
Subtracts two GF2Polynomials, this and b, and returns the
result in a new GF2Polynomial.
|
GF2Polynomial |
GF2Polynomial.xor(GF2Polynomial b)
Returns the bitwise exclusive-or of this and b in a new
GF2Polynomial.
|
Modifier and Type | Method and Description |
---|---|
GF2Polynomial |
GF2Polynomial.add(GF2Polynomial b)
Adds two GF2Polynomials, this and b, and returns the
result.
|
void |
GF2Polynomial.addToThis(GF2Polynomial b)
Adds b to this GF2Polynomial and assigns the result to this
GF2Polynomial.
|
GF2Polynomial[] |
GF2Polynomial.divide(GF2Polynomial g)
Divides this by g and returns the quotient and remainder
in a new GF2Polynomial[2], quotient in [0], remainder in [1].
|
GF2Polynomial |
GF2Polynomial.gcd(GF2Polynomial g)
Returns the greatest common divisor of this and g in a
new GF2Polynomial.
|
protected GF2nElement |
GF2nPolynomialField.getRandomRoot(GF2Polynomial polynomial)
Compute a random root of the given GF2Polynomial.
|
protected abstract GF2nElement |
GF2nField.getRandomRoot(GF2Polynomial B0FieldPolynomial)
Computes a random root from the given irreducible fieldpolynomial
according to IEEE 1363 algorithm A.5.6.
|
protected GF2nElement |
GF2nONBField.getRandomRoot(GF2Polynomial polynomial)
Computes a random root of the given polynomial.
|
protected GF2Polynomial[] |
GF2nField.invertMatrix(GF2Polynomial[] matrix)
Inverts the given matrix represented as bitstrings.
|
GF2Polynomial |
GF2Polynomial.multiply(GF2Polynomial b)
Multiplies this GF2Polynomial with b and returns the result in a
new GF2Polynomial.
|
GF2Polynomial |
GF2Polynomial.multiplyClassic(GF2Polynomial b)
Multiplies this GF2Polynomial with b and returns the result in a
new GF2Polynomial.
|
GF2Polynomial |
GF2Polynomial.quotient(GF2Polynomial g)
Returns the absolute quotient of this divided by g in a
new GF2Polynomial.
|
GF2Polynomial |
GF2Polynomial.remainder(GF2Polynomial g)
Returns the remainder of this divided by g in a new
GF2Polynomial.
|
void |
GF2Polynomial.shiftLeftAddThis(GF2Polynomial b,
int k)
Shifts left b and adds the result to Its a fast version of
this = add(b.shl(k));
|
GF2Polynomial |
GF2Polynomial.subtract(GF2Polynomial b)
Subtracts two GF2Polynomials, this and b, and returns the
result in a new GF2Polynomial.
|
void |
GF2Polynomial.subtractFromThis(GF2Polynomial b)
Subtracts b from this GF2Polynomial and assigns the result to
this GF2Polynomial.
|
boolean |
GF2Polynomial.vectorMult(GF2Polynomial b)
Does a vector-multiplication modulo 2 and returns the result as boolean.
|
GF2Polynomial |
GF2Polynomial.xor(GF2Polynomial b)
Returns the bitwise exclusive-or of this and b in a new
GF2Polynomial.
|
void |
GF2Polynomial.xorThisBy(GF2Polynomial b)
Computes the bitwise exclusive-or of this GF2Polynomial and b and
stores the result in this GF2Polynomial.
|
Constructor and Description |
---|
GF2nPolynomial(GF2Polynomial polynomial,
GF2nField B1)
Creates a new PolynomialGF2n from the given Bitstring polynomial
over the GF2nField B1.
|
GF2nPolynomialElement(GF2nPolynomialField f,
GF2Polynomial bs)
Creates a new GF2nPolynomialElement using the given field and Bitstring.
|
GF2nPolynomialField(int deg,
SecureRandom random,
GF2Polynomial polynomial)
Creates a new GF2nField of degree i and uses the given
polynomial as field polynomial.
|
GF2Polynomial(GF2Polynomial b)
Creates a new GF2Polynomial by cloneing the given GF2Polynomial b.
|
Copyright © 2021 BouncyCastle.org. All rights reserved.