In 1993, Anderson [1] proposed a backdoor to the RSA key generation algorithm. This backdoor requires that a backdoor key (prime) $A$ be implanted within the key generation portion of the RSA algorithm.
Instead of the usual way, primes $P$ and $Q$ are generated using the following algorithm:
First define a backdoor prime $A$ and two smaller random primes $P'$ and $Q'$.
Let $k=1$
$ \text{If} \ \ isprime(A\cdot k + P'):\\ \quad P = A\cdot k + P' \\ \text{else}: k = k+1$
The analog is performed for $Q$ using $Q'$.
This algorithm was also described here Is there any more information on this RSA backdoor?
This backdoor allows to calculate $N′= N \mod A$ and then factor $N′$ into $P′$ and $Q′$. Still $N'$ needs to be factored, but this is now a much easier problem as $N'$ is only about a fourth in size of $N$.
Please note that in my algorithm above I used $k=1$, the original implementation by Anderson suggests starting value $k=P'$ and iteratively increasing $k$ by one until $P$ is prime. In my algorithm I start with $k=1$.
My questions are:
- does starting the iteration from $k=1$ instead of $k=P'$ make a difference?
- in the way $N'$ is generated, what is the best way to factor $N'$ given the information how it is generated? Is there a certain factoring algorithm that makes factoring $N'$ very easy?
[1] Ross Anderson. Practical RSA Trapdoor. Electronic Letters. 29(11): 995, 1993.