« Return to Thread: RSA Key Gen: Fast in Test App, Slow in Real App.

Re: RSA Key Gen: Fast in Test App, Slow in Real App.

by jitspoe :: Rate this Message:

Reply to Author | View in Thread

You were correct about it being the RNG.  I found that simply calling gcry_randomize() paused for several seconds.  The slow_gatherer_windowsNT() function seems to be the culprit.  More specifically, the RegQueryValueEx(HKEY_PERFORMANCE_DATA, "Global", NULL, NULL, (LPBYTE) pPerfData, &dwSize); call.  I guess the console app didn't use this for whatever reason?  Any suggestions on how I would improve this performance?  Looking through the code, the only way I see to do it would be to create a seed file.

 « Return to Thread: RSA Key Gen: Fast in Test App, Slow in Real App.