List Info

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




RSA Key Gen: Fast in Test App, Slow in Real App.
user name
2006-09-19 02:35:26
I made a test app to test RSA key generation and whatnot
using gcrypt
directly.  Generating a 128bit key pair is almost instant in
the test app. 
It takes less than a second.  When I try using it in my real
application (a
game), however, it takes several seconds to generate the
key.  The libraries
and function calls are identical.  Any idea what the causes
for the speed
differences are?  I'm using Visual Studio 7.0 on Windows XP.
 I'm not using
secure memory or multithreading.
-- 
View this message in context: http://www.nab
ble.com/RSA-Key-Gen%3A-Fast-in-Test-App%2C-Slow-in-Real-App.
-tf2296684.html#a6380989
Sent from the GnuPG - Libgcrypt - Dev mailing list archive
at Nabble.com.


_______________________________________________
Gcrypt-devel mailing list
Gcrypt-develgnupg.org

http://lists.gnupg.org/mailman/listinfo/gcrypt-devel
RSA Key Gen: Fast in Test App, Slow in Real App.
user name
2006-10-02 00:20:49
On Tuesday 19 September 2006 12:35, jitspoe wrote:
> I made a test app to test RSA key generation and
whatnot using gcrypt
> directly.  Generating a 128bit key pair is almost
instant in the test app.
> It takes less than a second.  When I try using it in my
real application (a
> game), however, it takes several seconds to generate
the key.  The
> libraries and function calls are identical.  Any idea
what the causes for
> the speed differences are?  I'm using Visual Studio 7.0
on Windows XP.  I'm
> not using secure memory or multithreading.
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
_______________________________________________
Gcrypt-devel mailing list
Gcrypt-develgnupg.org

http://lists.gnupg.org/mailman/listinfo/gcrypt-devel
RSA Key Gen: Fast in Test App, Slow in Real App.
user name
2006-10-05 02:52:51

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.
-- 
View this message in context: http://www.nab
ble.com/RSA-Key-Gen%3A-Fast-in-Test-App%2C-Slow-in-Real-App.
-tf2296684.html#a6651937
Sent from the GnuPG - Libgcrypt - Dev mailing list archive
at Nabble.com.


_______________________________________________
Gcrypt-devel mailing list
Gcrypt-develgnupg.org

http://lists.gnupg.org/mailman/listinfo/gcrypt-devel
[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )