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
0 answers

own CryptoProvider for Windows 10

I am required to make my own realization of the crypto algorithm and make it available for Windows applications. I made a crypto provider library for working through CryptoAPI under the instruction (in the article Service Provider Cookbook), except…
Robert
  • 11
  • 3
0
votes
0 answers

Create similar signature with openssl and Windows CryptoAPI

I create detached signature with openssl as openssl smime -sign -md sha256 -in {f_in} -signer {cert} -inkey {key} -out {f_out} -outform DER Next I try to replay it with CryptoAPI using same input file and loading same certificate with private key…
vaduha
  • 351
  • 2
  • 6
0
votes
0 answers

I don't fully understand this implementation despite seeing documentation (subtle crypto)

What do each individual letters(e and n respectively) represent and what is the code afterward (RSAPSS forward)? I have a general idea - but I would appreciate a more thorough break down of the problem. Thank you for your…
0
votes
1 answer

How to calculate Subject Key Identifier in CNG?

My goal is to populate the Subject Key Identifier Extension (2.5.29.14) for a certificate using Microsoft CNG. I did it previously with Microsoft CAPI but the function I…
Timothy John Laird
  • 1,101
  • 2
  • 13
  • 24
0
votes
1 answer

CryptBinaryToStringA not encoding in B64

My goal is to use CryptoAPI to take some bytes of a signed and encoded certificate made in CryptoAPI and convert them to B64. Problem is, the certificate header is being tacked on but the output is not B64! My output: -----BEGIN…
Timothy John Laird
  • 1,101
  • 2
  • 13
  • 24
0
votes
1 answer

CertGetCertificateChain - Invalid memory access

Cross-posting for visibility: https://groups.google.com/forum/#!topic/jna-users/qfkoxPwA-r8 I am working on creating a wrapper for the CertGetCertificateChain method in the Crypt32 lib and I would like to get help in resolving an 'Invalid Memory…
nahzor
  • 460
  • 1
  • 4
  • 20
0
votes
1 answer

Porting Microsoft CryptoAPI to Mac OS

I have a windows application (Visual Studio is used) that uses Microsoft CryptoAPI. Now it is required to develop a Mac OS X application, that is capable to read data, encrypted by the WinApp, and encrypt data on Mac OS X, that will be decrypted by…
VitalyVal
  • 1,320
  • 12
  • 13
0
votes
1 answer

C++ access trusted root certificates

I have created a public/private key pair with openSSL and converted it into a *.pfx file with openSSL. I then imported this file into the Windows Trusted Certificate Store. I now would like to access the private key from this certificate via c++…
user3079834
  • 2,009
  • 2
  • 31
  • 63
0
votes
1 answer

JSON returning multidimensional arrays from cryptcompare api

I have been trying to figure out how to get data from JSON from cryptocompare api to google spreadsheet.Here it's my code: function gather(symbol, array) { for (i in array.AggregatedData) { return array[i]; } return 0; } function chc(symbol, key,…
0
votes
1 answer

BCryptImportKeyPair returns STATUS_INVALID_PARAMETER when i try to import public key

I followed this example. I am trying to add the public key which i got from the server into the key Pair and I am getting STATUS_INVALID_PARAMETER. BCRYPT_DH_KEY_BLOB header; header.dwMagic = BCRYPT_DH_PUBLIC_MAGIC; header.cbKey =…
Prakash N
  • 1,020
  • 1
  • 8
  • 20
0
votes
1 answer

CryptoAPI: difference Between CALG_* and BCRYPT_*_ALGORITHM

What is the difference between CALG_* and BCRYPT_*_ALGORITHM for example: SHA_256 is defined both as: #define CALG_SHA_256 (ALG_CLASS_HASH|ALG_TYPE_ANY|ALG_SID_SHA_256) and #define BCRYPT_SHA256_ALGORITHM L"SHA256"
Wheatley
  • 153
  • 1
  • 12
0
votes
0 answers

Is there any vb6 library that uses hkdf and sha-512

I am encrypting my data using AES-128 CBC. However it is decrypted by another software CodeIgnitor, which actually converts password into 2 elements. HMAC key and encryption_key using hkdf and SHA-512 digest. How can i implement this thing in my…
Samra
  • 1,815
  • 4
  • 35
  • 71
0
votes
1 answer

CryptoAPI RSA Schannel Provider error

I am trying to generate digital signature using "Microsoft RSA SChannel Cryptographic Provider". After acquiring the handle to container, I am generating a signature using CryptGenKey(). But this function returns FALSE. The dwError for…
usererror
  • 33
  • 4
0
votes
1 answer

rsa encryption in windows crypto and decryption in openssl

I have a problem in exchanging public key between "OpenSSL" and "Windows CryptoAPI". The public key is exported from OpenSSL in pem format.My program is written in c++. I get the public key and load it by "CryptoAPI". After loading the public key, I…
Mehdi MehdiR
  • 11
  • 1
  • 1
  • 4
0
votes
0 answers

CryptVerifyTimeStampSignature returning CRYPT_E_ASN1_BADTAG

I am trying to verify the timestamp of a signature with the CryptVerifyTimeStampSignature Windows Crypto API function. I am stuggling to understand what exactly should be passed into the pbTSContentInfo parameter. BOOL…
Jem Tucker
  • 1,143
  • 16
  • 35