Hello, > I'm testing computation times of some OpenSSL criptographic functions > and I've got a question. > how much long is prime p when I create a RSA key pair of 1024 bit (with > RSA_generate_key) ? > > I'm asking this because when generating a RSA key pair of 1024 bit , > computation time is about 0,364s. > But when I generate a safe prime number of 1024 bit with > BN_generate_prime , > computation time is about 130s. When generating RSA 1024 bit key with RSA_generate_key() function two prime numbers 512 bit long are generated (p,q). Then size of RSA key is size of modulus n = p*q. When generating "safe" primes with BN_generate_prime() additional checks are performed ( (p-1/2) should be prime too) and this takes more time. But safe primes are needed for DH, not for RSA and in generating RSA key p and q are not safe (in meaning (p-1)/2 is prime too).
Best regards, -- Marek Marcola <[EMAIL PROTECTED]> ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]