admin Site Admin
Joined: 28 Feb 2006 Posts: 24
|
Posted: Fri Feb 01, 2008 10:54 pm Post subject: Using OpenSSL to encrypt your files for off-site backup |
|
|
The best way to keep your data safe is to store a copy of your files off-site. That way, if your house burns down or is destroyed by a hurricane, you know that there is another copy of your data at another geographic location.
Before you ship off your sensitive documents, however, you need to think about security. Especially when using a third-party backup service, it is best not to trust the security of where you store your files.
Try one: OpenSSL
The commands below show how to use the free, open-source openssl tool to encrypt a zip or tar file containing your personal data.
Encrypt:
| Code: |
openssl des3 -salt -in backup-data.tar -out backup-data.tar.des3
enter des-ede3-cbc encryption password:
Verifying - enter des-ede3-cbc encryption password:
|
That command will encrypt the backup-data.tar file with the password you choose and output the result to backup-data.tar.des3. To unlock the encrypted file, use the following command:
Decrypt:
| Code: |
$ openssl des3 -d -salt -in backup-data.tar.des3 -out backup-data.tar
enter des-ede3-cbc encryption password:
|
Unfortunately, when I tried this on a large file (>15GB), I got the following error:
| Code: | fabbri@dot3:~> openssl des3 -salt -in backup.tar.gz -out /backup.tgz.des3
backup.tar.gz: File too large
16940:error:0200101B:system library:fopen:File too large:bss_file.c:278:fopen('backup.tar.gz','r')
16940:error:20074002:BIO routines:FILE_CTRL:system lib:bss_file.c:280:
|
Try 2: Use Gnu Privacy Guard, gpg
I was able to encrypt a large file with GnuPG:
| Code: | | gpg -c backup.tar.gz |
|
|