We are trying to distinguish two RSA prime generators:
Prime generator 1
- draw uniformly at random an integer $p$ with $2^{1023.5}<p<2^{1024}$, until it is prime
- output $p$.
Prime generator 2
- draw uniformly at random an integer $p$ with $2^{1023.5}<p<2^{1024}$
- while $p$ is composite, $p\gets p+1$
- output $p$.
We can distinguish these generators from their output: the primes generated per 2 are on average farther away from the prime immediately below than are the primes generated per 1.
What advantage do we get from the above distinguisher?
Can we make a distinguisher with sizable advantage from the distribution of $p\bmod \mathtt{e221f97c30e94e1d}_{16}$ ? That 64-bit constant is the product of the odd primes to $53$. If yes, what's the advantage?
Now we derive two generators of RSA moduli, by multiplying two consecutive outputs of each of these prime generators. Can we make a distinguisher with sizable advantage, even though we can't factor the moduli? If yes, what's the advantage?
Motivation is recognizing if RSA keys are generated using this.