The reason I want to put the public key into the header file is to simply make it easier to use the software (you can do the public key encryption of some data with only the binary file, not the binary and another file). Thus, I don't want to read a PEM file from the disk, but rather from memory.
Thank you very much for your link for EVP_Seal*. I'll have a look. On 03/29/2013 11:41 AM, Matt Caswell wrote: > On 29 March 2013 15:09, Zach <lace...@roboticresearch.com> wrote: >> I'm trying to do the following: >> 1) Put a base64-encoded key (the normal one generated by openssl command >> line tools) into a header file > Do you mean to put the actual key itself hardcoded into the header > file?? This seems like a strange thing to do. > > PEM files can be read using the various functions described here: > http://www.openssl.org/docs/crypto/pem.html > > >> 2) Compile code with this key which will public-key encrypt a message. >> > To encrypt a message you need to use the EVP_Seal* functions described here: > http://wiki.opensslfoundation.com/index.php/EVP_Asymmetric_Encryption_and_Decryption_of_an_Envelope > http://www.openssl.org/docs/crypto/EVP_SealInit.html > > > Matt > ______________________________________________________________________ > OpenSSL Project http://www.openssl.org > User Support Mailing List openssl-users@openssl.org > Automated List Manager majord...@openssl.org ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager majord...@openssl.org