Hi,
this post describes the en- and decryption of a file with a asymmetric encryption algorithm.
Asymmetric encryption means you encrypt data by a public key and can only decrypt this data with a private key associated with the public key.
Continue reading OpenSSL: Asymmetric en- and decryption of a file