Author |
Message |
jamesbond
Joined: 26 Feb 2007 Posts: 3146 Location: The Blue Marble
|
Posted: Mon 31 May 2010, 00:26 Post subject:
EncFS - Encrypted Folders for Puppy |
|
EncFS (wikipedia http://en.wikipedia.org/wiki/EncFS) is a user-space encrypted file system driver, developed by Valient Gough. Initially introduced in 2005, it went on active development until late 2008 - until which it seems to stop for a while. Recently Valient has restarted development and responded to bug reports. Homepage: http://www.arg0.net/encfs and also http://code.google.com/p/encfs.
It enables one to encrypt/decrypt at directory/folder level, instead of filesystem level (cf. cryptoloop, dm-crypt) or file level (cf. bcrypt). It uses FUSE and stores the encypted content on other filesystem - I have tested it on ext3 inside aufs (ie, Puppy's /root folder).
Inspired in a discussion with 01smokey here http://murga-linux.com/puppy/viewtopic.php?p=422965#422965, I have built this package and its dependencies for Quirky 1.x, and have created a few scripts to integrate with Rox. All you have to do is right-click any folder in Rox, and then choose whether to add encryption, remove encryption, or open access/close access for this encrypted folder. Each encrypted folder has its own password.
Package
All compiled under Quirky 1.1. Tested to work under Puppeee as well.
1. EncFS 1.5-2 proper
2. rlog 1.4
3. fuse 2.7.4 (only the libraries)
4. boost c++ libraries (note - I only build a subset which is required by encfs - the "filesystem and serialization" libraries).
5. rox-encfs 0.4 - my scripts to integrate EncFS with Rox.
Fatdog64 users can get it from the ibiblio repository - only encfs, rlog and rox-encfs required since Fatdog64 already comes with fuse and boost.
Sources
1. EncFS version 1.5-2 http://encfs.googlecode.com/files/encfs-1.5-2.tgz
2. rlog logging library (also by valient) version 1.4 (dependency of EncFS) - from here http://code.google.com/p/rlog/
3. Boost C++ library version 1.41 (newer versions of Boost have problems with EncFS - this is the last version known to work well) http://sourceforge.net/projects/boost/files/boost/1.41.0/
4. Fuse version 2.7.4 - I use this one instead of the latest because I think Quirky is build with this version http://bkhome.org/sources/alphabetical/f/fuse-2.7.4.tar.bz2
Others
If you prefer a centralised control over your encrypted directories, you may want to look at Master Wong's work here http://murga-linux.com/puppy/viewtopic.php?t=43131 which is also based on EncFS. Note that it was based on an older version of EncFS.
Usage Notes
1. Do not delete the folder when it is open for access. Unpredictable things will happen.
2. Encrypted files will be stored in a hidden encrypted storage directory, with the same name of the original directory, prefixed with a dot. (e.g if the original name is "icons", the storage directory is ".icons" - see the screenshots below). Do not delete this folder, and especially do not delete this folder while the folder is open for access.
EDIT: Update rox-encfs to 0.4 which will refresh rox automatically.
_________________ Fatdog64, Slacko and Puppeee user. Puppy user since 2.13.
Contributed Fatdog64 packages thread.
Last edited by jamesbond on Mon 31 May 2010, 09:49; edited 5 times in total
|
Back to top
|
|
 |
jamesbond
Joined: 26 Feb 2007 Posts: 3146 Location: The Blue Marble
|
Posted: Mon 31 May 2010, 00:27 Post subject:
|
|
The package. All are straight built - there is no effort spent to make it smaller as per puppy's tradition, others are welcome to do so.
EDIT: tested on puppeee (RC1) also - works well. Puppeee users don't need libfuse - it's already part of the included with Puppeee.
EDIT: update rox-encfs to 0.4
Description |
This is the rox-integration script which will give you the nice menu when you right-click a folder in Puppy.
|

Download |
Filename |
rox-encfs-0.4.pet |
Filesize |
7.74 KB |
Downloaded |
1287 Time(s) |
Description |
encfs dependency - this pet contains the libfuse. Puppeee users don't need this.
|

Download |
Filename |
fuse-2.7.4-i486.pet |
Filesize |
54.54 KB |
Downloaded |
1178 Time(s) |
_________________ Fatdog64, Slacko and Puppeee user. Puppy user since 2.13.
Contributed Fatdog64 packages thread.
Last edited by jamesbond on Mon 31 May 2010, 21:06; edited 6 times in total
|
Back to top
|
|
 |
jamesbond
Joined: 26 Feb 2007 Posts: 3146 Location: The Blue Marble
|
Posted: Mon 31 May 2010, 00:42 Post subject:
|
|
Screenshots.
Description |
how the storage folder (which stores the actual encrypted files) looks like |
Filesize |
40.1 KB |
Viewed |
6268 Time(s) |

|
Description |
how a closed (ie unmounted) encrypted folder looks like |
Filesize |
18.36 KB |
Viewed |
6516 Time(s) |

|
Description |
right-click menu for an opened (ie mounted) encrypted folders |
Filesize |
24.49 KB |
Viewed |
6381 Time(s) |

|
Description |
simple option for encryption strength |
Filesize |
20.68 KB |
Viewed |
6446 Time(s) |

|
Description |
right-click encryption menu for folders |
Filesize |
26.04 KB |
Viewed |
6444 Time(s) |

|
_________________ Fatdog64, Slacko and Puppeee user. Puppy user since 2.13.
Contributed Fatdog64 packages thread.
|
Back to top
|
|
 |
smokey01

Joined: 30 Dec 2006 Posts: 2682 Location: South Australia
|
Posted: Mon 31 May 2010, 07:03 Post subject:
|
|
I have done some testing with Lupu-501 and it seems to work very well but I do have a question or two, maybe more.
It appears there are five commands in your ROX script, they are:
Add Encryption
Change Password
Open Encrypted Folder
Remove Encryption
Close Encrypted Folder
I noticed that not all five are visible at the same time. Generally it seems either Open Encrypted Folder or Close Encrypted Folder are available but not both.
When I encrypt the folder it's contents are still visible until I close the folder. When I close the folder everthing is now secure. To get access to the folder I expected to be able to simply right click on the folder and select Open Encrypted Folder, type in the password and the folder would be visible again. This is not the case. I have to remove the encryption to see the contents of the folder.
I thought it would be possible to Open Encrypted Folder, work with files then close it when you are finished working. The entire time the folder is encrypted but open until it's closed and secure.
If you no longer needed to have the folder encrypted then simply Remove Encryption and it would revert to being a normal folder.
Are my assumptions correct? or am I expecting something that doesn't exist? or am I doing something wrong?
This is a very useful application.
Thanks for you work on it.
_________________ Software <-> Distros <-> Tips <-> Newsletters
|
Back to top
|
|
 |
jamesbond
Joined: 26 Feb 2007 Posts: 3146 Location: The Blue Marble
|
Posted: Mon 31 May 2010, 08:28 Post subject:
|
|
smokey01 wrote: | I have done some testing with Lupu-501 and it seems to work very well but I do have a question or two, maybe more.
| Sounds good ! Happy to hear that.
Quote: |
It appears there are five commands in your ROX script, they are:
Add Encryption
Change Password
Open Encrypted Folder
Remove Encryption
Close Encrypted Folder
| Correct.
Quote: |
I noticed that not all five are visible at the same time.
| Correct. I tried to make it as context-sensitive as I can - but ROX only has two options, menu to show when you click a folder (normal and closed encrypted folders), and menu to show when you show a mount-point (encypted folders being open for access).
Quote: |
Generally it seems either Open Encrypted Folder or Close Encrypted Folder are available but not both.
| Correct.
Quote: |
When I encrypt the folder it's contents are still visible until I close the folder. When I close the folder everthing is now secure.
| Correct - this is done on purpose. After you encrypt a folder, it's state is "open for access", so that you can continue to use the files inside.
Quote: |
To get access to the folder I expected to be able to simply right click on the folder and select Open Encrypted Folder, type in the password and the folder would be visible again.
| Correct - this is how it should work. You can open and close as many times as needed.
Quote: |
This is not the case. I have to remove the encryption to see the contents of the folder.
| That's odd ... any error message? Try this (starting on a normal folder) - "add encryption", refresh rox, "close access", refresh rox, "open access" - do you see your files?
Quote: |
I thought it would be possible to Open Encrypted Folder, work with files then close it when you are finished working. The entire time the folder is encrypted but open until it's closed and secure. If you no longer needed to have the folder encrypted then simply Remove Encryption and it would revert to being a normal folder.
| Correct - that's the whole idea.
Quote: |
Are my assumptions correct? or am I expecting something that doesn't exist? or am I doing something wrong?
| You are correct in everypoint. The fact that you have to "remove encryption" to see the content bothers me - something is wrong.
Ah yes, after you do anything (ie encrypt/decrypt/open/close), you have to "refresh" Rox by clicking the refresh button. It wouldn't hurt if you don't, Rox will still work, but you won't get the correct context menu. An open-for-access folder will show a green dot on the folder icon (=shows that it's actually a mount-point).
EDIT: Please update to version 0.4 of rox-encfs which fix this refresh problem.
Quote: |
This is a very useful application.
Thanks for you work on it. | You are welcome!
_________________ Fatdog64, Slacko and Puppeee user. Puppy user since 2.13.
Contributed Fatdog64 packages thread.
|
Back to top
|
|
 |
smokey01

Joined: 30 Dec 2006 Posts: 2682 Location: South Australia
|
Posted: Mon 31 May 2010, 17:44 Post subject:
|
|
It now works absolutely perfect and as expected.
I just tried it on LHP-443 full install, no problems.
This should be part of the standard puppy build as it is very useful and adds to the security that many complain about. Size is probably the only issue but not for me.
I will put it up on my site if you don't mind.
Thanks
_________________ Software <-> Distros <-> Tips <-> Newsletters
|
Back to top
|
|
 |
jamesbond
Joined: 26 Feb 2007 Posts: 3146 Location: The Blue Marble
|
Posted: Mon 31 May 2010, 22:01 Post subject:
|
|
Sure, go ahead!
_________________ Fatdog64, Slacko and Puppeee user. Puppy user since 2.13.
Contributed Fatdog64 packages thread.
|
Back to top
|
|
 |
smokey01

Joined: 30 Dec 2006 Posts: 2682 Location: South Australia
|
Posted: Tue 01 Jun 2010, 08:48 Post subject:
|
|
I stripped it down by about 420k by removing source and locals.
I also combined the five Pets into one for simplicity. It can be downloaded from here.
http://www.smokey01.com/pets/FolderEnc-1.0.pet
It would be nice if it would accept the enter key after typing the password instead of having to use the mouse. Clicking on OK is good but the enter key is more intuitive.
_________________ Software <-> Distros <-> Tips <-> Newsletters
|
Back to top
|
|
 |
jamesbond
Joined: 26 Feb 2007 Posts: 3146 Location: The Blue Marble
|
Posted: Wed 02 Jun 2010, 05:49 Post subject:
|
|
smokey01 wrote: | It would be nice if it would accept the enter key after typing the password instead of having to use the mouse. Clicking on OK is good but the enter key is more intuitive. |
It's irritating, I know. I tried to find a way around that as well. But there's no way to tell Xdialog to behave like that. The other option is to use gtkdialog - but that sounds like an overkill to me.
cheers!
_________________ Fatdog64, Slacko and Puppeee user. Puppy user since 2.13.
Contributed Fatdog64 packages thread.
|
Back to top
|
|
 |
smokey01

Joined: 30 Dec 2006 Posts: 2682 Location: South Australia
|
Posted: Wed 02 Jun 2010, 06:50 Post subject:
|
|
Is this an option?
--editbox filepath height width
The edit-box dialog displays a copy of the file. You may edit it
using the backspace, delete and cursor keys to correct typing er-
rors. It also recognizes pageup/pagedown. Unlike the --
inputbox, you must tab to the "OK" or "Cancel" buttons to close
the dialog. Pressing the "Enter" key within the box will split
the corresponding line.
On exit, the contents of the edit window are written to dialog's
output.
Or is this only for dialog and not Xdialog?
http://hpux.connect.org.uk/hppd/hpux/Shells/dialog-1.1/man.html
_________________ Software <-> Distros <-> Tips <-> Newsletters
|
Back to top
|
|
 |
jamesbond
Joined: 26 Feb 2007 Posts: 3146 Location: The Blue Marble
|
Posted: Wed 02 Jun 2010, 09:36 Post subject:
|
|
I'm using this:
Code: | Xdialog --password --inputbox "some text" 0 0 | .
The equivalent code in dialog would be
Code: | dialog --passwordbox "some text" 0 0 | - but I don't use dialog, dialog is for text/console input.
I don't know the equivalent gtkdialog code yet ...haven't done any reading yet, too lazy
The --editbox option (which works in both Xdialog and dialog) is to edit an entire file. I don't keep any password file - the password is fed straight to encfs, which will keep it securely as part of is directory encryption mechanism. So, --editbox option cannot be used.
cheers!
_________________ Fatdog64, Slacko and Puppeee user. Puppy user since 2.13.
Contributed Fatdog64 packages thread.
|
Back to top
|
|
 |
smokey01

Joined: 30 Dec 2006 Posts: 2682 Location: South Australia
|
Posted: Wed 02 Jun 2010, 17:07 Post subject:
|
|
Yes I noticed that after I posted. I was a little tired last night.
This is how Will made it work in Psip:
#!/bin/sh
CHAT=$(cat $PJTMP/chat.tmp) #should strip out newlines if we ever get to multiline posts
echo -e "\ni\n${1}\n${CHAT}\n" >> $PJSIGNAL
BUDDY_NAME="$(echo $1 | sed 's/sip://;s/@.*//')"
echo -e "$(date +%y/%m/%d-%T) [you->$BUDDY_NAME] ${CHAT}" >> $HOME/.psip/PSIP_chatlog
Now I have to be honest I don't fully understand it.
During my searching I noticed craftybytes was also trying to find a solution to the same problem.
He mention something about sed and I see it's used here.
I guess it's not bigggie but it would be good to solve. I might have a talk to some of the coding gurus in the forum.
_________________ Software <-> Distros <-> Tips <-> Newsletters
|
Back to top
|
|
 |
jamesbond
Joined: 26 Feb 2007 Posts: 3146 Location: The Blue Marble
|
Posted: Thu 03 Jun 2010, 08:47 Post subject:
|
|
Ok, I'm been doing some reading (from here http://xpt.sourceforge.net/techdocs/language/gtkdialog/gtkde02-GtkdialogExamples/single/)
The replacement code for Xdialog --password --inputbox above is this:
Code: | #! /bin/bash
export DIALOG='
<window title="Enter password" icon-name="gtk-dialog-question">
<vbox>
<hbox>
<text>
<label>Label:</label>
</text>
<entry activates-default="true">
<variable>PASS0</variable>
<visible>password</visible>
</entry>
</hbox>
<hbox>
<button cancel></button>
<button can-default="true" has-default="true" use-stock="true">
<label>gtk-ok</label>
</button>
</hbox>
</vbox>
</window>
'
eval $(gtkdialog --program=DIALOG)
echo "$PASS0"
|
You can cut and paste the above code, put into a text file, make it executable (from rox, choose file/properties, and then click the topmost of "exec" checkbox. Run that in a terminal, the result is the password.
It's this monstrosity compared to the one line of Xdialog - now you see why I say it's an overkill Unless I'm very motivated I'd probably leave it as is
cheers!
_________________ Fatdog64, Slacko and Puppeee user. Puppy user since 2.13.
Contributed Fatdog64 packages thread.
|
Back to top
|
|
 |
TwoPuppies

Joined: 29 Dec 2010 Posts: 61 Location: Melbourne, Australia
|
Posted: Sat 26 Feb 2011, 02:05 Post subject:
|
|
I've used this application in both Quirky and Lupu, and it is really excellent. But it's really a shame that it does not work in Puppy 4.2 (my favourite Puppy OS). Is there any way that it can be modified so that it will?
_________________ What you really need is two puppies:
Puppy Linux, and the sort with four legs and a tail.
|
Back to top
|
|
 |
trapster

Joined: 28 Nov 2005 Posts: 2106 Location: Maine, USA
|
Posted: Sat 26 Feb 2011, 11:16 Post subject:
|
|
Is bcrypt in 4.2?
My simple directory encryption that I put in my right-click menu:
Code: | #!/bin/sh
DIR="$@"
yaf-splash -text "Directory is being archived" &
tar -zcf $DIR.tar.gz $DIR
killall yaf-splash
yaf-splash -text "File is being encrypted" &
bcrypt_gui $DIR.tar.gz
killall yaf-splash
yaf-splash -text "Encryption complete" &
sleep 5
killall yaf-splash |
_________________ trapster
Maine, USA
Asus eeepc 1005HA PU1X-BK
Frugal install: Slacko
Currently using full install: DebianDog
|
Back to top
|
|
 |
|