473,614 Members | 2,335 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

CryptoAPI uniqueness

Hi
i have a question regarding the CryptoAPI.
I can seemingly call CryptAcquireCon text, and if I pass any random string as
the key container name and NULL as the provider name, with CRYPT_NEWKEYSET
as the last parameter, then the rest of the crypt functions seem to work.
But I came across an instance when I stopped debugging the program, before I
had called CryptReleaseCon text, and when I ran the program again, I got
FALSE returned, and !gle returned something like "The specified keyset
already exists". Presumably, the CSP can only service one unique "keyset" at
once, and if it is already "checked out", it can't service another request
for the same keyset name?
I want to write this in a DLL, and I would call CryptReleaseCon text at the
end of the encrypting/decrypting method.
But what if more than one application was using the DLL at once, could
somebody confirm whether you're supposed to use a unique string for the
keyname for each application? What if two instances of the same application
were running at once and both doing cryptography at the same time?
(unlikely, but possible...)
Nov 17 '05 #1
0 1076

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2963
by: Puvendran Selvaratnam | last post by:
Hi, First of all my apologies if you have seen this mail already but I am re-sending as there were some initial problems. This query is related to defining indexes to be unique or not and consequences thereof. Some documented facts that I am aware of include
2
4650
by: Andy Atherton | last post by:
When using SQL 2000 personal desktop (i.e MSDE) on win 98 Machine with our VB6 application we sometimes get this error CryptoAPI function 'CryptAcquireContext' failed. Error 0x8009001d: Provider DLL failed to initialize correctly. On Win2000/2003 XP we not get this error any one come across this before
0
1899
by: Kim HM | last post by:
I Have a .NET program sending mails using CDOEX. These mail I need to sign. I god a tip that i shoud use CAPICOM. That worked fine sending a mail with signature. BUT the problem is that I have to type the password for my certificate every time my program signs a mail :o( My program is a windows service running on a server so typing passwords is bad.
4
6456
by: Dave Bailey | last post by:
I have an application installed on a web server. When forst intalled it worked fine. The administrator rebooted the server and then when accessing the app the folowing error appears: CryptoAPI cryptographic service provider (CSP) for this implementation could not be acquired. I am using DPAPI(Machine Store) to encrypt a connection string. The decryption code is as follows: private string GetConnectionString() { DataProtector dp...
1
1895
by: Greg Merideth | last post by:
I've finally got my client/server secure soap process working and I've just noticed that under the servers \NetworkService\AppData\MS\Crypto\RSA folder there are some 100+ paired sets of RSA keys. I don't setup RSACryptoServiceProvider using CspParameters and I didn't give the RSA initiator any paramters when I setup the class yet, each implementation of the RSA class, as a web service, is creating a cryptoAPI storage bin for the RSA...
0
343
by: no game | last post by:
I have a problem with signature using RSACryptoServiceProvider I use signature=privKey.SignData(byteData, new MD5CryptoServiceProvide), and get a byte array of signature. The other party use CryptoAPI C++ function:
0
1348
by: Mike P | last post by:
This is a very weird problem, when I boot my IIS server I get a CryptoAPI cryptographic service provider (CSP) for this implementation could not be acquired exception. However, once I access my site within the server, the exception goes away. My ASP page only displays the logon user (only 2 lines of code). I don't understand this behavior at all.
0
3236
by: =?Utf-8?B?VmVuZWRpY3Q=?= | last post by:
Hi All, I have a program written in VB6 which utilize CryptoAPI to encrypt bitmap file. I'm writting a new program in C# 2005 to decrypt those encrypted bitmap file by adding the CryptoAPI reference in my C# project. Everything seem fine, i have no problem when execute the program. But when I click the button to decrypt the bitmap file, there is an error
1
1853
by: MichaelAni | last post by:
Hi, I have a requirement to develop an component in VC++ and .net for encryption/decryption. I am deriving a key from a password. But when i encrypt the data VC++(cryptoapi) component and .net are giving different output. how can i resolve this. In. .net component i am using "PasswordDeriveBytes" class to generated the key. algorithm used in "RC2" and Hash used in MD5. Pleae help
0
8640
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8589
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8287
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8443
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5548
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4136
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2573
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1757
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1438
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.