Why would you wanna encrypt files with RSA? You do know that you can only encrypt data that is smaller than your modulus? So you would have to split up your files in blocks and encrypt them block by block and whatnot.
The way to do it, is to create an AES key. Use that key to symmetrically encrypt your files and then use RSA to encrypt your AES key.
Now I don't know how you can import it into openssl, but really you can just do your math yourself: All you need to do is to raise your AES key to the power of your public exponent e and then reduce by your modulus.
The way to do it, is to create an AES key. Use that key to symmetrically encrypt your files and then use RSA to encrypt your AES key.
Now I don't know how you can import it into openssl, but really you can just do your math yourself: All you need to do is to raise your AES key to the power of your public exponent e and then reduce by your modulus.
Code
key^e mod N