Question

I am a C++ developer, but don't have a strong background in Windows development.

My main question revolves around the use of the Crypto API. I will use functions like CryptAcquireContext. While researching more about this API, described only as "Win32 Crypto API." I wonder if there is "Win64 Crypto API"?

If not, if I develop an application that makes use of "Win32 Crypto API" in Visual Studio and compile as 64 bit mode. It would be better if I had compiled in 32 bit?

What do I have do to develop a 64 bit application that makes use of the Crypto API?

If possible, report any problems you had developing applications for 64 bit while using the crypto API, retrieve certificates, carry signatures, etc..

Articles are very welcome.

Was it helpful?

Solution

The crypto api works fine in 64 bit, just use %ProgramFiles%\Microsoft SDKs\Windows\vX.X\Lib\x64 as your library instead of %ProgramFiles%\Microsoft SDKs\Windows\vX.X\Lib and it will work fine, there should be no differences between the 32 bit and the 64 bit library that is not handled by using the correct data types for the calls (specifically pointer width)

OTHER TIPS

The term "Win32" is to distinguish it from a .Net cryptography API, not a 64-bit API. Your research resources probably just haven't been updated to use newer terms like "Win64" or "native." It doesn't look like MSDN makes that mistake, though.

There should be no issues using it with a 64-bit application (except CAPICOM, which really is 32-bit only).

Crypto API resides in ADVAPI DLL. But you link to CAPICOM, which is deprecated, should not be used, and is 32 bit only.

CryptAcquireContext() is ADVAPI which exists in both 64 bit and 32 bit Windows.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top