TITLE: If $x^4 \equiv -1 \mod p$ then $p \equiv 1 \mod 8$
QUESTION [5 upvotes]: While learning about the Legendre symbol I came across this fact:

If $x^ 4 \equiv -1 \mod p$ then $p \equiv 1 \mod 8$.

Provided '$p$' is a prime greater than $2$. 
I could not prove it. Can someone help me to prove the same?
Thanks.

REPLY [13 votes]: Let $p$ be a prime. 
Suppose that $x^4+1\equiv 0 \textrm{ mod }p$ is solvable. 
Then 
$x$ has order 8 in the multiplicative group of $\mathbb{F}_p$. 
Since an order of subgroup must divide the group order, and the cyclic group generated by $x$ has order $8$, we have $8\mid p-1$.