PC Review


Reply
Thread Tools Rate Thread

About CryptoApi and multithreading

 
 
Aleksey Rechinsky
Guest
Posts: n/a
 
      12th Aug 2003
Hello!

I have to write a cryptographic service provider (CSP) for MS CryptoApi.
I read all of MSDN documentation about it but still can't understand if the
CSP must be multithread-safe.

I'll try to explain in details, i need answers for the following questions:

1) Should i expect that CPAcquireContext() may be called in different thread
contexts?
Namely, should i protect CSP internal handle table for HCRYPTPROV?

2) Should i expect that one HCRYPTPROV may be used in different thread
contexts?
For example is it normal to CryptoApi when one (main) user thread acquires
key context (receives HCRYPTPROV from CryptAcquireContext()) and then worker
threads do some job with it. For example, the first worker thread decrypts a
file, the second - encrypts a message and so on, but with the one
HCRYPTPROV.
In other words, should i protect CSP internal HCRYPTPROV representation from
multithreaded access?

3) All of above for HCRYPTKEY and HCRYPTHASH?

Thanks.
Aleksey.

PS: Sorry for my poor English, i have very small writing practice :-|




 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CryptoAPI in C# and VB6 =?Utf-8?B?VmVuZWRpY3Q=?= Microsoft C# .NET 0 26th Dec 2006 10:19 AM
The signature different in C# and C++ CRYPTOAPI no game Microsoft C# .NET 0 4th Aug 2005 08:14 PM
CryptoAPI DRIESSEN Michel Windows XP Work Remotely 5 15th Dec 2004 02:17 AM
CryptoAPI DRIESSEN Michel Windows XP Basics 2 2nd Dec 2004 03:23 PM
CryptoAPI question... =?Utf-8?B?RGFuaWwgU2hlYm91bmlu?= Microsoft Dot NET Framework 0 9th Feb 2004 05:11 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:13 PM.