Quadratic residue problem on composite integers Its believed that the quadratic residue modulo $n=p·q$ for large primes $p$ and $q$ is intractable, which forms the basis of some cryptosystems.

However, it is solvable if the factors of $n$ are know, such that the problem modulo a prime is easy (we use the Chinese reminder theorem) to simultaneously solve the problem for each prime factor.

The question is, is there any proof of why the same method for prime number should not work for composites?

Or, what if the same technique for the prime number case is applied to the composite number? What flaw might we see in the result?

Obviously the output won't be correct, is there a specific thing that can be said on the result? For example, let us say we wanted to solve the problem for some integer $i$ which we think is a prime (but without our knowledge, it is a composite), is there any thing in the result that can be detected, so that we know the integer in which we thought is prime happens to be not?
The computation of square roots modulo a composite $N$ is hard, because a method for computing square roots can be turned into a factoring method in the following way:


Choose an element $a$ modulo $N$ uniformely at random and compute $A=a^2 \pmod{N}$
Apply the square root computation technique on $A$, get result $a'$
If $a'=\pm a$ retry, else $gcd(a-a',N)$ is a non-trivial factor of $N$


An important argument here is that the square root computation cannot systematically return $a$ because it has no way to know which of the possible square roots of $A$ you started from (they are all equiprobable since you choose $a$ uniformly and kept it secret).

If you are asking about deciding whether an element is a square modulo $N$, the situation is a bit different. First, an element $a$ is not a square modulo $N$ if its Jacobi symbol of $a$ and $N$ is not $1$. But if the Jacobi symbol is $1$, the problem of deciding whether a number is a square is believed to be hard. However, for the decision problem contrary to the computational version, I am not aware of reduction to factoring.