Define elliptic curve over $\mathbb{F}_p(i)$
I am trying to implement the toyexample to SIDH from the paper "Supersingular isogeny key exchange for beginners" by Craig Costello.
Here he defines an elliptic curve with coefficents from $\mathbb{F}_p^2=\mathbb{F}_p(i)$ with $i^2+1=0$, so $i$ is the imaginary unit. Then he defines the elliptic Curve given by $$y^2=x^3+(208i+161)x^2+x$$ and calculated the j-invariant of this curve to be 364i+304.
I've spend some time trying to understand how to implement this in sagemath, but I am unable to get the same j-invariant.
What I did:
1: I defined my field by
k.< i >=GF(431^2, 'i')
As I understand 'i' is just a placeholder and not interpreted as the actual complex unit. In particular k(i)*k(i) calculates to i+424 and not -1, and I think this is a major step that causes my problem
2: I defined my curve with
E1=EllipticCurve(k,[0,161+208*i,0,1,0])
3: I calculate E1.j_invariant() and I get 54*i+190.
As I said, I think the major problem is that i above is not interpreted as complex unit, but I have no idea how to define my curve in the way considered in the paper and hence get the same result.