I'm teaching myself cryptography but have realised that it has a lot of number theory as a part of it, one area which I'm a bit confused over is the Miller-Rabin test and how to use it in questions. A question which I have come across is:
Prove that $ n^2=4 \space mod \space p $ if $p$ {is an odd prime?} then there are two solutions $ n = \pm2 $ if $ p $ is an odd prime
Find an example of p where $n^2 = 9 \space mod \space p$ has one solution for $n \space mod \space p$
the part in curly brackets is missing from the question I am assuming that this is a mistake and what is inside the brackets should, in fact, be there.
Any help with this question would be extremely helpful and really appreciated!
EDIT: Forgot to add in this line:
The Miller-Rabin Test uses the fact that the only two solutions to the equation $n^2=1 \space mod \space p$ are $ n=\pm1 $ if $p$ is an odd prime