The text "Nonsingular Plane Cubic Curves over Finite Fields" by Schoof has the following proposition:
The full proof is here:
I can't understand this step of the proof:
I know why the part in blue is true. What is left is the part in red. I'm left to believe that the red 2 equation implies what is inside the red box, but how to prove it?



Firstly $\frac{\phi-1}{n} \in \operatorname{End}_{\mathbb{F}_q}(E)$ is equivalent to $\mathbb{Z}[\frac{\phi-1}{n}] \subset \operatorname{End}_{\mathbb{F}_q}(E)$ because $\operatorname{End}_{\mathbb{F}_q}(E)$ is a ring.
For a quadratic integer $\alpha$, the norm $N(\alpha) = \alpha\bar{\alpha}$ and trace $T(\alpha) = \alpha+\bar{\alpha}$ appear as coefficients in the minimum polynomial of $\alpha$: $(x-\alpha)(x-\bar{\alpha}) = x^2-T(\alpha)x + N(\alpha)$. The discriminant of this polynomial is $T(\alpha)^2 - 4N(\alpha)$.
The discriminant of the quadratic order $\mathbb{Z}[\frac{\phi-1}{n}]$ is the discriminant of the minimal polynomial of $\frac{\phi-1}{n}$, as calculated in $\color{red}{\mathbf{2}}$ using the above. Note that there is a typo in $\color{blue}{\mathbf{1}}$: the denominator of the norm should be $n^2$, as in the $\color{blue}{\text{blue}}$ box.
In the $\color{red}{\text{red}}$ box, $\mathcal{O}\Big(\frac{t^2-4q}{n^2}\Big)$ denotes the complex quadratic order of discriminant $\frac{t^2-4q}{n^2}$, namely $\mathbb{Z}[\frac{\phi-1}{n}]$.