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
9
votes
3 answers

RSA_public_decrypt and MS Crypto API equivalent

I'm trying to develop a license verification solution. Licenses are encoded on server using OpenSSL's RSA_private_encrypt function. For Mac OX X I use RSA_public_decrypt and it works like a charm. On Windows I must use very tiny bit of code, so I…
strannik
  • 1,595
  • 1
  • 13
  • 22
8
votes
2 answers

CryptoAPI: Using CryptVerifySignature to verify a signature from openssl with public key

I am trying to port the AquaticPrime framework for Mac to Windows. On the Mac, it uses the opensll library, and I try to understand how to port this to Windows, where I have to use the CryptoAPI, I guess. I mainly need the code for validation of the…
Thomas Tempelmann
  • 11,045
  • 8
  • 74
  • 149
8
votes
1 answer

Using SHA2-512 (CALG_SHA_512) on Windows 7 returns "Invalid Algorithm Specified"

I'm trying to use SHA2-512 on Windows 7 with CryptoAPI, however, calling CryptCreateHash fails with GetLastError()=2148073480=0x80090008, i.e. "Invalid Algorithm Specified". According to…
MrTux
  • 32,350
  • 30
  • 109
  • 146
8
votes
0 answers

CAPI does not support Password Based Encryption (PBE) encryption?

I am trying to port a UNIX code using OpenSSL (PKCS#5 & PKCS#7) to windows. In the case of OpenSSL, all the encoding/decoding (certificates or passwords) is done transparently to the caller in the function CMS_Encrypt, as it should be. CAPI does the…
malat
  • 12,152
  • 13
  • 89
  • 158
8
votes
3 answers

.Net: Will my RSA keys still function after August 2012?

I just read this article RSA keys under 1024 bits are blocked, and in my .NET software I make extensive use of 384bit keys. Will my program still be able to generate/store/read keys from the MachineKeyStore using the RSACryptoServiceProvider? Or…
Maestro
  • 9,046
  • 15
  • 83
  • 116
8
votes
2 answers

Accessing MS CryptoAPI with java

I was trying to make good use of the MS CAPI, and stumped into a great mischief... The SunMSCapi provider only, hmm, provides, per lack of better word, at least for signature, the following algorithms: MD2withRSA MD5withRSA SHA1withRSA And…
marcelo-ferraz
  • 3,147
  • 4
  • 38
  • 55
7
votes
2 answers

VS2010 - Structure change in CryptoAPI - v7.0A Vs v6.0A - WinCrypt.h

In C:\Program Files\Microsoft SDKs\Windows\v7.0A\Include\WinCrypt.h, the definition for CERT_CHAIN_ENGINE_CONFIG is typedef struct _CERT_CHAIN_ENGINE_CONFIG { DWORD cbSize; HCERTSTORE hRestrictedRoot; HCERTSTORE …
Raj
  • 1,113
  • 1
  • 17
  • 34
7
votes
2 answers

Translating Win32 Crypto API calls to C# with System.Security.Cryptography

I have been given an assignment to drop one of our product's dll and replace it with a pure C# one. The old DLL is a .NET 2.0 Managed C++ (C++\CLI) which wraps calls to the Win32 native Crypto API. The new DLL should expose a new object with the…
OmriSela
  • 566
  • 1
  • 6
  • 15
7
votes
3 answers

Java security - MSCAPI provider: How to use without password popup?

I've managed to use Sun's MSCAPI provider in my application. The problem I'm having now is that it always pops up a window, asking for a password, even though I've provided it in the code. This is a problem, because I need the cryptography…
Sietse
  • 7,884
  • 12
  • 51
  • 65
7
votes
1 answer

Difference between CryptGenRandom and CNG BCryptGenRandom APIs

One of our products is currently using the CryptGenRandom API for random number generation. Recently, I came across the Cryptography API: Next Generation (CNG) that provides a new API BCryptGenRandom (in bcrypt.h) for the same. As per the…
Nacharya
  • 229
  • 2
  • 8
7
votes
1 answer

How to submit for Microsoft Knowledge Base?

I've recently found a very nonobvious solution for a Microsoft CryptoAPI issue. Because of a read-only flag on the (seemingly unrelated) CREDHIST file, the whole CryptoAPI stack was wildly misbehaving, from CryptAcquireContext() upwards. For the…
Seva Alekseyev
  • 59,826
  • 25
  • 160
  • 281
6
votes
1 answer

Extracting all values of a subject attribute in a certificate

I'm currently using CertGetNameString to extract the values for each subject attribute like so: CertGetNameString(pCertificate, CERT_NAME_ATTR_TYPE, 0, szOID_ORGANIZATIONAL_UNIT_NAME, …
Andreas Magnusson
  • 7,321
  • 3
  • 31
  • 36
6
votes
2 answers

How to import private key in PEM format using WinCrypt and C++?

I'm trying to use the WinCrypt API in C++. My application need to cipher, decipher, sign and verify files, and I know how to do that once I have the correct keys. But my problem is actually that that is NOT the same application which generates those…
nikloskoda
  • 61
  • 1
  • 1
  • 2
6
votes
2 answers

How to export AES key derived using CryptoAPI

I want to use the Windows CryptoAPI functions for AES encryption. As you know, the API has a lot of functions to create, hash and change the entered key; it derives the key and you get a handle to it. My problem is that I want to know what the…
roulibic
  • 325
  • 3
  • 9
6
votes
1 answer

openssl versus windows capi

Which is better to use openssl or windows capi for ecnryption issues what is the pro and con list for both. and if it possible to write my encryptor program on openssl and decrypt it with windows capi with no problem or there are some problem with…
oren
  • 479
  • 1
  • 6
  • 10
1
2
3
42 43