Post · 6 min read· pp. 128–130

A New Factoring Algorithm

A new approach to factoring

images20

Lofa Polir is an unknown–until now–undergraduate working for a strong advisor. I do not yet have her picture, nor am I allowed to say any more about her or her advisor. They have sent me a rough draft of her new paper. Her result is nothing less than a new approach to factoring. If correct, it will break factoring based crypto-system in random polynomial time. Amazing. I have been able to get through some of the paper, and at least half seems fine. The last part uses a non-trivial amount of computer calculation plus some deep number theory, and will take a while to check. At this point I say the chances are definitely non-zero that this will all work.

The Claims

The key definition is the following:

Definition: Call an integer d×d{d \times d} matrix A{A} a (p,q,k,d){(p,q,k,d)}–special matrix provided the following are true:

1. The matrix A{A} is invertible modulo pq{pq}; 2. The matrix A{A} is not symmetric modulo pq{pq}; 3. The matrix Ak{A^{k}} is symmetric modulo pq{pq}; 4. The matrix A{A} satisfies Ap≡A mod p{A^{p} \equiv A \bmod p} and Aq≡A mod q{A^{q} \equiv A \bmod q}; 5. Finally, k{k} divides q−1{q-1} and k{k} divides p−2{p-2}. (Note, it is important, that these condition are not the same.)

She then claims the following two theorems:

Theorem 1: Suppose that n=pq{n=pq} where p{p} and q{q} are primes. Suppose also that A{A} is a (p,q,k,d){(p,q,k,d)}-special matrix. Then, there is an algorithm that can factor n{n} given only A{A} and n{n}, and it runs in time poly(log⁡n,d){\textsf{poly}(\log n,d)}.

Theorem 2: Suppose that n=pq{n=pq} where p{p} and q{q} are primes. Also assume that k{k} divides q−1{q-1} and divides p−2{p-2}. There is a random algorithm that given n{n},k{k} and d{d} produces a matrix AA in time poly(log⁡n,k,d){\textsf{poly}(\log n,k,d)}. Moreover, with probability at least 1/21/2 the matrix AA is a (p,q,k,d){(p,q,k,d)}-special matrix.

The second theorem relies on the Generalized Riemann Hypothesis. Clearly, together these theorems yield an attack on n=pq{n=pq} based crypto-systems. The attack goes like this. Pick a k{k} and “hope” that k{k} divides q−1{q-1} and p−2{p-2}. If that is true, then generate matrices and hope that they are (p,q,k,d)(p,q,k,d)-special. If they are, then you can factor nn. If they are not try another matrix. Note, even if k=3{k=3} was the only value that worked, then this would break many instances, since p{p} and q{q} are usually randomly selected.

The first theorem is fairly simple, and I will supply her proof in detail. The second, “proof” is much harder and I have not yet worked through it.

Proof of Theorem 1

Suppose that A{A} is a (p,q,k,d){(p,q,k,d)}-special matrix for n=pq{n=pq}. The algorithm is incrediblely simple. Compute the following:

  1. Compute M=An−1 mod n{M=A^{n-1} \bmod n};
  2. Then, compute the gcd’s of n{n} and Mij−Mji{M_{ij}-M_{ji}} for all i≠j{i \not = j}.

She claims that this will factor n{n}. More precisely, that one of the greatest common divisor (gcd) calculations will yield a factor of n{n}. Clearly, the algorithm runs in the time required; the key question is solely one of correctness.

The key is to look at Mp=M mod p{M_{p} = M \bmod p} and also Mq=M mod q{M_{q} = M \bmod q}. Let’s look at Mp{M_{p}}. By definition this is equal to Apq−1 mod p{A^{pq-1} \bmod p}. By the definition of special, Mp{M_{p}} is equal to Aq−1 mod p{A^{q-1} \bmod p}. Again by the definition of special, k{k} divides q−1{q-1}. Then, Mp{M_{p}} is equal to

(Ak)q−1k mod p\displaystyle (A^{k})^{\frac {q-1} k} \bmod p

and so Mp{M_{p}} is equal to a symmetric matrix modulo p{p}. Note, while the product of symmetric matrices are not always symmetric, they are if they commute. Since powers of any matrix commute with each other, Mp{M_{p}} equals a symmetric matrix modulo p{p}.

What happens to Mq{M_{q}}? The trick is that it is not a symmetric matrix. We see why in a moment. But, for now assume that was true. Then, there must be i≠j{i \not = j} so that Mq{M_{q}} entries at (i,j){(i,j)} and (j,i){(j,i)} are different. Then, by the Chinese Remainder Theorem Mij−Mji{M_{ij} - M_{ji}} will be divisible by p{p} but not by q{q}. This shows that the algorithm factors n{n}.

Thus, the key question is why is Mq{M_{q}} not a symmetric matrix modulo q{q}. As before Mq{M_{q}} is equal to Ap−1 mod q{A^{p-1} \bmod q}. But again by the definition of special, p−1=kl+1{p-1 = kl+1} for some l{l}. Then, Mq{M_{q}} is equal to

A⋅(Ak)p−2k mod q.\displaystyle A \cdot (A^{k})^{\frac {p-2} k} \bmod q.

Thus, Mq{M_{q}} is A⋅S mod q{A \cdot S \bmod q} where again S{S} is symmetric. Since A{A} was assumed to not be symmetric the following simple lemma finishes the argument.

Lemma 4 Suppose that X{X} and Y{Y} are square matrices of the same dimension. Suppose that they commute and that Y{Y} and X⋅Y{X \cdot Y} are both symmetric. Also suppose that Y{Y} is invertible. Then, X{X} is also symmetric.

Proof: The transpose of a matrix M{M} is denoted by MT{M^{T}}. Recall that by a standard fact about transpose, (X⋅Y)T=YT⋅XT{(X \cdot Y)^{T} = Y^{T} \cdot X^{T}} for any matrices X{X} and Y{Y}. Now,

(X⋅Y)T=YT⋅XT=Y⋅XT.\displaystyle (X \cdot Y)^{T} = Y^{T} \cdot X^{T} = Y \cdot X^{T}.

The last uses that Y{Y} is symmetric. Now since X⋅Y{X \cdot Y} is symmetric it also follows that

(X⋅Y)T=X⋅Y=Y⋅X.\displaystyle (X \cdot Y)^{T} = X \cdot Y = Y \cdot X.

The last step uses that X{X} and Y{Y} commute. Thus, it follows that Y⋅XT=Y⋅X{Y \cdot X^{T} = Y \cdot X}. Finally, Y{Y} is invertible so that XT=X{X^{T} = X}. □\Box

“Proof” of Theorem 2

This is the part of her paper that I least understand. She needs to construct a (p,q,k,d){(p,q,k,d)}-special matrix A{A} given only n=pq{n=pq} and k{k} and d{d}. She only shows any details for the special case k=3{k=3} and d=4{d=4}. As state earlier, even this restricted case, would break many instances of systems that use randomly generated p{p} and q{q}.

Her approach to theorem 2 is to write down the formal equations that define the properties of A{A} being a special matrix. The main ones that she has to worry about are that A{A} must not be symmetric and yet Ak{A^{k}} is symmetric modulo n{n}. The Fermat conditions: the matrix A{A} satisfies Ap≡A mod p{A^{p} \equiv A \bmod p} and Aq≡A mod q{A^{q} \equiv A \bmod q} are handled by an indirect argument.

The formal system is a set of equations in 16{16} unknowns and 7{7} equations. One equation is used to force the matrix not to be symmetric and 6{6} equations are used to make the power A3{A^{3}} symmetric. These are, of course, non-linear equations modulo n{n}. In general such equations are equivalent to factoring. However, there is special structure in her equations that she exploits.

After some Gröbner basis argument she reduces the solvability of these equations to the solvability of one high degree equation in two unknowns modulo nn. Then, she uses a Pollard-Schnorr type descent argument to prove that with high probability this equation has a solution.

The problem with checking this is first the Gröbner basis step involves a fair amount of equation manipulation, which needs to be checked carefully. Also the descent argument is a clever variation of the famous one due to John Pollard and Claus Schnorr and seems plausible, but again must be carefully checked.

Open Problems

The obvious open problem is: does her proof work? A potentially exciting time. I will get back soon with more details.