Factor base for RSA cryptosystem

138 Views Asked by At

In RSA crptosystem, we choose two big primes $p,q$ and set $n=pq$. $n$ is public and roughly, the aim is factorize $n$ to decrypt the encrpyted message.

A method to attack the system is the following:

Basic Principle. Let $n$ be an integer and suppose that there exist integers $x,y$ with $x^2 \equiv y^2 \pmod n$ but $x \not \equiv \pm y \pmod n$. Then, $n$ is composite. Moreover, $gcd(x-y,n)$ gives a nontrivial factor of $n$.

Thus, we look for an equivalence as above.

Now, my question on "factor base", a set of prime numbers. Let $n$ be given and we want to factorize it. We choose a set of prime numbers which we call as factor base $B$. We pick random numbers $a$ and write $a^2 \equiv p_1^2 p_2p_5 \pmod n$ so that the prime factors only belong to the base $B$. Then, we factorize $(a+1)^2,(a+2)^2 \dots etc.$ modulo $n$ so that the prime factors are contained in $B$. We multiply the elements on the left and right so that the process stops when we have squares on the boths sides, an equivalence like $$a^2 (a+2)^2 (a+3)^2 \equiv p_2^4 p_3^2 p_6^4 \pmod n$$

Thus, we find $x^2 \equiv y^2 \pmod n$ provided that $x \not \equiv \pm y \pmod n$.

This is how I understand the method but I do not have any idea on the following questions:

Let Alice and Bob use RSA for their communication and let $\{p_1, . . . , p_{20} \}$ be a set of primes to use for key construction.

1.How to find the number of secure RSA keys?

2.If both selects their primes randomly how to find the probability that the keys not secure?