Question: I'm attempring to solve a congruence $x^2 \equiv 17\pmod{128}$ but not quite sure how to go about it. I see that $128 = 2^7$, but the Chinese Remainder Theorem doesn't apply to $\gcd > 1$. I found one solution quite easily by finding solutiong to $x^2 \equiv\pmod{32}$ which was $x \equiv 23\pmod{32}$ and it turned out that $23 + 128x\_0 \equiv 17\pmod{128}$. How do I find the other solution ans what's the proper way of doing it?

Answer: 
Let $x$ and $y$ be relatively prime with $128$. If $x^2=y^2$ then $(xy^{-1})^2=1$ so $xy^{-1}=\pm1 \iff x=\pm y$, this tells us the number of solutions is two or zero, lets look for the solutions in this case.

It is a somewhat well-know result that $5$ generates half of $\mathbb Z\_{2^n}^{\cdot}$. So lets look at the powers of $5\bmod 128$:

$1,
5,
25,
125,
113,
53,
9,
45,
97,
101,
121,
93,
81,
21,
105,
13,
65,
69,
89,
61,
49,
117,
73,
109,
33,
37,
57,
29,
17$

Oh, from the looks of it $5^{28}\equiv 17\bmod 128$. Therefore $(5^{14})^2\equiv 17\bmod 128$.

So our solutions are $5^{14}$ and $-(5^{14})$, according to our previous calculations $5^{14}\equiv 105$. So the solutions are $105$ and $23$
We have to solve $x^2\equiv 17 \pmod{128}$

Now,$128=2^7$

So,we are to solve an equation of the form $x^2\equiv a\pmod {2^\alpha}$

We follow the ascending method:

First we find a root of $x^2\equiv 17 \pmod{16}$ which is $x^2\equiv 1\pmod{16}$

We can see that $x\_4=1$ is a solution to the given equation.

Now the ascending method says that if $x\_i$ is a solution of $x^2\equiv a \pmod{2^i}$,then a solution of $x^2\equiv a\pmod{2^{i+1}}$ is $x\_{i+1}=x\_i+2^{i-1}k$

Putting this solution in the equation,we can find a value of $k$.

Hence we can find $x\_{i+1}$.

Using this method it is easy to see that $x\_4=1,x\_5=9,x\_6=9,x\_7=41$.

Now,the square roots of $1$ modulo $128$ are $\pm1,2^{7-1}\pm1$ .So multiplying by $41$ we get all the solutions of $x^2\equiv 17 \pmod{128}$ as $41,87,105,23$.