HFE
Class Multi2Power

java.lang.Object
  |
  +--HFE.Multi2Power

class Multi2Power
extends java.lang.Object

This class deals with multi-variable polynomials and a general modulus provied to the constructor. Basicly, this class calculates only powers of the form q^k where q is the number of elements in the field (here: 2) and k is a non-negative integer (e.g. 0, 1, 2) 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.

Version:
0.1

Field Summary
private  Poly2MultiLinear[][] resArray
          Stores all the results.
 
Constructor Summary
(package private) Multi2Power(Poly2Max modulus, Poly2MultiLinear[] start, int maxPower)
          Initializes the internal fields
 
Method Summary
 Poly2MultiLinear[] givePower(int which)
          Returns the polynomial vector for a given power which.
static void main(java.lang.String[] args)
          Calls the testIt() method
static void testIt()
          Tests the functionality of the class.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

resArray

private Poly2MultiLinear[][] resArray
Stores all the results. Every power has its own polynomials. In resArray[0] are the powers of q^0, in resArray[1] the powers of q^1, .... resArray[i][0] is the polynomial for the output for 1, resArray[i][1] for gamma, resArray[i][2] for gamma^2,...
Constructor Detail

Multi2Power

Multi2Power(Poly2Max modulus,
            Poly2MultiLinear[] start,
            int maxPower)
Initializes the internal fields
Parameters:
modulus - polynomial over GF(2) for reduction the number of variables must be 3 for our purpose
start - multivariable polynomials over GF(2) for q^0.
maxpower - till which power shall we compute?
Method Detail

givePower

public Poly2MultiLinear[] givePower(int which)
Returns the polynomial vector for a given power which. Can only return values which have been computed by the constructor.

testIt

public static void testIt()
Tests the functionality of the class. Is called by the main method.

main

public static void main(java.lang.String[] args)
Calls the testIt() method