Profile cover photo
Profile photo
KB Sriram
KB's posts

Post has attachment
End-to-end migrating to github.

Post has attachment
Woo-hoo - back from visiting the cradle of civilization!

Post has attachment
A fun experiment testing 1.9 million RSA moduli from public keys in the sks OpenPGP keyservers. Do they share any common factors? One pair of expired v3 keys. Are any of them divisible by small primes? 41 subkeys but the modulus remains composite after division -- so it is likely to be some bug in the tool that generated such keys.

Assuming I didn't make some giant blunder, not too bad I suppose, out of 1.9 million moduli... (inspired by, and using code from

Post has attachment
What's a good way to let someone discover your PGP key if they only know you via a Twitter, G+ or Github profile? Add your profile url as a user id on your key, and publish a fingerprint on your profile site.

Some discussion as well as a key lookup client linked from this post.

Post has shared content

Post has attachment
Just documenting some code I use to privately backup photos from my android phone to a laptop. The phone uploads photos as encrypted files to GDrive. The laptop downloads and decrypts new photos, then deletes files off GDrive. It's admittedly geeky to setup right now, but it's worked out quite nicely as a private, no-hassle local backup of my phone pics.

Post has attachment
A small experiment to visualize dependencies between classes in the android framework. This effort generated some some neat pictures, and was a chance to play with svg.

Quick way to embed git version with ant and command line

Recent versions of the build tools have made it very easy to dynamically set the (or the version.code I guess) with plain old ant and the command line.

Remove the attribute from your AndroidManifest.xml file, and add this stanza to a custom_rules.xml file.

  <exec executable="git" outputproperty="">
    <arg value="rev-parse"/>
    <arg value="--short"/>
    <arg value="HEAD"/>

Edit to taste - that's it.

Post has attachment
Autosave your photos to Snapfish with this simple Android app.
Wakes up when there are new pictures and saves them to your Snapfish account. That's it.

Getting pictures off my Nexus 4 into Snapfish has always been a chore, and I'm a fan of single-purpose automated apps. So I wrote this and have been using it over the last few months. Set it up once and forget about it pretty much. It's really nice to have the pictures just show up in Snapfish without any effort.

So I may be a little biased :-) but if you use Snapfish I think you'll like it.

* Waits to upload (by default) over wifi at full resolution.
* You'll have a copy of your photos in private Snapfish albums, should you ever lose your phone.
* If you order cards or photobooks from your computer, it's so much easier having your phone pictures already on the site.

One more thing... yep, open-sourced for good measure, and I'd love to hear your feedback.

Hope you like the app, please do share this link with others it if you find it handy.

Post has attachment
How does the Play Services library really get OAuth access tokens?
Wait while more posts are being loaded