pub fn generate_multi_prime_key<R: CryptoRngCore + ?Sized>(
    rng: &mut R,
    nprimes: usize,
    bit_size: usize
) -> Result<RsaPrivateKey>
Expand description

Generates a multi-prime RSA keypair of the given bit size, and the given random source, as suggested in 1. Although the public keys are compatible (actually, indistinguishable) from the 2-prime case, the private keys are not. Thus it may not be possible to export multi-prime private keys in certain formats or to subsequently import them into other code.

Uses default public key exponent of 65537. If you want to use a custom public key exponent value, use algorithms::generate_multi_prime_key_with_exp instead.

Table 1 in 2 suggests maximum numbers of primes for a given size.