for (int i = a; i < b; i += 2) if (isIrreducible(i))
for (int i = a; i < b; i += 2) if (isIrreducible(i))
/** * create a finite field GF(2^m) with the fixed field polynomial * * @param degree the degree of the field * @param poly the field polynomial */ public GF2mField(int degree, int poly) { if (degree != PolynomialRingGF2.degree(poly)) { throw new IllegalArgumentException( " Error: the degree is not correct"); } if (!PolynomialRingGF2.isIrreducible(poly)) { throw new IllegalArgumentException( " Error: given polynomial is reducible"); } this.degree = degree; polynomial = poly; }
/** * create a finite field GF(2^m) with the fixed field polynomial * * @param degree the degree of the field * @param poly the field polynomial */ public GF2mField(int degree, int poly) { if (degree != PolynomialRingGF2.degree(poly)) { throw new IllegalArgumentException( " Error: the degree is not correct"); } if (!PolynomialRingGF2.isIrreducible(poly)) { throw new IllegalArgumentException( " Error: given polynomial is reducible"); } this.degree = degree; polynomial = poly; }
public GF2mField(byte[] enc) { if (enc.length != 4) { throw new IllegalArgumentException( "byte array is not an encoded finite field"); } polynomial = LittleEndianConversions.OS2IP(enc); if (!PolynomialRingGF2.isIrreducible(polynomial)) { throw new IllegalArgumentException( "byte array is not an encoded finite field"); } degree = PolynomialRingGF2.degree(polynomial); }
public GF2mField(byte[] enc) { if (enc.length != 4) { throw new IllegalArgumentException( "byte array is not an encoded finite field"); } polynomial = LittleEndianConversions.OS2IP(enc); if (!PolynomialRingGF2.isIrreducible(polynomial)) { throw new IllegalArgumentException( "byte array is not an encoded finite field"); } degree = PolynomialRingGF2.degree(polynomial); }
&& (PolynomialRingGF2.isIrreducible(poly)))
&& (PolynomialRingGF2.isIrreducible(poly)))
&& (PolynomialRingGF2.isIrreducible(poly)))
&& (PolynomialRingGF2.isIrreducible(poly)))