Question: Let p be an odd prime and gcd(a, p) = 1. Establish that the quadratic congruence ax^2 + bx + c = 0 (mod p) is solvable if and only if b^2 - 4ac is either zero or a quadratic residue of p.

Here's what I have so far:

[If] Assume that ax^2 + bx + c = 0 (mod p) is solvable.

Since p is an odd prime, gdp(4a, p) = 1. So the quadratic congruence is equivalent to 4a(ax^2 + bx + c) = 0 (mop p). 4a(ax^2 + bx + c) = (2ax + b)^2 - (b^2 - 4ac), so (2ax + b)^2 = (b^2 - 4ac) (mod p). Let y = (2ax + b) and d = (b^2 - 4ac), so y^2 = d (mod p).

If (2ax + b)^2 = (b^2 - 4ac) (mod p) has a solution, (b^2 - 4ac) is a quadratic residue of p. Does this make any sense?

Now, I don't know how to show that (b^2 - 4ac) can also be zero.

[Only If] Assume that (b^2 - 4ac) is either 0 or a quadratic residue of p.

For this proof, I don't even know how to start it. I was thinking about using Euler's criterion, so (b^2 - 4ac)^((p - 1)/2) = 1 (mod p), but I'm not sure if gcd((b^2 - 4ac), p) = 1 or not and I'm not sure if this is the right way to go, and if it is, how to proceed further. And what do I do with (b^2 - 4ac) = 0?

Any form of help if greatly appreceated.

Thanks in advance