Question: I'm trying to decrypt a session key in c++ using openssl EVP library. Both the session key and a public key are on a separate
I'm trying to decrypt a session key in c++ using openssl EVP library. Both the session key and a public key are on a separate files. To decrypt the session key I need to encrypt it with the public key. I'm trying to use this:
int EVP_PKEY_encrypt_init(EVP_PKEY_CTX *ctx); int EVP_PKEY_encrypt(EVP_PKEY_CTX *ctx, unsigned char *out, size_t *outlen, const unsigned char *in, size_t inlen);
However, I can't seem to get it to work. Could someone give me an example of how to use it when you're given the filenames of where both the public and session keys are?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
