KeePass to Keyring Converter

About KKConvert

This is a quick-and-dirty Java implementation for a KeePass password database into a Keyring PDB.

For now, the input is not a native KeePass database, but a KeePassX text export, which is imported into an existing Keyring PDB, replacing its content by the content of the KeePass database.

KKConvert uses the source code from KeyringEditor to access the Keyring PDB.

Download KKConvert

The source code of KKConvert is available under the GPLv2:

Installation

  1. Download the source code of KeyringEditor
  2. Unpack the source code of KeyringEditor
  3. Download KKConvert in the same directory
  4. Compile KKConvert.java: javac KKConvert.java

Usage

  1. Run KeePassX
  2. Export your database as a text file
  3. Locate your Keyring PDB, which is called Keys-Gtkr.pdb; if you are using J-Pilot, you're likely looking for ~/.jpilot/backup/Keys-Gtkr.pdb
  4. Run java KKConvert <keepass text db> <keyring PDB>
  5. Enter your Keyring PDB password
  6. Check that no error messages were shown
  7. Upload the updated Keys-Gtkr.pdb to your PDA

Warning!

This program comes with no warranty whatsoever. You are strongly advised to have a backup of your PDA data, and especially of your Keys-Gtkr.pdb before you run KKConvert. If you have non-ASCII characters in your password database, there is a chance that the PDB generated will be corrupted, and that it will make your PDA reset. Or maybe your PDA's memory could be wiped out completely, though this should not happen.

Also, KKConvert will first empty the contents of your Keyring PDB, and then populate it with the content of the KeePass database. In other words, you will loose the contents of your Keyring PDB.

You have been warned.

See limitations for details.

Notes about security

I coded KKConvert as I wanted to have access to my KeePass database on my Palm quickly, so it has a few security gotchas.

KKConvert currently takes a text export (i.e. plain text) of a password database as input. This is obviously not ideal, as it means that, for the duration of the conversion operation, your passwords are unprotected on a device. Delete the text export as soon as the conversion is completed! The next step will be for KKConvert to read the database directly.

The password for your KeyRing PDB will be asked from you and will appear in the terminal. I need to figure out how to suppress echoing in a Java program. Again, this is currently a quick-and-dirty hack.

Limitations

I have experienced issues with non-ASCII characters. The resulting PDBs were apparently corrupted and Keyring made my Treo crash. I currently have a "normalization" function which gets rid of accents and other non-ASCII characters. So the limitations are currently as follow:

  1. If you have accents in your database, they will be gone in the resulting PDB.
  2. In case you are using a non-ASCII character not covered by the normalization function, which is by no means exhaustive, the PDB produced is likely to be corrupted and crash your PDA.

Feedback

Please send feedback to hugo@larve.net.

Related projects


Hugo Haas
$Date: 2006-05-10 14:23:08 -0700 (Wed, 10 May 2006) $