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
1 answer

c++ Import RSA private key in CAPI/CNG from xml

I read in this question about Importing a public key from native components. I tried doing the same for private key based on the BLOB documentation, but I'm getting a NTE_BAD_DATA error. Is my idea feasible? If so, Can you help? My Try: void…
Orr Goldman
  • 35
  • 1
  • 7
0
votes
2 answers

AES-128 encryption using WinCrypt

I need to encrypt strings under AES-128 for my C/C++ app making use of WinCrypt. Just for understanding how the whole thing works, I have written a program to encrypt a 16 byte string with a 16 byte AES key (128 bits) but it is not working as…
Captain Nemo
  • 262
  • 1
  • 7
  • 22
0
votes
2 answers

Calling Third Party Cryptographic service provider from Microsoft Word for Digital Signature

I'm developing a third party Cryptographic Service Provider (CSP) DLL and Want to integrate the same with Microsoft Windows. The main goal of this development is to call our cryptographic functions like Digital Signature and signature verification…
Thirumal
  • 41
  • 3
0
votes
1 answer

Unhandled exception calling CertCreateCertificateChainEngine function

I'm following this tutorial from Microsoft Example C Program: Creating a Certificate Chain But I get Unhandled exception calling CertCreateCertificateChainEngine function at the following block if(CertCreateCertificateChainEngine( …
madz
  • 1,803
  • 18
  • 45
0
votes
2 answers

How to determine hash and encryption algorithm of S/MIME message with Win32 CryptoAPI?

CryptVerifyMessageSignature and CryptDecryptMessage functions allow me to check if an S/MIME signature is valid (or decrypt encrypted data in CryptDecryptMessage case) and also return the certificate which was used for signing (or encryption).…
Alex
  • 2,469
  • 3
  • 28
  • 61
0
votes
1 answer

After adding js file with the custom module in magento,checkout page is not working

I want to add the js file along with the custom module.After adding it in layout file of my module.Payment method stop to work.Can somebody tell me what is the problem. here is the code- custom_layout.xml
Akash
  • 65
  • 1
  • 9
0
votes
1 answer

Encode UTF8String to ASN1 with CryptoAPI

I use this code to encode UTF8String in ASN1: const char *charExtensionValue = "test value тест тест with some cyrillic symbols"; CERT_NAME_VALUE myNameValue; myNameValue.dwValueType = CERT_RDN_UTF8_STRING; myNameValue.Value.cbData =…
K. Dmitry
  • 33
  • 7
0
votes
2 answers

NTLM Authentications fired from X509Chain Build function

We have recently been challenged by the network team on the failed NTLM authentications captured by AD domain controller. The requests were fired from one of Services hosted on a Windows 2008 Server which have joined the domain. The service is…
MYB
  • 1
0
votes
2 answers

Windows CryptoAPI symmetric encoding/decoding block that already aligning

I need migrating from OpenSSL to MS CryptoAPI. When I use OpenSSL, I got N-bytes (already aligned - for example, let say the data length = 32bytes) of data and encode/decode it from one buffer to another. All works fine. Now I must "use…
0
votes
1 answer

CryptDecrypt decrypts only first bytes

I am using Windows Crypto API and can't decrypt file. After CryptDecrypt I got some first bytes of my file is decrypted, but other bytes are rubbish. For…
Alexey Markov
  • 1,546
  • 2
  • 23
  • 41
0
votes
1 answer

How can I import an RSA public key from either XML or modulus/exponent in native code for use with Windows CAPI's CryptVerifySignature?

In C#, I am able to validate a hash against a public key in either of the following ways: // Import from raw modulus and exponent using (RSACryptoServiceProvider rsa = new RSACryptoServiceProvider()) { RSAParameters rsaKeyInfo = new…
g01d
  • 651
  • 5
  • 24
0
votes
1 answer

JPK - CryptoAPI RSA 256/ECB/PKCS#1 one time secret password encryption with public key from certificate (solution)

Polish government (MF - Ministry of Finance) recently implemented SAF-T (Standard Audit File-Tax / pl: JPK - Jednolity Plik Kontrolny). I had much trouble to implement one of the key parts of this solution in the right way. This part is to encrypt…
NevTon
  • 265
  • 3
  • 15
0
votes
0 answers

Trying to understand the strength of encryption offered by CryptProtectData API

Say, if I used CryptProtectData API without using the CRYPTPROTECT_LOCAL_MACHINE flag to scramble some data from the code running under an administrative Windows user account. Pretty much like it's shown here except the API will be called as…
c00000fd
  • 20,994
  • 29
  • 177
  • 400
0
votes
1 answer

Random numbers for Windows Phone 8 and Windows Store 8?

I'm struggling with a port of a couple of security libraries to the Windows Phone 8 and Windows Store 8 platform. I need a function which provides random numbers. Win32 has CryptGenRandom and even RtlGenRandom. Windows Store 10 and Universal Windows…
jww
  • 97,681
  • 90
  • 411
  • 885
0
votes
1 answer

Get access to specific ADPU functions from cryptoApi or CAPICOM using 3rd party CSP

I have tried for the last 2 months without success and I think it's time I ask here. I have a smart card and got a CSP from my client. I have documents that describe APDU commands that I can (and know how to) run. I need to save small files (data)…
KrisHary
  • 28
  • 4