public McElieceCCA2KeyGenParameterSpec(int keysize, String digest) { if (keysize < 1) { throw new IllegalArgumentException("key size must be positive"); } int m = 0; int n = 1; while (n < keysize) { n <<= 1; m++; } t = (n >>> 1) / m; this.m = m; this.n = n; this.fieldPoly = PolynomialRingGF2.getIrreduciblePolynomial(m); this.digest = digest; }
/** * Constructor. * * @param keysize the length of a Goppa code * @throws IllegalArgumentException if <tt>keysize < 1</tt>. */ public McElieceParameters(int keysize) throws IllegalArgumentException { if (keysize < 1) { throw new IllegalArgumentException("key size must be positive"); } m = 0; n = 1; while (n < keysize) { n <<= 1; m++; } t = n >>> 1; t /= m; fieldPoly = PolynomialRingGF2.getIrreduciblePolynomial(m); }
/** * Constructor. * * @param keysize the length of a Goppa code * @throws IllegalArgumentException if <tt>keysize < 1</tt>. */ public McElieceKeyGenParameterSpec(int keysize) { if (keysize < 1) { throw new IllegalArgumentException("key size must be positive"); } m = 0; n = 1; while (n < keysize) { n <<= 1; m++; } t = n >>> 1; t /= m; fieldPoly = PolynomialRingGF2.getIrreduciblePolynomial(m); }
/** * create a finite field GF(2^m) * * @param degree the degree of the field */ public GF2mField(int degree) { if (degree >= 32) { throw new IllegalArgumentException( " Error: the degree of field is too large "); } if (degree < 1) { throw new IllegalArgumentException( " Error: the degree of field is non-positive "); } this.degree = degree; polynomial = PolynomialRingGF2.getIrreduciblePolynomial(degree); }
/** * Constructor. * * @param keysize the length of a Goppa code * @param digest CCA2 mode digest * @throws IllegalArgumentException if <tt>keysize < 1</tt>. */ public McElieceParameters(int keysize, Digest digest) { if (keysize < 1) { throw new IllegalArgumentException("key size must be positive"); } m = 0; n = 1; while (n < keysize) { n <<= 1; m++; } t = n >>> 1; t /= m; fieldPoly = PolynomialRingGF2.getIrreduciblePolynomial(m); this.digest = digest; }
/** * create a finite field GF(2^m) * * @param degree the degree of the field */ public GF2mField(int degree) { if (degree >= 32) { throw new IllegalArgumentException( " Error: the degree of field is too large "); } if (degree < 1) { throw new IllegalArgumentException( " Error: the degree of field is non-positive "); } this.degree = degree; polynomial = PolynomialRingGF2.getIrreduciblePolynomial(degree); }
public McElieceCCA2KeyGenParameterSpec(int m, int t, String digest) { if (m < 1) { throw new IllegalArgumentException("m must be positive"); } if (m > 32) { throw new IllegalArgumentException("m is too large"); } this.m = m; n = 1 << m; if (t < 0) { throw new IllegalArgumentException("t must be positive"); } if (t > n) { throw new IllegalArgumentException("t must be less than n = 2^m"); } this.t = t; fieldPoly = PolynomialRingGF2.getIrreduciblePolynomial(m); this.digest = digest; }
fieldPoly = PolynomialRingGF2.getIrreduciblePolynomial(m); this.digest = digest;
fieldPoly = PolynomialRingGF2.getIrreduciblePolynomial(m);
fieldPoly = PolynomialRingGF2.getIrreduciblePolynomial(m);