I was trying to calculate the number of points of the curve $E:y^2 = x^3 + 4x^2 + 2x$ over $\mathbb{F}_p$ for $p\equiv 1\bmod 8$ (In order to have $\sqrt{-2}\in\mathbb{F}_p$) but I did not succeed. This curve is mentioned in Silverman's Advanced Topics in the Arithmetic of Elliptic curves (Proposition 2.3.1) to have multiplication by $\sqrt{-2}$.
Over these primes $p\equiv 1\bmod 8$ the curve $E$ has full $2$-torsion so $E(\mathbb{F}_p)\cong \mathbb{Z}/(2)\times \mathbb{Z}/(k)$.
In this case my conjecture is that the size will be related to the factorization of $p=(a+b\sqrt{-2})(a-b\sqrt{-2})$ over $\mathbb{Z}[i\sqrt{2}]$, that is $p=a^2 + 2b^2$. Hence, $\#E(\mathbb{F}_p)=p+1\pm 2a$ where $a$ is odd (and the sign I do not know how to choose it yet). Calculating this reminds me to the proof of the Last Entry of Gauss Tagebuch.
I would like to have an elliptic curve with CM by $\sqrt{-2}$ such that I can know the number of points in terms of $p$. Does anybody has a suggestion? or maybe another curve?
Thanks