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.

574 questions
6
votes
2 answers

Is it possible for one process to inject code into another without administrative privileges?

The CryptProtectMemory API in the DPAPI allows you to pass the CRYPTPROTECTMEMORY_SAME_PROCESS flag, which prevents other processes from decrypting the memory. One way around this would be to use OpenProcess, WriteProcessMemory, and…
Polynomial
  • 25,567
  • 8
  • 75
  • 106
5
votes
1 answer

OpenSSL and MS CryptoAPI: different digital signatures

I generated X509 certificate with private key using makecert utility makecert -n "CN=RootCATest" -r -sv RootCATest.pvk RootCATest.cer makecert -sk MyKeyName -iv RootCATest.pvk -n "CN=tempCert" -ic RootCATest.cer -sr currentuser -ss my -sky…
Stanislav
  • 425
  • 4
  • 14
5
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
  • 51
  • 1
  • 2
5
votes
1 answer

How to access Kucoin OHLC data from API?

I need to access kucoin Open-high-low-close data from Kucoin API. Looking in https://docs.kucoin.com/#get-trade-histories, I deduced that to access OHLC data (for instance BTC versus USDT, with hourly timestamp), the address should be something like…
daveturner
  • 190
  • 1
  • 8
5
votes
2 answers

Does Microsoft Provides a PKCS #11 provider that connects to its own MS CryptoAPI?

I'm looking to run some tests using the PKCS #11 interface and was wondering if Microsoft provided a software based implementation the provides PKCS #11 functionality? Rather then waiting for a HSM to arrive and be properly configured I'd rather get…
Scott Markwell
  • 1,096
  • 1
  • 15
  • 32
5
votes
0 answers

How to get a list of all certificates in a file?

I would like to be able to open a file and grab a list of all the certificates for that file, and list off all key information for each certificate. Currently, I have the listing of key information done correctly for the first certificate listed…
5
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
  • 315
  • 2
  • 9
5
votes
1 answer

SSL/TLS protocol version fallback mechanism

I'm using Microsoft Crypto API to handle SSL connections. When communicating with servers that support TLS 1.0 or higher everything works fine, but when I try to deal with server that support only SSL 3.0 InitializeSecurityContext() fails with error…
Mikhail Melnik
  • 966
  • 9
  • 19
5
votes
1 answer

Decrypt using a non-exportable private key with CryptoAPI

I created RSA key pair in windows key store. I encrypted data (a symmetric key) successfully: HCERTSTORE hstore = ::CertOpenSystemStore(NULL, L"TestStore"); PCCERT_CONTEXT pctxt = ::CertFindCertificateInStore(hstore, X509_ASN_ENCODING, NULL,…
TCS
  • 5,350
  • 4
  • 39
  • 75
4
votes
3 answers

Developing 64 bit applications that use MS CryptoAPI

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…
Cobaia
  • 1,395
  • 3
  • 20
  • 39
4
votes
1 answer

I'm using Wincrypt for Diffie-Hellman-- can I export the shared secret in plain text?

OK-- thanks to Mike, I was able to get Wincrypt to generate a Diffie-Hellman keypair. I figured out out to export the public key, and how to import the other party's public key. According to the docs, upon import of the other party's public key,…
Michael
4
votes
2 answers

RSACryptoServiceProvider.ExportCspBlob data format

We are exporting a public and private key. The private key is to be consumed by non .net software written in Magic. The developers have questions around the format of the exported key. Is there a whitepaper or other resource that explains the…
Jeremy
  • 40,978
  • 63
  • 191
  • 304
4
votes
2 answers

Can I get public/private key pair from a key container in smartcard?

Can I get the public/private key pair from a key container inside a smartcard using PKCS #11 or CryptoAPI?
tandaica0612
  • 341
  • 9
  • 23
4
votes
2 answers

How to work with CryptoAPI via C#?

There is a group of CryptoApi functions which works with crypto service providers…
VoimiX
  • 1,054
  • 3
  • 15
  • 28
4
votes
0 answers

Microsoft CryptoApi - Create a new certificate signed by a root authority certificate

I am trying to sign a public/private key pair by a temporary Root CA, steps followed are next: Create a self-signed root authority certificate (CertCreateSelfSignCertificate) (Done) Generate public/private key pair (CryptGenKey) (Done) Sign…
Alberto Bricio
  • 53
  • 1
  • 14
1 2
3
38 39