0

This is a follow up on "Euler's factorization needs two different sums of squares, what if only one sum of squares is known?":
Euler's factorization needs two different sums of squares, what if only one sum of squares is known?

Robert Chapman described a method to determine sum of squares for prime $p = 1 (\mod 4)$, by determining randomly a quadratic non-residue $a$ of $p$, then using identity $a^{(p-1)/4} = sqrt(-1) (\mod p)$ and finally computing

gcd(p, (a**(p//4) % p) + I)

with Python sympy gaussian integer $gcd()$). There are two tries expected to succeed. I used this script to compute sum of squares for biggest known twin prime with 388342 decimal digits in 2524.1 seconds for just the $gcd()$ computation on i7-11850H [with pre-computed $sqrt(-1)(\mod p)$]:
https://github.com/Hermann-SW/RSA_numbers_factored/blob/main/python/sympy_gaussian_integer_gcd_benchmark/388342.py

Now to current question, if knowing two $sqrt(-1) (\mod n)$ with $a + b \neq n$, then $gcd(n, a+I)$ and $gcd(n, b+I)$ compute two different sums of squares for $n$, and Euler factorization can efficiently factor $n$ (see first posting link).

So current question is:
Knowing just one $sqrt(-1) (\mod n)$ somehow (and nothing more), does that allow to efficiently factor $n$?

1 Answers1

1

To my knowledge, there is no efficient algorithm to factorize a number by knowing a square root of $-1$ modulo this number. If this were feasible, one could easily factorize numbers of the form $m^{2k} + 1$, which would let us find factors for e.g. Fermat numbers. Restricting the domain to semiprimes rather than any composite number of the above form shouldn't make much of a difference either.

ynwarcs
  • 141
  • could easily factorize numbers of the form m2k+1, which would let us find factors for e.g. Fermat numbers.

    where can I find more information on this?

    – HermannSW Aug 19 '23 at 16:23
  • Regarding 388,342-digit 42 minues in Python. I started GMP powm() computation of "3^((p-1)/4)" for largest known prime =1 (mod 4) on 7/20/23 (9,383,761-digits) on AMD 7600X CPU that I bought because of its big single core performance. I stopped that after 10 days. I patched 3.8.21 version of LLR software to output last 100 computed values. 2nd last value is sqrt(-1) (mod 1), and was computed in 10:45:01h (with 6 LLR threads), 168x faster than with GMP powm()! 9383761-digit-prime repo – HermannSW Aug 19 '23 at 16:33