| Home | Screenshots | Download | History | Documentation |
Starting with version 1.6, PortaBase provides the option of creating encrypted data files. This allows you to create databases of sensitive information (like passwords, ATM PIN numbers, or whatever) with reasonable confidence that if a malicious person gains access to your data files (steals your Zaurus, gains access to your PC files, etc.), they will not be able to access the content of these encrypted files without exerting an amount of effort difficult even for large organizations (at least with the computing power expected to be available for the next 10-15 years.)
For security and implementation reasons, the entire content of encrypted files must be held in memory at once; thus encrypted files cannot scale to large sizes as well as non-encrypted files. Files of a few hundred or a few thousand rows should still perform well, but files containing many thousands of rows of data probably won't (at least on the Zaurus; desktop computers with lots of memory can handle quite large encrypted files).
Each encrypted file is accessed by providing a password specified by the person who created the file. (This password can be changed later, provided that the previous correct password has already been given.) Because this password must be relatively easy to remember, this is the weakest point in the encryption scheme; therefore, it is important to choose a good password. No amount of encryption technology in the world can protect your data if a malicious person can easily guess the password. To make it more difficult for even programs using a dictionary or listing of your personal data to break the encryption, file passwords should meet the following guidelines:
For people with significant knowledge of cryptography who want to assure themselves that there aren't any security holes in the implementation, or for people who are merely curious as to how it works, a summary of how PortaBase encrypts the data is presented here. I won't attempt to define the cryptography terms used here, because there are better sources for such definitions; you can learn more about them via web searches or a good book on cryptography. (I'm using "Applied Cryptography: Protocols, Algorithms, and Source Code in C, Second Edition", by Bruce Schneier.)
PortaBase normally accesses data via seeks directly to address locations in files. For encrypted files, all the data is stored in memory instead; the data is only written to disk after the in-memory data structure has been encrypted. Encrypted files are still Metakit data files, but only contain a generic version of the standard global view and a special "_crypto" view containing the encrypted data and associated information. The in-memory storage object is encrypted as follows:
The following procedure is used to decrypt the data again when the file is opened (after the user has been prompted for the password):
PortaBase uses the SHA-1, Blowfish, FIPS 186, and entropy source implementations found in version 3.1.0 of the Beecrypt library. Encryption algorithms are complicated enough that it's easy to get them wrong in subtle but important ways, so I chose to use an existing code base that's been in public use for a while and already been through public scrutiny and debugging. Other libraries (like Crypto++ and Botan) are more popular and/or capable, but they are also much larger and/or aren't actively maintained on all of PortaBase's target platforms.
I am not a professional cryptologist. I also do not have the financial resources to compensate anybody for damages due to the theft of confidential information. I've spent many days researching cryptography for the purpose of implementing this encryption scheme, but there is a chance that there is a bug (or several bugs) in the code or the reasoning behind it which make the encrypted data less secure than I believe it to be. If you discover such an error, please let me know so I can correct it in future versions.
----Copyright 2003-2004 by Jeremy Bowman.
(jmbowman at alum dot mit dot edu)