diff --git a/src/sage/crypto/mq/rijndael_gf.py b/src/sage/crypto/mq/rijndael_gf.py index f36d4e470e9..a1ad974b036 100644 --- a/src/sage/crypto/mq/rijndael_gf.py +++ b/src/sage/crypto/mq/rijndael_gf.py @@ -425,6 +425,7 @@ from sage.matrix.constructor import matrix from sage.matrix.constructor import column_matrix from sage.structure.element import Element, Matrix +from sage.rings.finite_rings.finite_field_base import FiniteField as FiniteField_base from sage.rings.finite_rings.finite_field_constructor import FiniteField from sage.structure.sage_object import SageObject from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing @@ -759,7 +760,7 @@ def _GF_to_hex(self, GF): """ if not isinstance(GF, Matrix) and \ not isinstance(GF, list) and \ - not (isinstance(GF, Element) and isinstance(GF.parent(), FiniteField)): + not (isinstance(GF, Element) and isinstance(GF.parent(), FiniteField_base)): msg = ("keyword 'GF' must be a matrix over {0}, a list of " "elements from {0}, or a single element from {0}") raise TypeError(msg.format(self._F)) @@ -884,7 +885,7 @@ def _GF_to_bin(self, GF): """ if not isinstance(GF, Matrix) and \ not isinstance(GF, list) and \ - not (isinstance(GF, Element) and isinstance(GF.parent(), FiniteField)): + not (isinstance(GF, Element) and isinstance(GF.parent(), FiniteField_base)): msg = ("keyword 'GF' must be a matrix over {0}, a list of " "elements from {0}, or a single element from {0}") raise TypeError(msg.format(self))