/** * constructs an instance of the finite field with 2<sup>deg</sup> * elements and characteristic 2. * * @param deg the degree of this field * @param file true if you want to read the field polynomial from the * file false if you want to use a random fielpolynomial * (this can take very long for huge degrees) */ public GF2nPolynomialField(int deg, boolean file) { if (deg < 3) { throw new IllegalArgumentException("k must be at least 3"); } mDegree = deg; if (file) { computeFieldPolynomial(); } else { computeFieldPolynomial2(); } computeSquaringMatrix(); fields = new Vector(); matrices = new Vector(); }
/** * constructs an instance of the finite field with 2<sup>deg</sup> * elements and characteristic 2. * * @param deg the extention degree of this field */ public GF2nPolynomialField(int deg) { if (deg < 3) { throw new IllegalArgumentException("k must be at least 3"); } mDegree = deg; computeFieldPolynomial(); computeSquaringMatrix(); fields = new Vector(); matrices = new Vector(); }
/** * constructs an instance of the finite field with 2<sup>deg</sup> * elements and characteristic 2. * * @param deg the degree of this field * @param random source of randomness for generating new polynomials. * @param file true if you want to read the field polynomial from the * file false if you want to use a random fielpolynomial * (this can take very long for huge degrees) */ public GF2nPolynomialField(int deg, SecureRandom random, boolean file) { super(random); if (deg < 3) { throw new IllegalArgumentException("k must be at least 3"); } mDegree = deg; if (file) { computeFieldPolynomial(); } else { computeFieldPolynomial2(); } computeSquaringMatrix(); fields = new Vector(); matrices = new Vector(); }
/** * constructs an instance of the finite field with 2<sup>deg</sup> * elements and characteristic 2. * * @param deg the extention degree of this field * @param random source of randomness for generating new polynomials. */ public GF2nPolynomialField(int deg, SecureRandom random) { super(random); if (deg < 3) { throw new IllegalArgumentException("k must be at least 3"); } mDegree = deg; computeFieldPolynomial(); computeSquaringMatrix(); fields = new Vector(); matrices = new Vector(); }