I am trying to instantiate the BLS48_581 tower of extension fields from draft-irtf-cfrg-pairing-friendly-curves-12:
p = 0x1280f73ff3476f313824e31d47012a0056e84f8d122131bb3be6c0f1f3975444a48ae43af6e082acd9cd30394f4736daf68367a5513170ee0a578fdf721a4a48ac3edc154e6565912b
GF(p^2) = GF(p)[u] / (u^2 + 1)
GF(p^4) = GF(p^2)[v] / (v^2 + u + 1)
GF(p^8) = GF(p^4)[w] / (w^2 + v)
The best I could do was this:
p = 0x1280f73ff3476f313824e31d47012a0056e84f8d122131bb3be6c0f1f3975444a48ae43af6e082acd9cd30394f4736daf68367a5513170ee0a578fdf721a4a48ac3edc154e6565912b
Fp = GF(p)
# Fp2 = Fp[u]/(u^2 + 1)
R.<u> = PolynomialRing(Fp)
Fp2.<u> = Fp.extension(u^2 + 1)
# Fp4 = Fp2[v]/(v^2 + u + 1)
S.<v> = PolynomialRing(Fp2)
Fp4.<v> = Fp2.extension(v^2 + u + 1)
# Fp8 = Fp4[w]/(w^2 + v)
T.<w> = PolynomialRing(Fp4)
Fp8.<w> = Fp4.extension(w^2 + v)
However, the third field extension (Fp8) just refuses to be created in a reasonable time. When I check the types of the objects I get:
sage: Fp
Finite Field of size 4576545538729420598762745822889397370509838601207708465545582186285824315458656151272834027217178198654229063318759931344008864619718319130560845441720114764111976549023322411
sage: Fp2
Finite Field in u of size 4576545538729420598762745822889397370509838601207708465545582186285824315458656151272834027217178198654229063318759931344008864619718319130560845441720114764111976549023322411^2
sage: Fp4
Univariate Quotient Polynomial Ring in v over Finite Field in u of size 4576545538729420598762745822889397370509838601207708465545582186285824315458656151272834027217178198654229063318759931344008864619718319130560845441720114764111976549023322411^2 with modulus v^2 + u + 1
Then, the extension of that goes through a slow path of:
CommutativeRing.extension() -> QuotientRing -> PolynomialRing_commutative.quotient_by_principal_ideal -> PolynomialQuotientRingFactory.create_object -> Polynomial.is_irreducible() -> Polynomial.factor()
I can not pass check_irreducible=False, because the method then complains:
Fp4.<v> = Fp2.extension(v^2 + u + 1, check_irreducible=False)
File /usr/lib/python3.14/site-packages/sage/rings/finite_rings/finite_field_base.pyx:1515, in sage.rings.finite_rings.finite_field_base.FiniteField.extension()
1513 pass
1514 else:
-> 1515 E = Field.extension(self, modulus, name=name, embedding=embedding, latex_name=latex_name, **kwds)
1516 if map:
1517 return (E, E.coerce_map_from(self))
TypeError: extension() got an unexpected keyword argument 'check_irreducible'