You are here

A possible encryption solution

26 posts / 0 new
Last post
lazyart
Offline
Last seen: 18 years 2 months ago
Joined: 2006-08-13 11:53
A possible encryption solution

Hi all,

I'm new here... just got wind of all the portable possiblities and really liking it. I've placed a bunch of apps and such on a 40gig portable drive, one of which is Thunderbird Portable. Being concerned with security since I routinely leave passwords and account info in my inbox, I looked for encryption options. I really like Cryptainer and other options that mount as a drive but found that it required admin rights, which can obviously be an issue.

I'm offering up a free solution that can be modified to suit your own needs. I used PStart because of it's ability to launch programs on start and exit. In addtion I use EncryptOnClick because it has a command line interface. You can find it here: http://www.2brightsparks.com/freeware/freeware-hub.html

Thunderbird is installed in the PTB folder on the root of my portable drive, and EncryptOnClick in the EOC folder of root. A third folder, BATCH resides to hold the batchfiles used to semi-automate things.

Now I originally had encrypted the entire Tbird folder but this was unnecessarily lengthy as only the Data folder is critical.

Here is a copy of Thunderbird.bat, which launches the mail client. It first checks to see if there is an encrypted file in the Data/Profile folder and if there is, calls EncryptOnClick to do it's thing. Otherwise it falls through to just launch the app.

----------------
@echo off
%1
if EXIST Errors.txt del Errors.txt

if NOT EXIST \PTB\data\profile\*.eoc GOTO Tbird

:Decrypt
\EOC\EncryptOnClick.exe -u -d %1\PTB\Data\

DIR "Errors.txt" | FIND /I " 0 Errors.txt"
if errorlevel 1 GOTO Error

:Tbird
start %1\PTB\ThunderbirdPortable.exe
GOTO End

:Error
start notepad.exe "Errors.txt"

:End
------------------

When using this from PStart, be sure to pass the parameter %pdrive% or the routine will fail. If an error is detected in decryption, notepad will report it to you.

A second batch file called "encryptif.bat" does just that. It looks in the Data/Profile folder to see if there are any encrypted files. If so it exits. If there are none, it calls EncryptOnClick to lock things up. Again, pass the %pdrive% parameter from PStart:

---------------
@echo off
%1
if EXIST Errors.txt del Errors.txt

if EXIST \PTB\data\profile\*.eoc GOTO End

:Encrypt
\EOC\EncryptOnClick.exe -u -e %1\PTB\Data\

DIR "Errors.txt" | FIND /I " 0 Errors.txt"
if errorlevel 1 start notepad.exe "errors.txt"

:End
---------------------

Again, if there are errors, notepad will tell you. I don't actually call this batch file but I do place it in PStart with instructions to launch on exit. When PStart is shut down this batch file runs and encrypts if it's necessary.

It wouldn't take much to adapt this to encrypt other folders, but it would be time consuming to do the entire drive this way on every insert and remove. When I'm not using my drive for email I don't have to wait for the encryption/decryption process to take place.

Hope this help those looking for a way to keep things safe. If there are other encryption tools that have a command line interface I'm sure it wouldnt take much to make them work. EOC was just the first (only) free one I found.

asmith3006
Offline
Last seen: 17 years 9 months ago
Joined: 2006-04-04 03:09
Sounds good

Sounds perfect to me. Couple of questions though,
how good is the encryption?
how much free space do you need on the stick?
how does it remove the unencrypted data?

Good find though... just need to find some more details.

Andrew.

lazyart
Offline
Last seen: 18 years 2 months ago
Joined: 2006-08-13 11:53
256 bit AES

...that's about all I know. Sad

Bruce Pascoe
Offline
Last seen: 12 years 11 months ago
Joined: 2006-01-15 16:14
...

256-bit AES is damned strong encryption. Of course, you still need a strong password to get the most out of it, but I think that goes without saying. Smile

-
< ExplosivePrincess 1.5 Atomic Bomb Edition >
warning: keep explosiveprincess away from children

asmith3006
Offline
Last seen: 17 years 9 months ago
Joined: 2006-04-04 03:09
Just tried it. I like it. I

Just tried it. I like it. I like the fact it converts files one at a time rather than making one huge archive, very neat.

I made the mistake of running it on a USB one connector. Oops!

Ryan McCue
Ryan McCue's picture
Offline
Last seen: 15 years 2 months ago
Joined: 2006-01-06 21:27
Damn

Wish it was open source...
Their site looks like Microsoft's iPod box, hey Bruce Wink
----
R McCue
PortaBlog Home and My Website
And before anyone complains about the grammar, I'm so jetlagged that my
hands aren't even in the same time zone...

"If you're not part of the solution, you're part of the precipitate."

Bruce Pascoe
Offline
Last seen: 12 years 11 months ago
Joined: 2006-01-15 16:14
...

Yeah, it does, doesn't it? :lol:

-
< ExplosivePrincess 1.5 Atomic Bomb Edition >
warning: keep explosiveprincess away from children

Ryan McCue
Ryan McCue's picture
Offline
Last seen: 15 years 2 months ago
Joined: 2006-01-06 21:27
Hmm

I wonder if they have seen that Wink
----
R McCue
PortaBlog Home and My Website
And before anyone complains about the grammar, I'm so jetlagged that my
hands aren't even in the same time zone...

"If you're not part of the solution, you're part of the precipitate."

poussin
Offline
Last seen: 18 years 3 months ago
Joined: 2006-08-15 04:37
I use freeotfe which is free

I use freeotfe which is free ,and open source

FreeOTFE has a portable mode Smile

http://www.freeotfe.org/

Ryan McCue
Ryan McCue's picture
Offline
Last seen: 15 years 2 months ago
Joined: 2006-01-06 21:27
Hmm

Looks pretty powerful.
I'm getting it now.
----
R McCue
PortaBlog Home and My Website
And before anyone complains about the grammar, I'm so jetlagged that my
hands aren't even in the same time zone...

"If you're not part of the solution, you're part of the precipitate."

poussin
Offline
Last seen: 18 years 3 months ago
Joined: 2006-08-15 04:37
Some infos about FreeOTFE

it support command line

if using with pstart you will need to use 3 batch :

one for putting it in Portable mode
FreeOTFE.exe /portable start

one for mounting automatically the volume (Need full path can use %pdrive%)
FreeOTFE.exe /mount /volume /freeotfe

one for dismounting the volume and shutting portable mode
FreeOTFE.exe /dismount all
FreeOTFE.exe /portable stop

or you can use only one (intercative mode)
FreeOTFE.exe /portable start
freeotfe.exe

cheers

Ryan McCue
Ryan McCue's picture
Offline
Last seen: 15 years 2 months ago
Joined: 2006-01-06 21:27
Damn

Looky here:

Q: Why do I need Administrator rights to install FreeOTFE?

A: This is probably the most common FAQ wrt OTFE systems.

In order for most (if not all) OTFE systems to operate, they require the use of
"kernel mode drivers" to carry out drive emulation.

A "kernel mode driver" is special piece of software which operates at a very
low-level within your computer's operating system. As such, it can do pretty much
anything to your system - including carrying out privileged actions that normal
users are not allowed to do (e.g. formatting your HDD). Because of this, MS
Windows only allows users with Administrator rights to install such drivers.

NOTE: Administrator rights are not required in order to use FreeOTFE once
installed.

Q: Why do I need Administrator rights to start "portable mode"?

A: Administrator rights are required to start "portable mode" starting portable
mode implicitly registeres the FreeOTFE drivers on the computer it's running on.
When portable mode is stopped, they are unregistered.

Administrator rights are required for this operation, for the same reasons as
given for the answer to "Why do I need Administrator rights to install
FreeOTFE?"

Damn! Oh well, I'm still using it on my home computer and for my security suite.
----
R McCue
PortaBlog Home and My Website
And before anyone complains about the grammar, I'm so jetlagged that my
hands aren't even in the same time zone...

"If you're not part of the solution, you're part of the precipitate."

azjerry
Offline
Last seen: 7 years 2 months ago
Joined: 2005-12-09 12:42
doesn't handle read-only files

Encryption fails on any read-only file because it can't delete the original file. I think I had a similar problem with YadabyteDisk.

twnty3svn
Offline
Last seen: 16 years 7 months ago
Joined: 2006-04-10 03:24
works a treat....

however is there a way that i can hide the dos prompt? Don't shoot me down if it a obvious thing, as i'm not really up to speed with bat files.

pfeerick
pfeerick's picture
Offline
Last seen: 8 years 6 months ago
Joined: 2005-12-13 19:21
hiding the dos prompt

no shooting down members today...

put "@echo off" (minus the quotes, of course!) at the top of the batch file to hide all the commands in the batch file or put a @ sign at the start of the line to hide one command.

regards,
Peter

lazyart
Offline
Last seen: 18 years 2 months ago
Joined: 2006-08-13 11:53
and you can hide the window

and you can hide the window by using the freeware nircmd:

nircmd execmd path_to_your_batchfile\your_batch_file.bat

twnty3svn
Offline
Last seen: 16 years 7 months ago
Joined: 2006-04-10 03:24
Thanks for the tip...

that nircmd works perfectly to hide the dos screen, except i can't execute the .bat file properly as it needs the %pdrive% command line in pstart. Any suggestions for a workaround?

Currently my pstart shortcut reads execmd %pdrive%\PortableAPPS\bat\thunderbird.bat

One other question, is there a way to encrypt multiple folders in the one .bat file using EncryptOnClick? I want to be able to encrypt all my personal folders when i exit pStart with only one .bat file.

Thanks.

lazyart
Offline
Last seen: 18 years 2 months ago
Joined: 2006-08-13 11:53
Try this

I send %pdrive% as an argument to the batch file:

execmd \batch\encryptif.bat %pdrive%

within the batch file, refer to the drive as %1 and you're good:
-------------
@echo off
%1
if EXIST Errors.txt del Errors.txt

if EXIST \PTB\data\profile\*.eoc GOTO End

:Encrypt
\EOC\EncryptOnClick.exe -u -e %1\PTB\Data\

DIR "Errors.txt" | FIND /I " 0 Errors.txt"
if errorlevel 1 start notepad.exe "errors.txt"

:End
-------------

As for multiple directories, nothing yet. I'm hoping John switches to a global directory structure which would make that work since everything would be in the same place.

twnty3svn
Offline
Last seen: 16 years 7 months ago
Joined: 2006-04-10 03:24
Fantastic!.....

Thanks again lazyart, the setup you described works a treat.

Once the global directory structure comes into place, my portable life will become complete!

twnty3svn
Offline
Last seen: 16 years 7 months ago
Joined: 2006-04-10 03:24
Sorry just one more question....

how do i select the option of encrypting only the files within a folder, and not any folders with that folder?

ie. i want to encrypt the firefox profile folder, but only the files within, not any of the folders such as extensions.

I've tried the ...profile\*.* but that does not work. Any ideas?

lazyart
Offline
Last seen: 18 years 2 months ago
Joined: 2006-08-13 11:53
That's probably better

That's probably better suited for the message board at 2brightsparks.com who publish the utility. Looking in the help file:

Q: If I encrypt a folder does it encrypt every file in that folder?

A: When you encrypt a folder it will encrypt every file in it that isn't already encrypted. This includes all files in all sub-folders. Files that are already encrypted are ignored.

Doesnt seem to be a way to do what you're hoping to. If you did it file by file it would ask for a password each time.

The compression/encryption is compatible with Winzip 9 (just by changing the file extension to .zip).

azjerry
Offline
Last seen: 7 years 2 months ago
Joined: 2005-12-09 12:42
7zip instead?

Since 7zip is already portable I wonder if it could be used instead of EOC.
7zip has:
- command line interface
- compression
- add password to lock/encrypt
- option to not recurse subdirectories
- creates one archive file instead of one per file (a positive or negative depending on how you look at it). With creative batch file it might be possible to get one .7z file per actual file)
- no move option (may be able to get around this in the batch file by checking for an error and then deleting)
- The encryption may not be that strong. I believe I've read that zip file encryption is relatively easy to break?

Alternatively there's the Info-zip zip/unzip command line programs with a move option that might work instead.
http://www.info-zip.org/

derekthegeek
Offline
Last seen: 16 years 6 months ago
Joined: 2006-03-02 13:07
Is there an Open Source Alternative

Is there an open source alternative to "EncryptOnClick"? Perhaps something that also has a command line interface? I realize that "7-zip" was mentioned but I am unsure of what type of encryption is used and therefore how secure it is.

lazyart
Offline
Last seen: 18 years 2 months ago
Joined: 2006-08-13 11:53
I've looked quite a bit with

I've looked quite a bit with little luck. There are ways to do it on a file level (dscrypt comes to time) but not by directory.

With some really nifty scripting, you could catalog the disk and feed the file names...

Encrypt On Click is free but not open source. It's compatible with WinZip encryption, if that helps any.

pfeerick
pfeerick's picture
Offline
Last seen: 8 years 6 months ago
Joined: 2005-12-13 19:21
7z encryption

Accoring to the website, 7-Zip uses "Strong AES-256 encryption".

regards,
Peter

Ryan McCue
Ryan McCue's picture
Offline
Last seen: 15 years 2 months ago
Joined: 2006-01-06 21:27
Yes,

but I think they're talking about On-The-Fly encryption.
----
R McCue
PortaBlog Home and My Website
And before anyone complains about the grammar, I'm so jetlagged that my
hands aren't even in the same time zone...

"If you're not part of the solution, you're part of the precipitate."

Topic locked