Sunday, November 18, 2007

Build Secured and Portable PIM

There are solutions/platforms of secured and portable PIM:
  1. Laptop PC.
  2. PDA like your smart phone and pocket PC etc.
  3. USB flash disk, portable hard drive, iPod.
  4. U3 Smart Drives.
These solutions clearly have their own advantages and weaknesses upon different scenarios and use cases.

This article introduces an economic alternative solution to U3 Smart Drives. Solutions like U3 are useful when you don't need portable computing, but portable data and applications, and then borrow computing from any Windows PC you can use.

(Source from Wikipedia)

While U3 smart drives are very useful, however, functionally and technically it has the following shortfalls and weaknesses:
  1. U3 excludes the uses of portable hard drives, iPod and other external storages, effectively lock itself to USB flash disk only. Thus, this limits the choices of customers.
  2. A U3 compliant application must also be packaged in U3's special program format. U3 applications will only run from a U3 device. This makes packaging and distribution of portable applications more difficult.
  3. When inserting a U3 smart drive, U3 will silently install itself to the host machine. As a platform to contain portable applications, U3 itself is not portable, and silent installation make it look like a trojan. Please read what is a portable app for details.
  4. U3 provides API and software development kits for 3rd party developers. However, the benefit of using the API is not great as the kits did not address the other shortfalls of U3, but made the deployment of applications difficult to developer and easier to U3 implementation.
  5. U3 needs two drive letters to run, and creating drive letters in Windows requires administrator privileges.
  6. More expensive. Sandisk, the rights holders for U3 asks for a 5% royalty from USB flash drive manufacturers who wish to implement the platform on their products. However, your cost is not just 5% more expensive as the manufacturing quantity can not be as scalable as normal USB devices.
I would like to introduce a fairly simple twist to your USB flash disk or any external storage to gain the benefits of portable applications while have less shortfalls than what U3 has.

The solution is simple: portable applications + portable apps menu + truecrypt.


As both PortableApps.com and TrueCrypt.org have comprehensive user manual and straightforward tutorials, I would not introduce them here in details as separated applications, and would assume you have some basic skills of using portable apps menu and TrueCrypt.

The point of the solution is, portable apps menu provides convenient shortcut to portable applications, and TrueCrypt provides data protection.

Usage:
  1. Plug in the USB drive. Windows will scan the drive according to security settings, and may pop up a dialog for a drive letter. You should input a drive letter available in the host machine.
  2. Another dialog will appear asking for the password used for unlock the TrueCrypt storage.
  3. Portable apps menu will pop up ready for serving you.


Steps of construction:
  1. Build a TrueCrypt storage to store your portable applications and data. The size I prefer is around 600 MB so I can back up the whole storage to a CD-R if needed. It is recommended that you build the storage on a PC's hard drive first then copy the storage file to the USB drive.
  2. Map the TrueCrypt storage to a drive letter, and install portable apps menu to the root of the mapped drive.
  3. Copy other portable applications into directory "PortableApps".
  4. Run PortableApps.exe for testing.
  5. Copy the TrueCrypt storage and TrueCrypt program to your USB drive.
  6. Copy the following scripts to the USB drive.
  7. Run the script for testing, then unplug and plug in the USB drive for further testing.


Script Files:

AutoRun.INF
[autorun]
open=cscript MountWithDrive.vbs
action=Start TrueCrypt and PortableApp

This file must be in the root of your USB drive. You may need to adjust the path of "MountWithDrive.vbs" according where you copy the VB script file to. The INF script shown here assumes the VBS file is stored in the root of the USB drive.

MountWithDrive.vbs
Dim driveLetter
driveLetter = InputBox("Define which drive letter to mount")

if driveLetter <> "" then
Set WshShell = WScript.CreateObject("WScript.Shell")

WshShell.Run "tools\TrueCrypt\TrueCrypt.exe /v Know\data.data /m rm /q /l "& driveLetter, 1, true

WshShell.Run driveLetter &":\PortableApps\PortableAppsMenu\PortableAppsMenu.exe"

WshShell.Run "tools\TrueCrypt\TrueCrypt.exe /q preferences"
end if

You will need to adjust the path to "TrueCrypt.exe" according the location of the program in the USB drive. The vbscript shown assumes that TrueCrypt program files are stored in USB Root\Tools\TrueCrypt\. In addition, the script assumes that the encrypted storage file "data.data" is stored in USB Root\Know, so you need to adjust this as well.

Now, you have Mozilla Thunderbird as desktop Email client, Mozilla Sunbird as calendar, and Open Contacts as address book in a secured and portable storage, what else do you need for portable Personal Information Manager?

Remarks:
This solution still has some shortfalls comparing to a perfect solution not yet implemented and possible. It still requires 2 drive letters from host computer and need admin privilege. Before unplugging the USB drive, you need to first close the Portable App Menu, then dismount the encrypted drive. Nevertheless, it has much less shortfalls than what U3 has, while having all convenience and security of U3.

Though the solution is not yet a quick off-the-shelf product and need some twist to initialize, it should not be difficult technically to automate the steps of initialization illustrated above. I will suggest the rights holders of PortableApps and TrueCrypt to come up with a integrated installation program.

1 comments:

Anonymous said...

you also have to replace "KNow\data.data" in your VB-Script with the name of your storage file