If you need to encrypt a file which contains personal data, you can use ccrypt. It's not installed by default on ubuntu so you'll have to do a:
sudo apt-get install ccrypt
but once done you can encrypt your file using
ccrypt -e filename
and decrypt using
ccrypt -d filename