|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--HFE.Multi2Mul
This class deals with multi-variable polynomials and
a general modulus provied to the constructor.
Basicly, this class calculates multiples of two polynomials
and one polynomial and one element of (GF(2))^n.
All calculations are done in GF(2) (Field2
)
Every entry is a polynomial of the form
f_i(x1,x2,...) = g^i*(b_0 + b_1*x_1 + b_2*x_2 + ... + b_n*x_n)
The reduction is done in the variable g.
Field Summary | |
private static Poly2MultiLinear[] |
mul_resL
Holds a static variable for the sake of speed which is used in mul. |
private static Poly2MultiLinear |
mul_tmpL
Holds a static variable for the sake of speed which is used in mul. |
private static Poly2MultiSquare |
mul_tmpS
Holds a static variable for the sake of speed which is used in mul. |
private Poly2Max[] |
reduce
Stores all the reduction steps. |
Constructor Summary | |
(package private) |
Multi2Mul(Poly2Max modulus)
Initializes the internal field reduce |
Method Summary | |
static void |
initAll()
Init method for this class |
static void |
main(java.lang.String[] args)
Calls the testIt() method |
Poly2MultiLinear[] |
mul(int[] con,
Poly2MultiLinear[] poly)
Computes res = con * poly in terms of vector multiplication of polynomials. |
Poly2MultiSquare[] |
mul(int[] con,
Poly2MultiLinear[] a,
Poly2MultiLinear[] b)
Computes res = con * a * b in terms of vector multiplication of polynomials. |
(package private) void |
mul(Poly2MultiLinear[] res,
int[] con,
Poly2MultiLinear[] poly)
Computes res = con * poly in terms of vector multiplication of polynomials. |
Poly2MultiSquare[] |
mul(Poly2MultiLinear[] a,
Poly2MultiLinear[] b)
Computes res = a * b in terms of vector multiplication of polynomials. |
(package private) void |
mul(Poly2MultiSquare[] res,
int[] con,
Poly2MultiLinear[] a,
Poly2MultiLinear[] b)
Computes res = con * a * b in terms of vector multiplication of polynomials. |
Poly2MultiSquare[] |
mul2(int[] con,
Poly2MultiLinear[] a,
Poly2MultiLinear[] b)
Computes res = con * a * b in terms of vector multiplication of polynomials. |
Poly2MultiSquare[] |
mul2(Poly2MultiLinear[] a,
Poly2MultiLinear[] b)
Computes res = a * b in terms of vector multiplication of polynomials. |
static void |
speedIt()
Tests how fast the package runs on the current hardware. |
static void |
testIt()
Tests the functionality of the class. |
Methods inherited from class java.lang.Object |
|
Field Detail |
private Poly2Max[] reduce
private static Poly2MultiSquare mul_tmpS
private static Poly2MultiLinear mul_tmpL
private static Poly2MultiLinear[] mul_resL
Constructor Detail |
Multi2Mul(Poly2Max modulus)
reduce
modulus
- polynomial over GF(2) for reduction
the number of variables must be 3 for our purposeMethod Detail |
public Poly2MultiSquare[] mul(Poly2MultiLinear[] a, Poly2MultiLinear[] b)
reduce
to
take the modulus into account.public Poly2MultiSquare[] mul(int[] con, Poly2MultiLinear[] a, Poly2MultiLinear[] b)
reduce
to
take the modulus into account.con
- constants as a vector, i.e. a vector of polynomials of degree 0 or -1a
- linear polynomial in dimension variablesb
- linear polynimial in dimension variablespublic static void initAll()
void mul(Poly2MultiSquare[] res, int[] con, Poly2MultiLinear[] a, Poly2MultiLinear[] b)
reduce
to
take the modulus into account.res
- vector for our result polynomialscon
- constants as a vector, i.e. a vector of polynomials of degree 0 or -1a
- linear polynomial in dimension variablesb
- linear polynimial in dimension variablespublic Poly2MultiLinear[] mul(int[] con, Poly2MultiLinear[] poly)
reduce
to
take the modulus into account.con
- constants as a vector, i.e. a vector of polynomials of degree 0 or -1poly
- linear polynomial in dimension variablesvoid mul(Poly2MultiLinear[] res, int[] con, Poly2MultiLinear[] poly)
reduce
to
take the modulus into account.res
- linear polynomials in dimension variablescon
- constants as a vector, i.e. a vector of polynomials of degree 0 or -1poly
- linear polynomials in dimension variablespublic Poly2MultiSquare[] mul2(Poly2MultiLinear[] a, Poly2MultiLinear[] b)
reduce
to
take the modulus into account. This is an independent implementation to
mul(Poly2MultiLinear[], Poly2MultiLinear[])
and regarded to be slower.public Poly2MultiSquare[] mul2(int[] con, Poly2MultiLinear[] a, Poly2MultiLinear[] b)
reduce
to
take the modulus into account. This is an independent implementation to
mul(int[], Poly2MultiLinear[], Poly2MultiLinear[])
and regarded to be slower.public static void testIt()
public static final void speedIt()
public static void main(java.lang.String[] args)
testIt()
method
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |