Relative Content

Tag Archive for c++encryptionopenssl

OpenSSL EVP_EncryptInit fail, while called in destructor

Recently i tried to improve my crash handler, and write logs about when objects are being destroyed. I use singleton pattern for each global object, and have function which initialize them in correct order (crash handler is last one)

EVP_DecryptFinal_ex:bad decrypt Error in OpenSSL Decryption

I’m working on a C program that uses the OpenSSL library to perform several cryptographic operations. However, I’m encountering an issue when attempting to decrypt a file using AES-128-ECB. The decryption process fails with the error EVP_DecryptFinal_ex:bad decrypt.

AES-RSA public/private encryption using C#

I have a project in which I need to send an encrypted payload to FastSpring. There process is as follows:
Create a 2048 RSA public/private certificate pair and upload the public cert to FastSpring
Randomly generated 16-byte AES key
Encrypt the payload using the AES key
Encrypt the AES key using your private cert
Send the encrypted payload and AES key to FastSpring
FastSpring receives the payload and AES key.
Since the AES key was encrypted using my private certificate file, FastSpring will decrypt it using my public certificate file that was uploaded.
FastSpring can now decrypt the encrypted payload using the AES key