Questions tagged [mscapi]

The Cryptographic Application Programming Interface (MS-CAPI) is an application programming interface included with Microsoft Windows operating systems that provides services to enable developers to secure Windows-based applications using cryptography

The Cryptographic Application Programming Interface (also known variously as CryptoAPI, Microsoft Cryptography API, MS-CAPI or simply CAPI) is an application programming interface included with Microsoft Windows operating systems that provides services to enable developers to secure Windows-based applications using cryptography.

CryptoAPI is a set of dynamically linked libraries that provides an abstraction layer which isolates programmers from the code used to encrypt the data. The Crypto API was first introduced in Windows NT 4.0 and enhanced in subsequent versions.

CryptoAPI supports both public-key and symmetric key cryptography, though persistent symmetric keys are not supported. It includes functionality for encrypting and decrypting data and for authentication using digital certificates. It also includes a cryptographically secure pseudorandom number generator function CryptGenRandom.

CryptoAPI works with a number of CSPs (Cryptographic Service Providers) installed on the machine. CSPs are the modules that do the actual work of encoding and decoding data by performing the cryptographic functions. Vendors of HSMs may supply a CSP which works with their hardware.

via: Wikipedia

78 questions
3
votes
1 answer

Java 8 open windows custom csp provider and retrieve key

I am trying to find a way to load HSM key stored in Utimaco HSM CSP from JAVA So far I got leads from search that it would be possible with SunMscApi provider, but I cant find any example where I would specify Utimaco CryptoServer CSP as provider…
Ulterior
  • 2,786
  • 3
  • 30
  • 58
3
votes
2 answers

MSCAPI Certificate selection box in Java; SunMSCAPI?

I'm experimenting with the relatively new SunMSCAPI security provider. I want to build a simple applet that prompts the browser to pop up the certificate selection box. I'll take it from there. I have Googled this up one way and down another. Any…
Stephan
  • 31
  • 2
3
votes
0 answers

C#/C++ X509Certificate2.Verify fails OCSP when IE uses authenticating proxy

I am attempting to validate a certificate using X509Certificate2.Verify() (and/or it's C++/CAPI equivalent). The issue is that when Internet Explorer's connection settings specify a proxy which requires authentication, the OCSP check will always…
g01d
  • 651
  • 5
  • 24
3
votes
0 answers

NCryptExport AES key

I don’t know if i am missing on something, I am trying to move legacy code to the Ngen, and i have to use the Key Storage Provider aka NCrypt I was doing some test to try to export an AES key, the first thing i found was that NCryptExport assuming…
Ibrahim
  • 342
  • 4
  • 14
3
votes
0 answers

Implementing CPAcquireContext in custom CSP

We want to develop custom Cryptographic Service Provider (CSP). For this we are referring following link https://msdn.microsoft.com/en-us/library/windows/desktop/aa380245%28v=vs.85%29.aspx From the documents, we understood that following…
Thirumal
  • 41
  • 3
3
votes
0 answers

OpenSSL signing and CAPI verification

I'm working with CAPICOM libary, but it is not available on Android and iOS. As far as i know, CAPICOM signed message is in PKCS#7 format, then i want to use OpenSSL to create signed message like CAPICOM did. The OpenSSL commands i used: iconv -f…
ChenHuang
  • 382
  • 2
  • 11
3
votes
0 answers

"Windows-MY" Keystore won't list all available aliases

I have a problem listing all available certificates installed in my personal (windows) keystore. I use following code to get a list of all certificate aliases: public static void main(String[] args) { try { KeyStore ks =…
The Raven
  • 527
  • 1
  • 6
  • 31
3
votes
1 answer

Testing MS-CAPI CSP, signature fails even with WinDbg kernel debugging

Trying to test a new CSP under Win 7. Set the boot config to allow kernel debug, run WndDbg and select file:kernel debug and set to local. Attempting to use signtool with my new CSP still results in signature failure check. Environment is: OS…
3
votes
0 answers

How to set CFB-128 using Microsoft CryptoAPI?

I am using MS_ENH_RSA_AES_PROV provider with PROV_RSA_AES provider type. I have selected CALG_AES_128 block cipher algorithm with CRYPT_MODE_CFB cipher mode. I would like to set KP_MODE_BITS key parameter to 128, but calling CryptSetKeyParam() by…
kakulaze
  • 31
  • 1
3
votes
1 answer

Signing a document using MS cryptoAPI with Delphi

I have tried to find some complete examples in Delphi of how to sign a piece of data using the Microsoft CryptoAPI. Online I find mostly snippets and pseudo-code, but no concrete examples of how to do this. From what I understand, having spent a day…
Jon Lennart Aasenden
  • 3,920
  • 2
  • 29
  • 44
3
votes
0 answers

Debugging Smart Card Minidriver

I'm currently working on a CNG Smart Card minidriver. To test some functionality I'd like to use makecert to import a Private Key into the Smart Card. Unfortunately for every change I make I have to copy my minidriver.dll to the system32 directory.…
dominik
  • 1,319
  • 13
  • 23
3
votes
1 answer

Tracing CSP calls within Windows Crypto API

I am working on Private Key archival with a Windows Server 2008 R2 Certificate Authority. On the client side, I am interested in knowing which Crypto API function calls are made by the windows processes when the client requests for an archival…
opeth__
  • 81
  • 1
  • 7
3
votes
1 answer

C# Generate a non self signed client CX509Certificate Request without a CA using the certenroll.dll

I have a self signed root certificate that I generated in C# using CERTENROLL.dll's CX509CertificateRequest Certificate functionality. I would like to write a function that generates client certificates signed by my root using the same API.…
Ari
  • 563
  • 2
  • 17
3
votes
1 answer

Digital Signature SunMSCAPI provider & MS Crypto API

I want to sign file with the SunMSCAPI provider. As public key and signatures needs to be imported using MS Crypto API. Generally generating signatures with SHA1withRSA, ends up with big-endian to little-endian (byte order) conversion. //generate…
Ali
  • 151
  • 3
  • 11
2
votes
3 answers

Microsoft CryptoAPI Book

I need to write my own SSL socket (CSocket ansestor) with server side certificate validation using Microsoft CryptoAPI. Can you tell me which book will help me (or any other user friendly source of information)?
Julian Popov
  • 17,401
  • 12
  • 55
  • 81