Hi Kevin,

Kevin> I found some code at http://efgh.com/software/ that has exactly what I need:
Kevin> void GenerateKeys(mpuint &d, mpuint &e, mpuint &n);
Kevin> void EncryptDecrypt(mpuint &result, const mpuint &source, const mpuint &e,
Kevin> const mpuint &n);

Kevin> The problem with that code is that it is not optimized and so is too slow.

What makes you think it's too slow?

Generating public and private keys is a very CPU intensive task. I
don't know the software you've mentioned, but it's probably operating
at normal speed.

It also depends on how big you want the key (modulus) to be.

As a benchmark, one of our products generates a public/private key
pair with a 2304 modulus using Crypto++.  It takes 17 seconds to do
this on a Pentium III 800MHz computer.

A small 512 modulus is significantly faster (can't remember exactly
but probably under 2 seconds) but it doesn't have much security
nowadays.

Remember, you usually only generate public/private keys once and
then use the public key to encrypt small information (such as a
randomly generated key for a symmetric encryption algorithm).

If you want the public/private keys to be generated very quickly, then
you're probably not using them in the way they're intended.

-- 
Russell Robinson (mailto:[EMAIL PROTECTED])
Author of Tectite (CRM and Licensing for Software Developers)
Download your free CRM from: http://www.tectite.com/


Reply via email to