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

OpenSSL: print X and Y of EC_POINT

This is my code: EC_KEY *eckey = EC_KEY_new(); EC_KEY_generate_key(eckey); const EC_POINT *pub = EC_KEY_get0_public_key(eckey); printf("%s", pub->X); I'm getting an error that says "Incomplete definition of type 'struct ec_point_st'". I also…
Tech163
  • 4,176
  • 8
  • 33
  • 36
6
votes
1 answer

Get the X509 data from a PFX certificate using CryptoAPI

Good day. Stackoverflow has helped me many times before, but I am a bit stuck on this one and hope that someone can give me some pointers. Background: I need to pass X509 data of a certificate to Adobe's SDK CertListCab in order to sign the PDF…
Magda
  • 201
  • 3
  • 10
6
votes
1 answer

Need help to find certificate by Subject name (X500 format, CERT_X500_NAME_STR) using CertFindCertificateInStore()?

A client application has to access certificate from Windows certificate store. The search input is the subject name in X500 string format as below. "C=CH, S=Aargau, L=Baden, O=Test, OU=FF, CN= Test Root" An exact match is required (not substring…
Kunjan
  • 354
  • 3
  • 9
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
  • 27,674
  • 12
  • 80
  • 107
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
  • 1
  • 5
  • 14
5
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
  • 402
  • 1
  • 6
  • 22
5
votes
1 answer

How can I get transaction fee through Coinbase API?

How to get a transaction fee before sending transaction through coinbase API? Or how to set a transaction fee for a transaction through coinbase API?
artamonovdev
  • 2,260
  • 1
  • 29
  • 33
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,091
  • 2
  • 16
  • 33
5
votes
1 answer

Why do I lose my key container when I reboot?

For many years we have kept our strong name key in a key container. Visual Studio doesn't directly support that but, it works fine if you just edit the .csproj file and add: MyKeyName We install the key into the…
John Vottero
  • 845
  • 1
  • 7
  • 24
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
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,790
  • 5
  • 54
  • 86
5
votes
2 answers

Steps to include timestamp in PDF signature

Good day, I'm trying to embedded timestamp information into a pdf signature so that adobe will report to me that the signature was timestamp. Currently, all I've achieved is that Adobe reports that "The signature includes an embedded timestamp but…
Magda
  • 201
  • 3
  • 10
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,503
  • 3
  • 22
  • 41
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
1 2
3
42 43