The Sad Truth

Offered without comment.
Posted by Anant on October 18th, 2009 in India, Life, People | 5 Comments

Offered without comment.
Posted by Anant on October 18th, 2009 in India, Life, People | 5 Comments
I usually never pay attention to the auto complete suggestions offered by Google, until now, when I found they can be quite amusing. What’s even more fun though, is repeating a search across different country specific sites, to get a idea of what the people of that nation are most worried about. Here’s a sampling, let’s start with India:

#1 certainly explains India’s growing population. We’re also quite obsessive about learning proper English (Outsour Singh is desperately looking to land that call center job) and hacking Orkut accounts. Now, for the Netherlands:

I guess the one take-away from this is that the English speaking Dutch population (which is quite large, mind you) are mostly looking for more info on some romantic comedy from Hollywood. I was also curious about the results for the USA:

Hmm, why are there so many Americans wanting to learn to “tie a tie”? “How to solve a Rubix cube” is about the only intellectual entry to appear on the suggestion list among all three countries, until you realize that it’s actually spelled “Rubik’s”. I wouldn’t be surprised if “Rubix” makes the dictionary soon.
The common theme for all countries seems to be: learning to kiss. Indians are confused between “losing weight” and “reducing weight”, which also explains why everyone wants to get better at English. Some Indians also want to gain weight, a term which is most definitely absent from American searches. Our Dutch friends have no interest in either, I completely understand why; they maintain a very healthy lifestyle by cycling all over the place. The Americans have apparently mastered the art of downloading videos from Youtube, while the Indians and Dutch are still learning the ropes. American women first want to learn to get pregnant and then quickly want to get rid of the resulting stretch marks, while Indian ladies don’t bother with the latter.
The geeks out there will notice the UI improvements on the US version of Google over the other two. I think I’ll stop drawing inferences now
Try your own fun searches to see what auto-suggest has in store! Suggested starting point: “How to use”…
I’m back from the EU MozCamp in Prague and we all had a great time! Check out the slides from my talks: Labs Overview and Weave in Depth.
A few people at the MozCamp were interested in Weave’s use of cryptography to protect the user’s data and privacy. Although the specs for the Weave server are available, it may take someone new a while to wrap their head around the whole scheme. I’m going to attempt explaining what crypto operations we do and why we do it in this blog post.
First, let’s get some basic definitions out of the way. Symmetric cryptography means you have one key that can perform both encryption and decryption, and they are complementary operations. For Weave, we use AES with a 256 bit key, and we use it in a mode that requires an ‘initialization vector’ for every decryption. Asymmetric cryptography means there’s a pair of keys (usually called ‘public’ and ‘private’ keys). A piece of text “encrypted” by one key can only be “decrypted” by the other key. Here, we use RSA with a 2048 bit private key.
So, when a user first signs up for Weave using the wizard on their computer, we generate a (random) pair of public and private keys. Next, we use the user’s passphrase to create a symmetric key. This is done using a pretty standard algorithm known as PBKDF2 (short for “Password Key Derivation Function”). The PBKDF2 algorithm requires a ’salt’ value which is also stored on the server. Now that we have a symmetric key, we use it to encrypt the user’s private key and upload it along with the public key to the server. Note that the passphrase is never sent to the server, so if the user’s password ever gets compromised all the attacker can get is their encrypted private key, which really isn’t of much use (especially given that the key is 2048 bits long).
Whenever a particular “engine” is to be synchronized (an engine could be Tabs, Bookmarks, History etc.) we generate a random symmetric key for that engine. This key is then encrypted using the user’s public key (now, one can only retrieve the original symmetric key with the corresponding private key) and uploaded as being associated with a particular engine. All entries (the ‘ciphertext’ property in a “Weave Basic Object”) in that engine are encrypted with the symmetric key that was generated for it.
To make things clear, let’s enumerate the steps we would take to decrypt a single tab object for user ‘foo’:
A word about the formats in which the keys are actually stored in. All values are Base64. For symmetric keys, the key is stored as-is. For asymmetric keys, I wish we used a standard format like PKCS#12, but we don’t. It’s still ASN.1 though, in some format NSS exports private keys in. You need to do a bit of ASN.1 parsing to figure out the values you’re interested in.
Fortunately, I’ve already figured out most of the details for you – check out my Javascript or PHP implementations of the crypto elements required to decrypt Weave Basic Objects.
Finally, a quick note about why we do all this. Sharing is now reasonably easy, if you want to share your bookmarks with someone, you just need to encrypt the corresponding symmetric key with their public key and they’re good to go. Also, each WBO has it’s own ‘encryption’ property so this can be as granular as needed. Secondly, the passphrase is never stored anywhere (except possibly on the user’s computer) so the server never sees anything other than encrypted blobs of Base64′ed text. Along with making HTTPS mandatory, we think this is a pretty secure way of protecting the user’s data.
If you have other encryption schemes that might fit into Weave’s use cases please let us know! (We’ve already been looking at interesting developments in this area such as Tahoe). I’d also love to hear from you if you have any questions on our current cryptography scheme. We’re constantly trying to improve the security and efficiency of our system so these details are only valid until we change our scheme
Now, go write that third-party Weave client, you have no excuse not to!
Posted by Anant on October 11th, 2009 in FOSS, Mozilla, Programming | 9 Comments
I’m off to the beautiful city of Prague, or “Praha” as it is known locally, for the European MozCamp of 2009. Memories from the MozCamp last year are still fresh, and I’m definitely looking forward to this one!
On Friday, we’re going to be hosting a Labs Hackathon on Jetpack. This is your chance to get to know more about the framework that’s so easy to use that your mom could write an extension with it. Maybe not your Grandma though, you do need to know a bit of Javascript
The hack session will last as long into the night as needed for you folks to come up with amazing ideas for Jetpacks and implement them. Drew Willcoxon from the Firefox team and I will be on hand all day to help you, so feel free to come and poke us. Oh, I almost forgot to mention that there’s Free Pizza involved.
On Saturday, I’ll be giving a talk on Weave. With 0.7 just released, we’ll be taking a look at our current state, what’s in store for the future, and maybe a few cool demos. We’re also especially interested in engaging with addon developers to see what Weave can do to make it easier for them to add sync functionality to their addons.
Be there!
Posted by Anant on October 1st, 2009 in Conferences, FOSS, Mozilla, Places | 1 Comment