Constructing supersingular elliptic curves with a given endomorphism ring (example 1)

Hi,

I have two questions about the paper “Constructing supersingular elliptic curves with a given endomorphism ring” (arXiv:1301.6875), published in 2014 (sorry! this paper does not appear in this forum’s database. I don’t know if I can change the configurations of this topic after its publication). There we can find two examples. In each example, the input is a maximal order in a quaternion algebra and the output is a supersingular elliptic curve. I have written code in Sage for those two examples.

I have one question for each example. This question is specific for example 1.

When I run my code for the first example, I receive an error message in the beginning: “given lattice must be a ring”. This error is critical, because it indicates that the input data is invalid. Is there anything wrong with my code?

My code is below:


from sage.all import QuaternionAlgebra

Constructing the quaternion algebra

p = 61
q = 7
B = QuaternionAlgebra(-p, -q)
(i,j,k) = B.gens()

Constructing the maximal order

m0 = 1
m1 = (i+j)/2
m2 = (-7-j+2k)/14
m3 = (-7+7
i-3*j-k)/14

O = B.quaternion_order([m0, m1, m2, m3])
print(f"O = {O}")


I would appreciate hearing from you any help.

Hello, this question is better suited for Questions - ASKSAGE: Sage Q&A Forum since the error is independent of the paper and related to sage itself.

Hi, Talayhan

The error is not necessarily related to Sage because the code runs ok when I change that maximal order to this very known maximal order below:

m0 = 1
m1 = i
m2 = (i+j)/2
m3 = (1+k)/2

We have three possibilities:

  1. The error is in my code;
  2. The error is in Sage (what I don’t think so);
  3. The error is in the paper.

I forgot to say that the very known maximal order needs a prime number such that p % 4 = 3 and q = 1.
So the correct code can be:

from sage.all import QuaternionAlgebra

Constructing the quaternion algebra

p = 63
if p % 4 != 3:
exit(f"Invalid prime number. [{p}]")
q = 1
B = QuaternionAlgebra(-p, -q)
(i,j,k) = B.gens()

Constructing the maximal order

m0 = 1
m1 = i
m2 = (i+j)/2
m3 = (1+k)/2

O = B.quaternion_order([m0, m1, m2, m3])
print(f"O = {O}")