2

I'm concerning myself with factoring semi-primes and believe that if given a large semi-prime ($N$) one finds a non-trivial sum of squares representation:

$$ x^2 + y^2 = N$$

Then one can efficiently retrieve a factorization of $N$. My intuition for this belief is that I think the "factoring" problem over the gaussian integers is difficult and note that such a representation can be in linear time converted into a factorization $(x + yi) ( x- yi)$ when considering gaussian integers.

But it's not clear to me how to leverage this information for regular integers.

More Notes:

So I realized after @Jack D'Aruzio's comment that this information could be exploited by computing $i$ mod $N$

That is finding some constant $c$ such that $c^2 = -1 \mod N$. Then we have that

$$ (x + cy)(x - cy) \equiv 0 \mod N$$

And therefore at least one of $(x + cy)$ and $(x - cy)$ must be a zero divisor and can be used to recover factors of (assuming we don't have the trivial, non-trivial pair) $N$.

Of course there is no guarantee that we can find such a $c$, and even if its guaranteed to exist such a $c$ might be computationally as expensive to find as factoring itself

  • You are just re-discovering the key ingredients of the quadratic sieve and of the general field sieve. – Jack D'Aurizio Jan 02 '19 at 22:12
  • The point is that the factorization problem in $\mathbb{Z}$ and $\mathbb{Z}[i]$ is just as difficult, but if $N$ is represented by some binary quadratic form (with a negative discriminant) (and a small class number), $x$ and $y$ have to fulfill many arithmetic constraints, so they can be sifted by exploiting the informations provided by Legendre/Jacobi/Kronecker symbols. – Jack D'Aurizio Jan 02 '19 at 22:18
  • 2
    meanwhile, if you get two different expressions as sum of two squares, you get a factoring. http://zakuski.utsa.edu/~jagy/Brillhart_Euler_factoring_2009.pdf – Will Jagy Jan 02 '19 at 22:58
  • 1
    you may want to look at this method using the sum of 2 squares to factor numbers. It is different from Euler's method. https://math.stackexchange.com/questions/3066531/can-the-sum-of-two-squares-be-used-to-factor-large-numbers – user25406 Jan 09 '19 at 00:22
  • @user25406 thanks! That link was very useful and confirmed my suspicion in the comments that a single sum of 2 squares representation may not be very helpful. – Sidharth Ghoshal Oct 13 '20 at 04:28

0 Answers0