Beispiel #1
0
FiniteField::FiniteField(const Polynomial& irred) : p(irred.getMod()), k(irred.degree()), domain(irred.getDomain()), modulus(irred) {
    //assert(k > 1 && "Use PrimeField if k==1");
    assert(irred.isIrreducible());
}
Beispiel #2
0
Polynomial PolyDomain::generateIrreducible(const BigUnsigned& degree) const {
    Polynomial poly = randomPoly(degree);
    while (!poly.isIrreducible()) poly = randomPoly(degree);
    return poly;
}