Co-working Open House in Brooklyn 1/29

2010-01-25 19:00:00 -0500


My co-working space, The Change You Want To See, in North-side Williamsburg, is hosting our monthly open house event this Friday, the 29th of January. Anybody is welcome to drop in our space during normal hours, but our open-house event is a great time to meet other local professionals and free-lancers. People tend to be very focused during the day, and then at 5pm we do our happy hour (“beer o’clock”).

So, if you’re thinking of checking out co-working, or you just want to chew my ear off about one of our products, you’ll be most welcome. Do check the link and add your name if you plan on coming.


Tempo API Mailing List

2010-01-14 19:00:00 -0500


Our time-tracking service Tempo has an API available (an Application Programming Interface) that allows our customers to integrate their own software with Tempo directly. In the interests of fostering discussion, sharing tips, and providing another vector for making announcements directly to consumers of the API, I’ve created a mailing list on Zed Shaw’s new service Librelist.

To sign up, simply send any old email to: tempo.api@librelist.com

You will receive a confirmation message, and once you are all confirmed, you should be good to go. If you are running code that integrates with our service, or are building something now, I encourage you to join the list and to share with us any difficulties you experience, that we might share knowledge that so often gets trapped in our “support” email box.

That said, if you want to address an issue privately, you’re always welcome to get in touch with us directly.


MTA NYC Transit Opens Data

2010-01-13 19:00:00 -0500


As a New Yorker and a firm believer in mass transit and open data policies, I am happy to see the big news that came with yesterday’s unveiling of the new MTA website:

The agency’s new policy does away with time-consuming data-sharing procedures and burdensome licensing requirements. As of today, schedule, route and fare information are available directly from the MTA website in a standard format, and the data will be updated whenever service changes. Similar set-ups have allowed developers to create scores of transit applications for cell phones and web browsers in other cities, giving riders convenient access to up-to-date information.

Amen! Visit the new developer access page to sign up for accessing to the MTA’s data. Looking forward to seeing what evolves, as I’m sure that apps like Across Air and Exit Strategy are only the beginning. I’ve come to use Exit Strategy a lot, more often for the built-in Subway map than for the nearest door to the NQRW stairway. Maybe I’m a touch old-skool, but I prefer a well-designed map to the augmented reality thing. Get off my lawn! City Transit apparently provides you with a lot of similar getting-around features, plus service advisories, which is handy.

I’m guessing the developers at iTrans really love dynamic programming, because the shortest-path problem is not an easy one, but they’re not content to leave it up to Google, as their app provides this offline, running its calculations on your phone. I need to give that a shot. This particular app is nice because it provides you further info outside the Subway, like PATH and NJTransit (although how accurate that data can be is questionable, as there has been no sign of opening up coming from either NJTransit or the Port Authority).


Cocoa: SQLCipher Manager Available

2010-01-05 19:00:00 -0500


We’ve posted a new project to Github: SQLCipher Manager.

I’ve got to make this brief because I have a ton of work to do, but we’ve recently split out a few chunks of re-usable code from our iPhone application Strip in order to facilitate sharing that code across multiple projects, both for the iPhone and for Mac OS X development. Most of that stuff will be staying internal, and wouldn’t be of much use to others anyway, but we decided to make SQLCipher Manager available as open source software under the same MIT-style license as SQLCipher itself.

The project on Github is an XCode project that builds a static library. You can use cross-project references to utilize this code from other XCode projects and to link against the static lib (required by Apple for us iPhone developers). There’s a great reference on doing this over at Mobile Orchard, so I’ll refrain fro going into the process here.

In short, it provides a singleton that handles your database connection to SQLCipher, keying, re-keying, notifying your app when the database has been created or opened, etc. This sounds like a no-brainer, but you end up re-using this code quite a bit, so it only made sense to define it and a delegate protocol:


@protocol SQLCipherManagerDelegate <NSObject>
@optional
- (void)didOpenDatabase;
- (void)didCreateDatabase;
- (void)didEncounterRekeyError;
- (void)didEncounterDatabaseError:(NSString *)error;
@end

This means you’d do something like this in your app delegate, to initialize the manager for your application, and handle schema events:


- (void)applicationDidFinishLaunching:(UIApplication *)application {
NSLog(@"Setting up sqlcipher manager, and ourself as delegate...");
// setup the db manager register as the delegate
SQLCipherManager *dm = [SQLCipherManager sharedManager];
[dm setDelegate:self];
// set the databasePath property (required), use default iphone app documents directory
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *saveDirectory = [paths objectAtIndex:0];
NSString *databasePath = [saveDirectory stringByAppendingPathComponent:CONFIG_DBNAME];
NSLog(@"setting db path to %@", databasePath);
[dm setDatabasePath:databasePath];

[self launchLoginView];
}

# pragma mark -
# pragma mark SQLCipherManagerDelegate

- (void)didOpenDatabase {
NSLog(@"Database opened");
SQLCipherManager *dm = [SQLCipherManager sharedManager];
NSUInteger schemaVersion = [dm getSchemaVersion];
if (schemaVersion != CONFIG_SCHEMAVERSION) {
NSLog(@"handing off to schema manager, found old version %d", schemaVersion);
StripSchemaManager *schemaManager = [[StripSchemaManager alloc] initWithSQLCipherManager:dm];
[schemaManager migrate:CONFIG_SCHEMAVERSION];
[schemaManager release];
}
}

- (void)didCreateDatabase {
NSLog(@"Database created, migrating");
SQLCipherManager *dm = [SQLCipherManager sharedManager];
StripSchemaManager *schemaManager = [[StripSchemaManager alloc] initWithSQLCipherManager:dm];
[schemaManager migrate:CONFIG_SCHEMAVERSION];
}

- (void)didEncounterDatabaseError:(NSString *)error {
NSLog(@"Database error! %@", error);
SQLCipherManager *dm = [SQLCipherManager sharedManager];
[dm closeDatabase];
abort(); // ouch, yo, but it leaves us a crash log for later
}

- (void)didEncounterRekeyError {
[self lockApplication];
[self presentError:[NSError errorUsingDatabase:@"An error occured rekeying the database. Please login again using your original password" reason:@""]];
}

Your login view controller (or whatever you are passing control to as the application sets up) would actually do the opening, or creating, of the database. Ours looks something like this:


- (IBAction)submit {
SQLCipherManager *dm = [SQLCipherManager sharedManager];
BOOL databaseExists = [dm databaseExists];

// just bail if the submitted password is invalid
if (![dm passwordIsValid:passwordField.text]) {
errorLabel.text = @"Invalid password";
self.passwordConfirm = nil;
passwordField.text = nil;
return;
}

// if this is the first time through, require confirmation
if(databaseExists == NO && !self.passwordConfirm) {
self.passwordConfirm = passwordField.text;
passwordField.text = nil;
passwordField.placeholder = @"Confirm your password";
[passwordField becomeFirstResponder];
return;
}

loadingImage.hidden = NO;
CFRunLoopRunInMode (kCFRunLoopDefaultMode, 0, true);

// seed OpenSSL RAND (removed)

SecureAppDelegate *appDelegate = (SecureAppDelegate *) [[UIApplication sharedApplication] delegate];
if (databaseExists) { // what mode are we in?
// attempt login, we only have passwordField present on screen
if ([dm openDatabaseWithPassword:passwordField.text]) {
[passwordField resignFirstResponder];
[appDelegate launchAppView]; // push new view controller, etc... wait we have no navigation controller...
} else {
errorLabel.text = @"Incorrect password";
[passwordField becomeFirstResponder];
}
} else {
if ([self passwordIsConfirmed]) {
[passwordField resignFirstResponder];
[dm createDatabaseWithPassword:passwordField.text];
[appDelegate launchAppView]; // here again we need to get our navigation controller going
} else {
errorLabel.text = @"Passwords didn't match";
[passwordField becomeFirstResponder];
}
}
passwordField.placeholder = @"Access password";
self.passwordConfirm = nil; // wipe fields
passwordField.text = nil;
loadingImage.hidden = YES;
}

Those are the basics of using SQLCipher in a Cocoa Touch application, and the approach is easily ported to Mac OS X. Can’t go into the various details right now, hopefully it’s explanatory enough. Questions should be posed on the SQLCipher-Users mailing list. Bugs and enhancement requests should be filed using the Issues tracker on the Github project.

Zetetic is the creator of the encrypted iPhone data vault and password manager Strip and the open source encryption-enhanced database engine SQLCipher.

Announcing the Palm Strip Export Utility

2009-12-30 19:00:00 -0500

 

Back in 1997 we released the first version of our mobile password manager and data vault Strip (Secure Tool for Recalling Important Passwords) for PalmOS. It quickly grew to be one of the best and most widely recognized security applications for the platform, gathering accolades from the likes of ZDNet and CNN. A few years ago we dropped support for PalmOS Strip after the decline of the Palm platform. Then, last year, we resurrected Strip by bringing a completely redesigned system to the iPhone sporting a flexible data model and new open-source encrypted database engine.

Yet, many former PalmOS Strip users have let us know that they are still trapped on their old devices, in dire need of a way to export information from their Palm databases. Some people have switched to Strip for iPhone, others just want to back up their information in case of device failure.

Today we are pleased to release a free utility that can export your legacy PalmOS Strip databases out to a simple Comma Separated Value file. Once your databases are exported you can print them, open them in Excel or import them into a separate program. Most importantly, these export files will be directly importable to the iPhone when we release our first Strip desktop sync tool in the coming months.

How To Export

Note: This exporter only works with Palm Strip 1.0 or 2.0 Databases. If you are not running one of these versions you should upgrade first. This utility is not intended for use with the iPhone version of Strip (we will be releasing a iPhone sync package soon that will provide similar functionality).

Start off by downloading the exporter program:

Save the program to your computer and then run it:

  1. Enter the password for your Palm-Strip database. This is the same password you would enter into the program normally.
  2. Click the “Choose Directory” button, and navigate to the location of your Strip Databases. These will usually be in your Palm desktop install folder, usually something like C:\Program Files\palm\<username>\backups.
  3. Click the “Save As” button to choose the location to export the file.
  4. Click the “Export To File” button.

The system will then export your entire database out to a CSV file at the selected location. Your data will be left intact, with the exception that line breaks will be removed from Note fields to allow the export. Open your file in a spreadsheet like Excel or in a text editor like Notepad to verify the results.

Credits & Code

This new exporter tool is based on the pioneering work by David Dribin’s perl-strip, an early exporter for Strip databases. We’ve taken his great Palm::Zetetic::Strip module and forked it on GitHub. Our updates include the use of newer digest libraries and updates to support the full Strip 2.0 database format (including service types). We’ve also released the source to the palm-strip-export application on GitHub.

Zetetic is the creator of the encrypted iPhone data vault and password manager Strip and the open source encryption-enhanced database engine SQLCipher.