Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
i have around 20 backup files tar.gz with sensitive data. The sizes of these files are from around 200MB to around 20GB
I want to secure these files so no one can read, use its contents. only me
the method of encrypting, password protecting them should be fast, so for example in case of 20GB file, it wont take more than like 10 minutes of server work to "encrypt it"
it should be able to "encrypt/decrypt" them from linux command line.
When you said encrypt/decrypt I immediately thought of GnuPG (gpg) which is often used for encrypting files. We use it for file transfers to and from other companies. I've not used it for a tar pipeline (I'm assuming you're doing something like that since you mentioned "backup" files. On searching for that I came across this link: http://linux.icydog.net/ssh/piping.php
Which shows in part:
Quote:
2. Offsite backups
This is pretty much the same as above, except you want to transfer a bunch of files and leave them as a tarball on the server rather than as a bunch of files.
You can also encrypt the tarball so that you'll have protection in case your backup server is hacked, gets stolen, or gains sentience. If you have a GPG keyring set up:
gpg is the way to go, IMO. If it's not already installed, you can get it from the repositories of most distros. You can run it from the command line, with a script, or get a GUI frontend.
I use the ccrypt command to encrypt sensitive data. You can read the data without making it readable to other people by using the ccat command which is an alias for:
I've used ccrypt for a while, and I also recommend it for single files. Just remember that programs can leak information out. Let's say you use ccat to decrypt the file and pipe it to a program, and then the program makes temporary files in /tmp. I've seen it happen.
You will also want an encrypted swap partition in case these files are put in swap unencrypted.
Last edited by metaschima; 01-09-2014 at 03:56 PM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.