Fermat's theorem on sums of two squares

Hello,

I have to write an essay about Fermat's theorem on sums of two squares. Now I found a proof in a book of the following theorem:

Let $\displaystyle p \neq 2$ a prime number. Then the ideal $\displaystyle p\mathbb Z[i]$ is a prime ideal in $\displaystyle \mathbb Z[i]$ if and only if $\displaystyle p \equiv 3\ (\text{mod}\ 4)$.

Ok, now I have a question about the proof. The ideal $\displaystyle p\mathbb Z[i]$ in $\displaystyle \mathbb Z[i]$ is a prime ideal if and only if the quotient ring $\displaystyle \mathbb Z[i]/p \mathbb Z[i]$ is a integral domain (this is clear).

"Now there is a isomorphism $\displaystyle \mathbb Z[i]/p \mathbb Z[i]\cong \mathbb F_p[X]/(X^2-1)\mathbb F_p[X]$ and $\displaystyle p\mathbb Z[i]$ is a prime ideal in $\displaystyle \mathbb Z[i]$ if and only if $\displaystyle (X^2-1)$ is irreducible in $\displaystyle \mathbb F_p$, which is equivalent that $\displaystyle -1$ is no square mod $\displaystyle p$."

Is there a typing error? Is $\displaystyle (X^2-1)$ correct or should it be correctly $\displaystyle (X^2+1)$?

And what about "$\displaystyle -1$ is no square mod $\displaystyle p$"? I don't unterstand it.

Thanks in advance,

Bye,

Lisa