|
Bouncy Castle Cryptography Library 1.79 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.bouncycastle.pqc.legacy.math.linearalgebra.PolynomialRingGF2
This class describes operations with polynomials over finite field GF(2), i e polynomial ring R = GF(2)[X]. All operations are defined only for polynomials with degree <=32. For the polynomial representation the map f: R->Z, poly(X)->poly(2) is used, where integers have the binary representation. For example: X^7+X^3+X+1 -> (00[]0010001011)=139 Also for polynomials type Integer is used.
GF2mField
Method Summary | |
static int |
add(int p,
int q)
Return sum of two polyomials |
static int |
degree(int p)
Return the degree of a polynomial |
static int |
degree(long p)
Return the degree of a polynomial |
static int |
gcd(int p,
int q)
Return the greatest common divisor of two polynomials |
static int |
getIrreduciblePolynomial(int deg)
Creates irreducible polynomial with degree d |
static boolean |
isIrreducible(int p)
Checking polynomial for irreducibility |
static int |
modMultiply(int a,
int b,
int r)
Compute the product of two polynomials modulo a third polynomial. |
static long |
multiply(int p,
int q)
Return product of two polynomials |
static int |
remainder(int p,
int q)
Return the remainder of a polynomial division of two polynomials. |
static int |
rest(long p,
int q)
Return the rest of devision two polynomials |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static int add(int p, int q)
p
- polynomialq
- polynomialpublic static long multiply(int p, int q)
p
- polynomialq
- polynomialpublic static int modMultiply(int a, int b, int r)
a
- the first polynomialb
- the second polynomialr
- the reduction polynomialpublic static int degree(int p)
p
- polynomial ppublic static int degree(long p)
p
- polynomial ppublic static int remainder(int p, int q)
p
- dividendq
- divisorpublic static int rest(long p, int q)
p
- polinomialq
- polinomialpublic static int gcd(int p, int q)
p
- polinomialq
- polinomialpublic static boolean isIrreducible(int p)
p
- polinomialpublic static int getIrreduciblePolynomial(int deg)
deg
- polynomial degree
|
Bouncy Castle Cryptography Library 1.79 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |