« 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

Brad Hards wrote:
On the face of it, you are doing something different between your test
application and the real application. Try cutting down a copy of your real
application towards your test application.

You really haven't provided enough information to say more. However generating
RSA keys "instantly" sounds a bit suspicious - perhaps you should review your
code again.

Brad
Thanks for the reply.  Sorry if I didn't elaborate enough.  The test code and the application code are identical.  The only difference is that one is standalone, just for testing the functions, and the other is embedded into my application.  The same gcrypt functions are called and in the same order.  All I'm doing is generating a 128bit RSA key pair.  I can post the source code if you're interested.  Once the first RSA key has been generated, generating another is almost instant, so I'm guessing it's initializing some kind of prime table.  I haven't delved into the gcrypt code to find out.

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