[plug] encyption

Patrick Coleman blinken at gmail.com
Mon Nov 6 11:42:58 WST 2006


On 11/6/06, Alex Polglaze <apolglaze at book-keepingnetwork.com.au> wrote:
> G'day All,
>
> Here's the question.
>
> I was at a mates place on the weekend, he runs XP, I run Linux.
>
> He asked me could I encrypt a single file on my system to prevent
> unauthorised access. I wasn't sure, but I said that I would find out.
>
> But it did get me thinking.
>
> Can you do it under Linux or XP for that matter.
>
> Alternatively, can you encrypt a whole folder, (windows term) with the
> same effect.

There's a number of ways you can do this. Firstly, openssl lets you
encrypt individual files, like so:

openssl enc -bf -in file.txt -out file.txt.enc -e

Decryption:

openssl enc -bf -in file.txt.enc -out file.txt -d

Other options are on the manpage for 'enc'.

Note that it doesn't actually delete the cleartext file.txt, so you'll
need to make sure you do that. A folder can be done in the same way,
by using tar to create an archive of the folder then encrypting that.

CFS is another (slightly easier) way to do this - it allows you to
create an encrypted directory, which is probably more along the lines
of what you were thinking. It and other options were discussed in a
thread a while back - have a look at
http://www.plug.org.au/archives/message/20060313.062910.12b10862.en.html

--Patrick



More information about the plug mailing list