Questions tagged [cryptoapi]

Cryptography API: Application programming interface that enables application developers to add authentication, encoding, and encryption to Windows-based applications. The API are oriented on the developer of unmanaged (native) applications in C/C++.

Cryptography API: Application programming interface that enables application developers to add authentication, encoding, and encryption to Windows-based applications. The API are oriented on the developer of unmanaged (native) applications in C/C++.

Microsoft cryptographic technologies include CryptoAPI, Next Generation (CNG), Cryptographic Service Providers (CSP), CryptoAPI Tools, CAPICOM, WinTrust, issuing and managing certificates, and developing customizable public key infrastructures. Certificate and smart card enrollment, certificate management, and custom module development are also described.

636 questions
0
votes
2 answers

Step from CertEnumSystemStoreLocation() to CertEnumSystemStore()

My question is about cryptoAPI interface. Look, CertEnumSystemStoreLocation() is a function to enumerate all certificate store locations available in system. It returns (using callback) enumerated location as wide string…
MrCat
  • 107
  • 2
0
votes
1 answer

CryptStringToBinary not working with a NULL terminated string. Why?

does anyone know why this code is not working? #include "stdafx.h" #include #include int _tmain(int argc, _TCHAR* argv[]) { wchar_t *bin = TEXT("ProductID:1233===>55555"); BYTE out2[1000]; DWORD olen; olen = 1000; if…
Tom Jones
  • 3
  • 1
  • 3
0
votes
0 answers

CertCreateCertificateChainEngine returning "Invalid Parameter" (0x80070057)

I have been trying to create a non-default certificate chain using modified version of an example posted https://msdn.microsoft.com/en-us/library/windows/desktop/aa382042(v=vs.85).aspx CERT_CHAIN_ENGINE_CONFIG chainConfig; HCERTCHAINENGINE…
Anand
  • 31
  • 1
  • 3
0
votes
1 answer

Is it secure to use the built-in Android/Java crypto API?

Let's say I (as an app developer) want to encrypt something with a key that's stored somewhere in my app. Ultimately, I have to load that key into memory and pass it, along with the plain-text data, to some Java class in javax.crypto. Since those…
Todor K.
  • 653
  • 6
  • 12
0
votes
1 answer

CryptDecrypt fails with NT_BAD_DATA (0x80090005)

The following code by Alejandro Magencio generate key pairs, encrypts and decrypts files with the Microsoft CryptoAPI works well, but only for files smaller than the…
Bertrand_Szoghy
  • 880
  • 1
  • 11
  • 26
0
votes
1 answer

How to AES CBC encryption Using cryptoAPI

I want to encrypt a file with AES CBC mode encryption, Using cryptoAPI functions and set my own key from the command-line (It my change in the code) I imagine that the key (after change) will be 1a1dc91c907325c6 and tried in this form: HCRYPTPROV…
user3105142
  • 13
  • 2
  • 6
0
votes
2 answers

Openssl and Windows CryptoAPI compatibility issue

I have problem in encrypted communication between windows application and server app. Client app is running at Windows, written in C and uses CryptoAPI. Server application uses PHP and Openssl extension. As cipher algorithm AES-256-CBC was chosen.…
Cargo Tan
  • 43
  • 3
0
votes
1 answer

Check pointer handle is valid

I want to implement a Microsoft CryptographicServiceProvider library and currently I thinking about the best way how to deal with context handle which I create. My question is specific to this case but the design approach can be used in other…
0
votes
1 answer

How to extract public key from a .Net DLL in C#?

I want to extract public key, not public key token, in C# from a autenticode signed .Net DLL?
Rohit
  • 3,610
  • 7
  • 45
  • 76
0
votes
1 answer

CryptoAPI - how to extract RSA public key from private

Using windows CryptoAPI, is it possible to get public RSA key from a private key which was imported (not generated)? If I use CryptGenKey, I can call CryptExportPublicKeyInfo and CryptImportPublicKeyInfo to obtain the public key handle. However,…
Alex
  • 5,159
  • 4
  • 25
  • 33
0
votes
0 answers

Best practice way to access Windows Local Machine Certificate Store from Java?

Trying to access keys stuck in the Windows Certificate Store which are in the Local Machine store. MSCAPI is no help since that only provides access to the Current User and Root stores. Is there a known best-practice way of getting to the Local…
solatic
  • 56
  • 3
0
votes
1 answer

EMail Signing (Outlook) Using Smartcard Minidriver [Windows]

I'm developing a Smart card Minidriver and I'm trying to Sign an Email using Outlook 2007. I have implemented all of the necessary functions in the minidriver. I'm able to create a "Smartcard User" certificate and save it and it's private key on the…
Baget
  • 3,318
  • 1
  • 24
  • 44
0
votes
1 answer

How to query the root certificate?

I have a file. This file is digitally signed with our companys certificate. This certificate, has a countersignature (for example by Microsoft ). However this certificate also has a Certification Path, where on the top there is a root certificate (…
kampi
  • 2,362
  • 12
  • 52
  • 91
0
votes
1 answer

Microsoft CryptoAPI not working in web service on Windows Server 2008 R2

We have a web service that uses the Microsoft Crypto API for encryption. It works fine as a web service on Windows Server 2003. For some reason, it doesn't work as a web service on the Windows Server 2008 R2 that we're trying to move it to, although…
atariguy
  • 407
  • 4
  • 11
0
votes
1 answer

BAD_UID error while exporting key in CryptoAPI

I am writing a test application for Microsoft CryptoAPI. I want to export the secret key of one party using the public key of the second party, and then import that secret key as the second party's secret key (this sets up a shared secret key for…