Kenneth Ireland and Michael Rosen, A Classical Introduction to Modern Number Theory, 2nd ed., Springer, 1990,Ch. 5, quadratic residues, Legendre symbol, and Euler criterion。
Ivan Niven, Herbert S. Zuckerman, and Hugh L. Montgomery, An Introduction to the Theory of Numbers, 5th ed., Wiley, 1991,Ch. 3, quadratic congruences and Legendre symbol。