libgcrypt with multiple threads

Andrey Mozharovskiy amzh at hushmail.com
Wed Feb 22 11:30:34 CET 2017


Okay, thank you

On 2/21/2017 at 9:47 PM, "Werner Koch"  wrote: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 --------------
An HTML attachment was scrubbed...
URL: </pipermail/attachments/20170222/11273f41/attachment.html>


More information about the Gnupg-devel mailing list