Hello, I'm trying to generate a keypair using nss, but I encounter
some issue.
My key generation can take up to 30 seconds on a recent machine (Core
2 Duo 2.2 Ghz) (most generation take less the 10 seconds, and
sometimes less than 5 seconds, but even 10 seconds is more than what I
expect).
I have an optimized build of NSS, builded using :
env NS_USE_GCC=1 NO_MDUPDATE=1 BUILD_OPT=1 USE_PTHREADS=1 make
nss_build_all
And my test program is rather simple :
------------------------------------------------
#include <keyhi.h>
#include <mach/mach_time.h>
int main(int argc, char **argv) {
NSS_NoDB_Init(".");
SECKEYPublicKey *pubKey = NULL;
uint64_t delta = mach_absolute_time();
SECKEYPrivateKey *privKey = SECKEY_CreateRSAPrivateKey(2048,
&pubKey, NULL);
delta = mach_absolute_time() - delta;
printf("elapsed: %qu ms\n", delta / 1000000);
NSS_Shutdown();
exit(0);
}
------------------------------------------------
Note: mach_absolute_time() returns a number of nanoseconds.
Did I miss something. Is there any magic flag to improve this ? Or a
faster RSA keygen function in nss ?
_______________________________________________
dev-security mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-security