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

Is it possible to do a HMAC with wincrypt?

I've been trying to perform a straight forward SHA256 HMAC using wincrypt/cryptoapi/Cryptography API: Next Generation (CNG) and i'm really struggling. My target is Windows 8. I can not find the correct methods or find any examples anywhere. I am…
Dan H
  • 706
  • 1
  • 6
  • 15
3
votes
0 answers

ECDSA signing and verification in windows and linux

This is continuation of my previous post (Understanding BCryptSignHash output signature). Let me clearly state my problem: I need to sign a data in windows application level. I need to verify the same in linux application level and windows driver…
Fazlin
  • 2,285
  • 17
  • 29
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
2 answers

How to determine which personal certificate comes from hardware device in C#?

Assuming I have multiple personal certificates for current user. But only one certificate belongs to Aladdin eToken. I want to determine which certificate belongs to Aladdin eToken. Should I use X509Store and X509Crtificate for this? Should I try…
skfd
  • 2,528
  • 1
  • 19
  • 29
3
votes
1 answer

Encryption & HMAC using OutputStream/InputStream (stream-based encrypt-then-MAC)

I am looking for an easy way calculate an HMAC over the ciphertext in Java (encrypt-then-MAC, including the IV and algorithm parameters) using InputStream/OutputStreams. Failed attempt: I first tried inheriting from CipherOutputStream, but they do…
binwiederhier
  • 1,893
  • 1
  • 16
  • 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

Digital signature made in C# does not verify in C++

I have a C# application which digitally signs data using RSA. The code is as follows: RSACryptoServiceProvider rsa = new RSACryptoServiceProvider(); rsa.ImportCspBlob(privateKeyBlob); SHA1 sha1 = new…
Jiří Skála
  • 649
  • 9
  • 23
3
votes
1 answer

Import DER encoded public key using crypto API

Is it possible to import DER encoded public key using MS crypto API? So i can verfiy signatures ? I need a piece of code or help for MS Crypto API for importing DER encoded public-key/certificate.
Ali
  • 151
  • 3
  • 11
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
3
votes
2 answers

Decryption with AES and CryptoAPI? When you know the KEY/SALT

Okay so i have a packed a proprietary binary format. That is basically a loose packing of several different raster datasets. Anyways in the past just reading this and unpacking was an easy task. But now in the next version the raster xml data is now…
UberJumper
  • 20,245
  • 19
  • 69
  • 87
3
votes
1 answer

Error importing public key using cryptoapi CryptImportKey

I want to import public key blob to a CSP. but error occurred. BYTE pbData[]…
fr33m4n
  • 542
  • 2
  • 13
  • 31
3
votes
1 answer

How to set private key pin using CERT_CONTEXT

I need to set Private Key Pin without CSP window. I've got an CERT_CONTEXT structure and i call CryptAcquireCertificatePrivateKey with silent flag. Function fails with NTE_SILENT_CONTEXT error message. It means that pin was not specified or…
Treno1
  • 139
  • 1
  • 2
  • 9
3
votes
3 answers

cryptoapi and openssl

I'm trying to encrypt and sign a file with cryptoapi with some X.509 certificates. I want to verify and decrypt this file with openssl. On windows I think I need to use the CryptSignAndEncryptMessage function to encrypt and sign data. I used this…
David Feurle
  • 2,687
  • 22
  • 38
3
votes
1 answer

CryptExportKey: how to export private key from PKCS#12 store?

I need to export public and private RSA key from certificate, stored in PKCS#12 format, on Windows. I can open certificate store with CertOpenStore(), then find certificate with CertFindCertificateInStore() and acquire private key with…
blacklion
  • 95
  • 10
3
votes
1 answer

How to programmatically update subversion password on local machine?

I am building a small internal tool for use with the developers in my company. One of the small goals is to update multiple locations when we change our passwords. One of these locations that needs to be updated is subversion. Most of the developers…
techvice
  • 1,315
  • 1
  • 12
  • 24