You can encrpt files using a private/public keys.
First, create the keys:
openssl req -x509 -nodes -days 100000 -newkey rsa:2048 \
-keyout private.pem -out public.pem -subj /
Encrypt the important.file
with:
openssl smime -encrypt -aes256 -in important.file -binary \
-outform DEM -out file.secure public.pem
And decrypt it with
openssl smime -decrypt -in file.secure -binary -inform DEM \
-inkey private.pem -out important.file