In the generation method for RSA-moduli proposed by Boneh and Franklin in [BF97] the partial signing servers generate random shares pi, qi and compute as candidate for an RSA-modulus n = pq where p = (Ʃ pi) and q = (Ʃ qi). Then they perform a time-consuming distributed primality test which simultaneously checks the primality both of p and q by computing g(p−1)(q−1) = 1 mod n. The primality test proposed in [BF97] cannot be generalized to products of more than two primes. A more complicated one for products of three primes was presented in [BH98]. In this paper we propose a new distributed primality test, which can independently prove the primality of p or q for the public modulus n = pq and can be easily generalized to products of arbitrarily many factors, i.e., the Multi-Prime RSA of PKCS #1 v2.0 Amendment 1.0 [PKCS]. The proposed scheme can be applied in parallel for each factor p and q. We use properties of the group Cl(−8n2), which is the class group of the quadratic field with discriminant −8n2. As it is the case with the Boneh-Franklin protocol our protocol is (formula presented)-private, i.e. less than (formula presented) colluding servers cannot learn any information about the primes of the generated modulus. The security of the proposed scheme is based on the intractability of the discrete logarithm problem in Cl(−8n2) and on the intractability of a new number theoretic problem which seems to be intractable too.