libgcrypt with multiple threads

Werner Koch wk at gnupg.org
Tue Feb 21 19:42:41 CET 2017


Hi!
On Tue, 21 Feb 2017 10:35, amzh at hushmail.com said:

> Could someone please clarify, does the following make libgcrypt do all
> the work in separate thread : gcry_control (GCRYCTL_SET_THREAD_CBS,
> &gcry_threads_pthread) ? That is, after initializing libgcrypt like
> that, do all the calls to decrypt automatically go in a separate

Let me quote from the manual:

     'GCRYCTL_SET_THREAD_CBS; Arguments: struct ath_ops *ath_ops'
          This command is obsolete since version 1.6.

in older versions this call was used to register a set of thread
callbacks to use Libgcrypt with different thread implementations.  Since
1.6 we only support the standard thread library of the platform;
ie. pthreads on Unix or the standard Windows API.

Your application code needs to implement decryption in another thread
itself.

Thake care: A cipher context (e.g. from gcry_cipher_open) may not be
shared between threads.


Salam-Shalom,

   Werner

-- 
Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 227 bytes
Desc: not available
URL: </pipermail/attachments/20170221/6333541a/attachment-0001.sig>


More information about the Gnupg-devel mailing list