Solving the quadratic congruence (using some lemma) 
Find all $x$'s such that $x^2 \equiv 17 \pmod{ 128}$

Now, I've read one solution here (fixed URL). What I don't understand is how in the first place one can find a particular solution, $a$? (in order to find the all four).

$$x^2 \equiv 17 \pmod{128}$$
$$x^2 \equiv 1 \pmod 4 \implies x \in \{1,3\}$$
\begin{align}
   (1+4n)^2 &\equiv 1 \pmod{16} \\
   1 + 8n &\equiv 1 \pmod{16} \\
   8n &\equiv 15 \pmod{16} \\
   n &\in \{ \ \}
\end{align}
\begin{align}
   (3+4n)^2 &\equiv 1 \pmod{16} \\
   9 + 8n &\equiv 1 \pmod{16} \\
   8n &\equiv 8 \pmod{16} \\
   n &\equiv 1 \pmod{2} \\
   x &\in \{ 7,15 \} \\
   x &\in \{ 1, 9 \}  &\text{(That's $-15$ and $-7$)}
\end{align}
\begin{align}
   (1+16n)^2 &\equiv 17 \pmod{128} \\
   1 + 32n &\equiv 17 \pmod{128} \\
   32n &\equiv 16 \pmod{128}
\end{align}
\begin{align}
   (7+16n)^2 &\equiv 17 \pmod{128} \\
   49 + 96n &\equiv 17 \pmod{128} \\
   96n &\equiv 96 \pmod{128} \\
   3n &\equiv 3 \pmod{4} \\
   n &\equiv 1 \pmod{4} \\
   x &\in \{23, 87\} \\
   x &\in \{41, 105\} &\text{(That's $-87$ and $-23$)}
\end{align}
