Is $xy$ certainly not a square in $\mathbb Z_n$ if $x$ is a square and $y$ is not?

62 Views Asked by At

If $x$ is a square of any element in $\mathbb Z/n\mathbb Z$ but $y$ is not a square of any element in $\mathbb Z/n\mathbb Z$ then can we conclusively say that $xy$ is not a square of any element in $\mathbb Z/n\mathbb Z$?

I'm afraid that something weird might happen modulo $n$. Say, $x = g^2 \bmod n$ and $xy = h^2 \bmod n$ where $g, h \in \mathbb Z_n$. Then how exactly to draw a contradiction from here?

(I was stuck on this issue while thinking about the zero-knowledge proof strategy for quadratic residue.)