1 | initial version |
The code for the cardinality
method for elliptic curves can be found on the file src/sage/schemes/elliptic_curves/ell_finite_field.py
(you can click to see it). As you can see (search for def cardinality
), the default implementation is by calling pari
, so you can have a look to its source code (in the C
language) and try to make it early-aborting. There is an alternative (probably slower) implementation in Sage, which is called cardinality_bsgs
, so you can have a look at it and see if you can deduce that the cardinality is not prime before reaching return self._order
commands.