Wednesday, March 11, 2009

Tired of waiting for KeePass to be ported to the iPhone

I use KeePass for all of my password/account management - and it really has made life incredibly simple (and secure).

For just about every online service I use, I now have a unique strong password.  Having so many strong passwords makes it incredibly difficult (impossible) to remember even a handful of them.

There are a few downsides to relying on software to manage your digital account security - and I won't list out the safety implications.

During my brief trip to California the last week I realized that I no longer know the strong password to my professional email account (npike@npike.net) - and thats BAD!  This password is of course stored in my KeePass Database (which is synced to all my computers via an AES-256 encrypted db file) - but I was on the West Coast with no computer, only my iPhone.

Due to KeePass being opensource, it exists for most flavors of operating systems out there - theres even a project to port it to the iPhone (that seems dead :( ).

My life would have been so much easier if I was able to look at my KeePass database from my phone while away from my computers.

I spent the evening today trying to port some of the KeePass C++ to Objective-C without much luck.  For now I cobbled together a crappy solution that should work in a pinch in the future.

  1. Export KeePass Database as an XML file

  2. Encrypt resulting XML file with openssl (AES 256bit)
    openssl enc -aes-256-ecb -in kp.xml -out kp


  3. (Make sure to have a strong but memorable passphrase for the encrypted file).

  4. Delete original unencrypted XML file.

  5. Write stupid script to decrypt encrypted file (pain in the ass to type out the whole command on iPhone)

  6. Add my iPhone's unique SSH key to the authorized key list for my linux box. (See Send your SSH Public Key to each host you use)

  7. Write a lazymans script on the iPhone to SSH to linux box by typing a single letter (Saved as "S" on my path)
    #!/bin/bash
    ssh staging.npike.net -l npike

  8. Profit!


Being the lazy, but creative geek that I am - I now only have to launch the terminal application on my iphone, type "s" - navigate to where my encrypted keepass export is saved, and run the decrypt script above.

Granted, this file will be stale all the time unless I manually re-export it everytime I make a change in KeePass... but should hold me in a pinch until KeePass is ported to the iPhone.

Moral of the story? Make your email account have a strong, but memorable password thats different from all of your other passwords.

5 comments:

Erik Bye said...

Wow that's a great solution! You sure are a problem solving techie!

Bob Smith said...

Looks like iKeepass is alive, has received US and Canadian cryptography export licenses, and will be published in US and Canadian iTunes stores very soon (according to 20 Apr 2009 update from developer).

Pat S. said...

Looks like iKeepass was rejected yet again by the App store.

Andrew said...

I found updates here...

http://ikeepass.de/bl0g

Progress is looking good.

korvan said...

An update a few days ago on (November 7th) on iKeepass.de says that version 1.1 is with Apple for approval now.

Hopefully this one gets through. I, for one, am very bloody tired of the waiting too. I'm almost ready to ditch Keepass in favour of 1Password or SplashID - neither of which I like very much, but DO have iPhone companion apps.