Skip to main content
Tweeted twitter.com/StackCrypto/status/1166183755901558791
edited title
Link
Maarten Bodewes
  • 94.5k
  • 13
  • 165
  • 319

why Why does square root mod n$\pmod n$ find p$p$ and q$q$ ( n=p*qas $n = p \cdot q$)?

Became Hot Network Question
latex syntax
Source Link
kelalaka
  • 49.5k
  • 12
  • 119
  • 205

Let n = p*q,$n = p*q$, with p != q$p \neq q$ and x^2=1 (mod n), x+1 $\neq$ 0 (mod n), x-1 $\neq$ 0 (mod n)$x^2=1 \pmod n$, $x+1 \neq 0 \pmod n, x-1 \neq 0 \pmod n$ (So x is a non-trivial square root mod n.)

I don't see how $gcd(x+1,n) \in {p,q}$$\gcd(x+1,n) \in \{p,q\}$ follows.

I understand that x^2=(x+1)(x-1)$x^2=(x+1)(x-1)$, so n=p*qis$n=p*q$ is a factor of (x+1)(x-1)$(x+1)(x-1)$, but neither of (x+1)$(x+1)$ nor of (x-1)$(x-1)$ (as a x is a non-trivial solution). Every proof I've seen so far stops at this point, leaving me confused. In my opinion, it holds that $gcd(x+1,n) \in {1,p,q}$$gcd(x+1,n) \in \{1,p,q\}$ (so the trivial solution 1 is indeed possible). How can we be sure that x+1$x+1$ and n have common factors other than 1? I'm sure I am missing something very obvious, but I just can't make it out.

Let n = p*q, with p != q and x^2=1 (mod n), x+1 $\neq$ 0 (mod n), x-1 $\neq$ 0 (mod n) (So x is a non-trivial square root mod n.)

I don't see how $gcd(x+1,n) \in {p,q}$ follows.

I understand that x^2=(x+1)(x-1), so n=p*qis a factor of (x+1)(x-1), but neither of (x+1) nor of (x-1) (as a x is a non-trivial solution). Every proof I've seen so far stops at this point, leaving me confused. In my opinion, it holds that $gcd(x+1,n) \in {1,p,q}$ (so the trivial solution 1 is indeed possible). How can we be sure that x+1 and n have common factors other than 1? I'm sure I am missing something very obvious, but I just can't make it out.

Let $n = p*q$, with $p \neq q$ and $x^2=1 \pmod n$, $x+1 \neq 0 \pmod n, x-1 \neq 0 \pmod n$ (So x is a non-trivial square root mod n.)

I don't see how $\gcd(x+1,n) \in \{p,q\}$ follows.

I understand that $x^2=(x+1)(x-1)$, so $n=p*q$ is a factor of $(x+1)(x-1)$, but neither of $(x+1)$ nor of $(x-1)$ (as a x is a non-trivial solution). Every proof I've seen so far stops at this point, leaving me confused. In my opinion, it holds that $gcd(x+1,n) \in \{1,p,q\}$ (so the trivial solution 1 is indeed possible). How can we be sure that $x+1$ and n have common factors other than 1? I'm sure I am missing something very obvious, but I just can't make it out.

Source Link

why does square root mod n find p and q ( n=p*q)?

Let n = p*q, with p != q and x^2=1 (mod n), x+1 $\neq$ 0 (mod n), x-1 $\neq$ 0 (mod n) (So x is a non-trivial square root mod n.)

I don't see how $gcd(x+1,n) \in {p,q}$ follows.

I understand that x^2=(x+1)(x-1), so n=p*qis a factor of (x+1)(x-1), but neither of (x+1) nor of (x-1) (as a x is a non-trivial solution). Every proof I've seen so far stops at this point, leaving me confused. In my opinion, it holds that $gcd(x+1,n) \in {1,p,q}$ (so the trivial solution 1 is indeed possible). How can we be sure that x+1 and n have common factors other than 1? I'm sure I am missing something very obvious, but I just can't make it out.