Tarsnap update (hello reddit!)On Monday my last post was linked to from reddit; at approximately 13,000 visitors, the "reddit effect" isn't quite on par with the slashdot effect, which sent 30,000 visitors to my page about security issues with HyperThreading in May 2005, but it dwarfs the 4000-visitor "FreeBSD release announcement" effect which I saw in January when the FreeBSD 6.2-RELEASE announcement linked to my post about using FreeBSD Update to upgrade between FreeBSD releases. Among those thousands of visitors were several who emailed to ask about my progress on tarsnap; so now is probably a good time to post an update on how I'm doing.
The work I mentioned in my last post -- thinking hard about cryptographic protocols -- is now finished. Following the approach of "defence in depth", I didn't stop at thinking about protecting the server's private key from being stolen via a side channel attack: Even if an attacker can obtain that key, he won't be able to impersonate either client or server (including by replaying packets) unless he can also steal the secret access keys which are shared between the client and server.
After satisfying myself that the cryptographic protocols were appropriate, I moved on to writing the code for tarsnap's client-server communications. This code is interesting: Because I want to overlap network communication and archive generation, yet want to avoid using multiple threads -- both for reasons of portability and because, as Robert Watson recently commented, concurrent systems are actively malicious -- I'm working entirely with non-blocking network I/O and a great many callback functions. Of course, making sure that all possible error cases (network errors, communication timeouts, protocol errors, etc.) are handled correctly and without leaking memory, network sockets, or other resources is also "interesting", to say the least.
With this work more or less out of the way -- I need to add code to allow the client to reconnect and continue after a connection dies, but this will be fairly straightforward -- I now have all of the major features in place for the tarsnap client. On the server side backups are currently being stored locally in a file system -- which isn't reliable enough, for obvious reasons -- so I still have more code to write before I launch tarsnap as a commercial service; but in the near future I'll start contacting a few people to invite them to join a private beta test.
blog comments powered by Disqus