I’m writing a C program that encrypts(based on the private key) and decrypts(based on the public key) text. I’m trying to do this with the OpenSSL lib. Does anyone know any good tutorial, quick starting guide or sample code? I haven’t found any decent one on the web.
I’m writing a C program that encrypts(based on the private key) and decrypts(based on
Share
Here’s an example I created for encrypting a file using RSA for the asymmetric algorithm and AES-128-CBC for the symmetric algorithm, with the OpenSSL EVP functions:
And the corresponding decryption example:
I think that’s fairly easy to follow. As written both commands can be used as part of a pipeline (they take input on
stdinand write output tostdout).