Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

What would be the most practical way to protect (from reading, or better to say, understanding the contents) a text file in a way that can be done from the command line?

It is a normal text file containing notes, but which will pass, let's say, through an unlimited number of hands, but needs to be accessible to only a few.
It is actually a bit more complicated, but this is the gist of it.

The only solution I thought of so far would be to password protect it in an archive, but how safe is that? And it's not all that practical to do from cmd. I'm still keeping it as an option in reserve ...

All other suggestions welcomed!

share|improve this question
add comment

4 Answers

You're better off using something like TrueCrypt (Cross Platform and Free) to make a secure encrypted container. This container can be of any size and passed on to other people. The TrueCrypt program will mount this container as a Local Disk drive and in it can contain your text file. Give the password used to encrypt the container to anyone who is authorized to view/edit the file.

http://www.truecrypt.org/

Command Line Usage

http://www.truecrypt.org/docs/?s=command-line-usage

share|improve this answer
3  
TrueCrypt is just one way of password protecting, which you claim is useless. Please correct your answer. –  Rotsor Jan 6 '12 at 5:03
    
From Wikipedia: "Zip supports a ... encryption system which is ... known to be seriously flawed". Using a seriously flawed algorithm is never a good idea. You can use rar or any other archive format which uses a not-yet-known-to-be-seriously-flawed encryption algorithm. Again, TrueCrypt is just one of many options for password protecting your files. –  Rotsor Jan 6 '12 at 13:09
add comment

Just use an encrypted notepad replacement such as locknote - its portable so you're sharing one file still, and you can pass the password to the person who is running the system. You'd need to find some way of exchanging the password, of course, but its secure, simple and would work across systems.

share|improve this answer
add comment

You should simply use an encryption program that is open source, proven and widely accepted by the security community. One example is PGP.

If you do it properly and don't do something silly you should not have to worry about being hacked.

share|improve this answer
    
+1 I have never worked with PGP. Do you know of a command like program, that has a relatively simple interface for doing things like this? –  ldigas Jan 6 '12 at 13:11
    
@Idigas: GPG is a command-line PGP implementation. –  josh3736 Jan 6 '12 at 15:18
add comment

Trucrypt creates an encrypted volume. Axcrypt is used to encrypt a single file or folder.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.