At first you should install openssl - the easiest would be to use the package that ships with your distribution. (Sources can be found on www.openssl.org
To encrypt a file:
openssl enc -e -cipher -in clear file -out encrypted file
(The -e option is standard and therefor optional)
This will prompt for a password an encrypt the given file.
Without the "-in" and "-out" option openssl will read from stdin and write to stdout.
To decrypt a file:
openssl enc -d -cipher -in encrypted file -out clear file
The cipher (and mode) to be used must be specified. http://en.wikipedia.org/wiki/Block_c...s_of_operation
gives a good introduction to block ciphers and the modes of operation. The blowfish cipher in cbc mode is a good choice ( "-cipher" = "-bf-cbc" or just "-bf" as cbc is the default).
The enc command of openssl has it's own man page ("man enc" or http://www.openssl.org/docs/apps/enc.html
BTW: If security matters you should not specify the password on the commandline as it will be saved to you shell history and displayed by programs like ps.
Hope that helps