0

kinda new here, I had a question pertaining to someone being able to factor one's RSA keys through the GCD. Anyways the question goes that there are two people: A and B. A makes his/her private key as $N_a = p_a\cdot q_a$ and B does the same with $N_b = p_b \cdot q_b$. I'm assuming here that both random primes are of length n bits and so I'm wondering whats the probability of the two keys sharing a common prime. I was considering that it may have something to do with the Prime number theorem but not entirely sure.

poncho
  • 147,019
  • 11
  • 229
  • 360
  • remember that PNT is an asymptotic distribution, so your probability will be approximate. That said, sounds like you are on the right track. What is the probability that one of the probability that the intersection of ${p_a,q_a}$ and ${p_b,q_b}$ is non-empty? – mikeazo Dec 10 '14 at 16:14
  • I understood that but I'm just having a problem connecting it to the n bit length. – Marorin Dec 10 '14 at 16:32
  • Well, a $n$-bit number lies between $2^{n-1}$ and $2^n-1$ (inclusive). – fkraiem Dec 10 '14 at 16:49
  • So would it be 2^n-1/(x/lnx) ? – Marorin Dec 10 '14 at 17:20
  • 1
    If $\pi(x)$ is the number of primes less than $x$ (which $x/\ln(x)$ approximates), then it would be $\pi(2^n-1)-\pi(2^{n-1})$. So you can approximate it using the formula. – mikeazo Dec 10 '14 at 18:00
  • 3
  • It should be noted, that you would calculate the probability under the assumtion, that both users pick their primes with true equal randomness from $[2^{n-1},2^n-1]$. In reality often there is picked any integer in that range with a pseudo random generator and then search up or down to find the next suitable prime number. Considering the fact, that random number generation is far from being perfect, the probability of finding a collision under real conditions might be way higher that the value you calculate. – Thekwasti Dec 12 '14 at 16:23

0 Answers0