Multi-thread

Aki Tuomi cmouse at youzen.ext.b2.fi
Wed Oct 14 08:22:45 CEST 2009


On Wed, Oct 07, 2009 at 11:47:29AM +0200, Antoine Dumont wrote:
> Hy,
> First of all, thanks a lot to the developers of this library and
> particularly to Werner Koch for his job.
> My purpose is about the generation of asymetric keys. When I generate a
> couple of key of DSA or RSA algorithm thanks to the function
> gcry_pk_genkey it can be very long and I understand that generate
> primary numbers of 15000 bits is not very simple. But i asked me why the
> library use only one core. I can compile and run my program in machine
> whose have many core and I suppose it's possible.
> After reading the reference manual, I saw that multi-thread is
> supported, I suppose it's meaning that we can use the library into a
> multi-thread program, but is the library itself multi-thread ?
> Thanks a lot for your answers !
> Best regards,
> Lao

You do understand that mere fact of having "multiple threads" makes no
difference. You'd need tasks to give to each thread. Just like having 
multiple cores in your CPU, you need *distinct* tasks to divide to
these threads. 

Generating a keypair is not something that can be divided into
distributable subtasks readily, thus making it very difficult to benefit
from multithreading. 

Aki Tuomi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: </pipermail/attachments/20091014/02bbbe0b/attachment.pgp>


More information about the Gcrypt-devel mailing list