To encrypt & decrypt files use these commands:
OpenSSL
To encrypt:
openssl enc -in inputfilename -out outputfilename -aes256
To decrypt:
openssl enc -in encryptedfile -out outputfilename -aes256 -d
GPG
Encrypt only using the public key of user@example.com (only that user can decrypt this file)
gpg -er user@example.com -o outputfile.enc inputfile
Encrypt and sign:
gpg -u you@example.com -ser user@example.com -o outputfile.enc inputfile
To decrypt:
gpg -do outputfilename encryptedfilesname