Exercise about quotient rings

I'm studying for an exam, and I can't figure out this problem:
Let $p$ be a prime. Then show that $(\mathbb{F}_p[X]/\langle X^2 +X +1\rangle,+,\cdot)$ is a field if and only if $p \equiv 2\,\,\, (\text{mod}\, 3)$.
Could someone perhaps give a hint? (ideally not the entire solution)
I know that it is a field if and only if $X^2 +X +1$ is irreducable. Since it is of degree two, it will be irreducable if it has no roots. Can this be used? Thank you


As you observe, you only need to check when the quadratic will have no roots.

Observe that if $p=2$ then the condition is trivially true, so from now $p\ge 5$

Now $4$ is coprime to $p$, hence the quadratic has no root iff $$ 4x^2 + 4x+4$$ has no root.

Also $4x^2 + 4x+4 = (1+2x)^2 + 3$, and this equation will have no root iff $3$ is a quadratic non residue mod $p$. Use reciprocity law to conclude