<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.kix.in/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Across the Stars</title>
	
	<link>http://www.kix.in/blog</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Wed, 16 Dec 2009 02:01:34 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.kix.in/kix" /><feedburner:info uri="kix" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><creativeCommons:license>http://creativecommons.org/licenses/by-nc-sa/3.0/</creativeCommons:license><image><link>http://creativecommons.org/licenses/by-nc-sa/3.0/</link><url>http://creativecommons.org/images/public/somerights20.gif</url><title>Some Rights Reserved</title></image><feedburner:emailServiceId>kix</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>Figuring out the Goo.gl API</title>
		<link>http://feeds.kix.in/~r/kix/~3/K5SEBiT65Hw/</link>
		<comments>http://www.kix.in/blog/2009/12/goo-gl/#comments</comments>
		<pubDate>Mon, 14 Dec 2009 23:11:52 +0000</pubDate>
		<dc:creator>Anant</dc:creator>
				<category><![CDATA[Google]]></category>
		<category><![CDATA[Hacks]]></category>
		<category><![CDATA[Mozilla]]></category>

		<guid isPermaLink="false">http://www.kix.in/blog/?p=575</guid>
		<description><![CDATA[UPDATE: &#8216;Fatalis&#8217; has pointed out in the comments that the POST should be made to http://goo.gl/api/url with User-agent set to &#8216;toolbar&#8217;. The code now works, Yay!
Google just announced their own URL shortening service. Their service can only be used from the toolbar or FeedBurner, and I don&#8217;t particularly like adding extra toolbars to my browser. [...]]]></description>
			<content:encoded><![CDATA[<p><strong>UPDATE</strong>: &#8216;Fatalis&#8217; has pointed out in the comments that the POST should be made to http://goo.gl/api/url with User-agent set to &#8216;toolbar&#8217;. The code now works, Yay!</p>
<p>Google just <a href="http://googleblog.blogspot.com/2009/12/making-urls-shorter-for-google-toolbar.html">announced</a> their own URL shortening service. Their service can only be used from the toolbar or FeedBurner, and I don&#8217;t particularly like adding extra toolbars to my browser. Maybe I can figure out a way to use their service from the command line?</p>
<p>I downloaded the toolbar XPI, unzipped it and peeked inside. Horribly indented JS awaited me. Nothing <a href="http://jsbeautifier.org/">jsbeautifier</a> couldn&#8217;t fix though. Few minutes later, I arrived at this readable JS function:</p>
<pre>var getUrlShorteningRequestParams = function (b) {
    function c() {
        for (var l = 0, m = 0; m &lt; arguments.length; m++)
          l = l + arguments[m] &amp; 4294967295;
        return l
    }
    function d(l) {
        var m = String(l &gt; 0 ? l : l + 4294967296);
        for (var o = 0, n = false, p = m.length - 1; p &gt;= 0; --p) {
            var q = Number(m.charAt(p));
            if (n) {
                q *= 2;
                o += Math.floor(q / 10) + q % 10
            } else o += q;
            n = !n
        }
        m = m = o % 10;
        o = 0;
        if (m != 0) {
            o = 10 - m;
            if (l.length % 2 == 1) {
                if (o % 2 == 1) o += 9;
                o /= 2
            }
        }
        m = String(o);
        m += l;
        return l = m
    }
    function e(l) {
        for (var m = 5381, o = 0; o &lt; l.length; o++) m = c(m &lt;&lt; 5, m, l.charCodeAt(o));
        return m
    }
    function f(l) {
        for (var m = 0, o = 0; o &lt; l.length; o++) m = c(l.charCodeAt(o), m &lt;&lt; 6, m &lt;&lt; 16, -m);
        return m
    }

    var i = e(b);
    i = i &gt;&gt; 2 &amp; 1073741823;
    i = i &gt;&gt; 4 &amp; 67108800 | i &amp; 63;
    i = i &gt;&gt; 4 &amp; 4193280 | i &amp; 1023;
    i = i &gt;&gt; 4 &amp; 245760 | i &amp; 16383;

    var h = f(b);
    var k = (i &gt;&gt; 2 &amp; 15) &lt;&lt; 4 | h &amp; 15;
    k |= (i &gt;&gt; 6 &amp; 15) &lt;&lt; 12 | (h &gt;&gt; 8 &amp; 15) &lt;&lt; 8;
    k |= (i &gt;&gt; 10 &amp; 15) &lt;&lt; 20 | (h &gt;&gt; 16 &amp; 15) &lt;&lt; 16;
    k |= (i &gt;&gt; 14 &amp; 15) &lt;&lt; 28 | (h &gt;&gt; 24 &amp; 15) &lt;&lt; 24;
    j = "7" + d(k);

    i = "user=toolbar@google.com&amp;url=";
    i += encodeURIComponent(b);
    i += "&amp;auth_token=";
    i += j;
    return i
};</pre>
<p>So, I call <code>getUrlShorteningRequestParams("http://www.kix.in/");</code> to get <code>"user=toolbar@google.com&amp;url=http%3A%2F%2Fwww.kix.in%2F&amp;auth_token=78925814685"</code>. I see in their code that they do a POST request to the service to obtain a JSON return value that would contain the short URL. I punch it in using cURL:</p>
<pre>$ curl -v -d "user=toolbar@google.com&amp;url=http%3A%2F%2Fwww.kix.in%2F&amp;auth_token=78925814685" http://goo.gl/
* About to connect() to goo.gl port 80 (#0)
*   Trying 74.125.19.102... connected
* Connected to goo.gl (74.125.19.102) port 80 (#0)
&gt; POST / HTTP/1.1
&gt; User-Agent: curl/7.19.7 (i386-apple-darwin10.2.0) libcurl/7.19.7 OpenSSL/0.9.8l zlib/1.2.3
&gt; Host: goo.gl
&gt; Accept: */*
&gt; Content-Length: 77
&gt; Content-Type: application/x-www-form-urlencoded
&gt;
&lt; HTTP/1.1 405 HTTP method POST is not supported by this URL</pre>
<p>Oops! Well, not really, the URL shortener from the toolbar doesn&#8217;t work either, I just get the full URL whenever I try to &#8220;share&#8221; something. Has anybody actually generated a real goo.gl short URL yet?</p>
<p>Their <code>auth_token</code> parameter seems completely superfluous to me as it is generated from the URL itself. Don&#8217;t we all know security by obscurity doesn&#8217;t work <img src='http://www.kix.in/blog/wp-content/plugins/smilies-themer/Silk/emoticon_smile.png' alt=':)' class='wp-smiley' /> </p>
<img src="http://feeds.feedburner.com/~r/kix/~4/K5SEBiT65Hw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.kix.in/blog/2009/12/goo-gl/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		<feedburner:origLink>http://www.kix.in/blog/2009/12/goo-gl/</feedburner:origLink></item>
		<item>
		<title>Go: Why I ♥ Google</title>
		<link>http://feeds.kix.in/~r/kix/~3/JcyuIcicc4Y/</link>
		<comments>http://www.kix.in/blog/2009/11/go-why-i-%e2%9d%a4-google/#comments</comments>
		<pubDate>Wed, 11 Nov 2009 03:23:56 +0000</pubDate>
		<dc:creator>Anant</dc:creator>
				<category><![CDATA[FOSS]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[People]]></category>
		<category><![CDATA[Plan9]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://www.kix.in/blog/?p=561</guid>
		<description><![CDATA[Christmas came early this year.

Today, Google announced their new open source systems programming language: Go. I&#8217;m super excited about this, we all have been wondering what Rob Pike has been upto since he joined the big G, and now we know. Not just that, but Ken Thomson, Robert Griesemer, Ian Taylor and Russ Cox were [...]]]></description>
			<content:encoded><![CDATA[<p>Christmas came early this year.</p>
<p><img class="size-full wp-image-562" title="Glenda2Go" src="http://www.kix.in/blog/wp-content/uploads/2009/11/glenda2go.png" alt="Glenda2Go" width="182" height="75" /></p>
<p>Today, Google announced their new open source systems programming language: <a href="http://golang.org/">Go</a>. I&#8217;m super excited about this, we all have been wondering what Rob Pike has been upto since he joined the big G, and now we know. Not just that, but Ken Thomson, Robert Griesemer, Ian Taylor and Russ Cox were all involved in the project, with Ken doing what he does best, writing compilers in lightning speed <img src='http://www.kix.in/blog/wp-content/plugins/smilies-themer/Silk/emoticon_wink.png' alt=';)' class='wp-smiley' /> If that isn&#8217;t a list of heavyweight respectable computer scientists, I don&#8217;t know what is!</p>
<p>I think Go is poised to be the dominant systems programming language of the future. Go has nailed almost every aspect of a systems language, though some would say I&#8217;m biased. Go has been strongly influenced by <a href="http://en.wikipedia.org/wiki/Oberon_%28programming_language%29">Oberon</a>, CSP languages like <a href="http://en.wikipedia.org/wiki/Limbo_%28programming_language%29">Limbo</a>, and the standard libraries have tantalizing similarities to <a href="http://www.kix.in/plan9/">Plan 9</a>. We&#8217;ve had Limbo and Plan 9 for a while now (more than a decade), but this is where my real love for Google begins to bubble, they took something awesome but unpopular and gave it a push to the masses. There are very few companies in the world who would attract the talent to do this, and even fewer who would open source the results. The attention Go has been getting is just mind blowing. Pike had been doing amazing work at Bell-Labs for quite a while, but none of it even got an inkling of the publicity Go is currently getting.</p>
<p>Google was what Pike needed to prove <a href="http://herpolhode.com/rob/utah2000.pdf">Utah2000</a> wrong.</p>
<p>I know one thing for sure, I&#8217;ll definitely be using my Plan 9 virtual machine a lot less; now that I can write clean concurrent programs that don&#8217;t make my head hurt, both in Linux and OS X. And <a href="http://gcc.gnu.org/">GCC</a>, I&#8217;m not shedding any tears while I bid you goodbye.</p>
<p>On another note, Google also announced today that they&#8217;ll be sponsoring <a href="http://www.google.com/intl/en/press/pressrel/20091110_free_airport_wifi_holiday.html">free WiFi</a> at a whole bunch of US airports this holiday season. For all its faults, Google definitely seems to be doing the right thing. For how long, it remains to be seen, but so far I&#8217;d say their track record has been better than excellent.</p>
<p><strong>UPDATE</strong>: John Gruber <a href="http://daringfireball.net/linked/2009/11/10/go">points out</a> that &#8220;judging from the copyright statements, [Go is] not an official Google project&#8221;. Could this be a result of the famous 20% time scheme?</p>
<img src="http://feeds.feedburner.com/~r/kix/~4/JcyuIcicc4Y" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.kix.in/blog/2009/11/go-why-i-%e2%9d%a4-google/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.kix.in/blog/2009/11/go-why-i-%e2%9d%a4-google/</feedburner:origLink></item>
		<item>
		<title>Identity on the web is broken</title>
		<link>http://feeds.kix.in/~r/kix/~3/CKTnBt3kg6k/</link>
		<comments>http://www.kix.in/blog/2009/11/identity-on-the-web-is-broken/#comments</comments>
		<pubDate>Tue, 03 Nov 2009 03:08:27 +0000</pubDate>
		<dc:creator>Anant</dc:creator>
				<category><![CDATA[FOSS]]></category>
		<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://www.kix.in/blog/?p=554</guid>
		<description><![CDATA[The mere presence of systems like OpenID, Facebook Connect and a host of other identity services on the web today is attestation to the fact.
Authentication should be a feature of the protocol, not something that relies on hacks like cookies. 99% of websites today rely on cookies for authentication for their websites, besides offering custom [...]]]></description>
			<content:encoded><![CDATA[<p>The mere presence of systems like <a href="http://openid.net/">OpenID</a>, <a href="http://developers.facebook.com/connect.php">Facebook Connect</a> and a host of other identity services on the web today is attestation to the fact.</p>
<p>Authentication should be a feature of the protocol, not something that relies on hacks like <a href="http://en.wikipedia.org/wiki/HTTP_cookie">cookies</a>. 99% of websites today rely on cookies for authentication for their websites, besides offering custom registration and login pages. This means the browser, as the user&#8217;s agent, has no clue of what is going on. A user is forced to manually track myriads of accounts, remember passwords for each of them, and remember what personal information each of them holds. Sure, part of the problem is solved by using password managers (like the one in-built into Firefox, or external programs like <a href="http://agilewebsolutions.com/products/1Password">1Password</a>), but even these programs rely on heuristic algorithms to determine if something <em>looks</em> like a login credential or not. There&#8217;s no explicit way for web pages to tell your browser: &#8220;This is a login form, please fill in details of the user&#8217;s identity here&#8221; or &#8220;These pages are privileged, please give me the user&#8217;s identity&#8221;. Why is that?</p>
<p>Actually, there is such a mechanism: <a href="http://en.wikipedia.org/wiki/Basic_access_authentication">HTTP based Authentication</a> has been a feature present since HTTP/1.0, but only 1% of sites actually use it. The reason for that is purely cosmetic, most browsers display a very bland modal dialog when it encounters a page that requires HTTP Auth, and sites are unable to customize that interaction. So, the technically right way to do things sucks from a user experience perspective, and websites started adopting alternate means. Someone discovered they could use cookies to store session information on the client, and the whole situation exploded ever since. As a programmer, I feel very sad when I think about the fact that instead of fixing the problem in HTTP/1.1, web-based authentication took the route it did and led to the mess we are in today.</p>
<p>However, I must also state that HTTP authentication doesn&#8217;t solve the <em>entire</em> problem &#8211; there is still the issue of users having to create an account for every site they want to be part of. This is because there existed no protocols to <em>federate</em> and provide <em>decentralized</em> authentication. That is, until OpenID and <a href="http://oauth.net/">OAuth</a> came about. Now we&#8217;re at this exciting juncture, and the browser is in a unique position to use these tools together to provide the user with an experience that is secure and easy to use. Every architect will agree that it is indeed a fun challenge to use the state of identity on the web today and make it into something awesome.</p>
<p>This is precisely what the Mozilla Labs team has been thinking about for a while now. Sometime ago, we <a href="http://mozillalabs.com/blog/2009/05/identity-in-the-browser/">added support</a> for automagic one-click OpenID logins to Weave. We plan to spin that &#8220;feature&#8221; out into it&#8217;s own extension and build on it, something we call &#8220;<a href="http://hg.mozilla.org/labs/weave-identity/">Weave Identity</a>&#8220;, part of the broader &#8220;Open Identity&#8221; initiative by the Labs. &#8220;<a href="http://hg.mozilla.org/labs/weave/">Weave Sync</a>&#8220;, the original extension, will just focus on the synchronization parts so we can tackle these two different problems separately.</p>
<p>So, how exactly are we planning on doing this? Take a look at an initial version of a document describing an in-browser &#8220;<a href="https://wiki.mozilla.org/Labs/Weave/Identity/Account_Manager">Account Manager</a>&#8220;. We&#8217;ve also put up a WEP (which expands to Weave Enhancement Proposal, by the way) describing the raw form of a specification for <a href="https://wiki.mozilla.org/Labs/Weave/WEP/110">automatic actions</a> on websites, such as user registration or password changes.</p>
<p>Keep in mind that all of this is in its very early stages (pre-alpha); but that also means it&#8217;s a great opportunity for the community to get involved! What are your thoughts on Open Identity? Use the discussion tab on any of those Wiki pages, start a thread on the Mozilla Labs <a href="http://groups.google.com/group/mozilla-labs">group</a>, or simply leave a comment on this blog entry, and chip in &#8211; we&#8217;d love to hear from you!</p>
<img src="http://feeds.feedburner.com/~r/kix/~4/CKTnBt3kg6k" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.kix.in/blog/2009/11/identity-on-the-web-is-broken/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://www.kix.in/blog/2009/11/identity-on-the-web-is-broken/</feedburner:origLink></item>
		<item>
		<title>GSoC Mentor Summit ‘09 Roundup</title>
		<link>http://feeds.kix.in/~r/kix/~3/5UnvqJalNqs/</link>
		<comments>http://www.kix.in/blog/2009/11/gsoc-mentor-summit-09-roundup/#comments</comments>
		<pubDate>Sun, 01 Nov 2009 18:17:18 +0000</pubDate>
		<dc:creator>Anant</dc:creator>
				<category><![CDATA[FOSS]]></category>
		<category><![CDATA[Fun]]></category>
		<category><![CDATA[Gentoo]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[People]]></category>
		<category><![CDATA[Photos]]></category>
		<category><![CDATA[Plan9]]></category>
		<category><![CDATA[SoC]]></category>
		<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://www.kix.in/blog/?p=555</guid>
		<description><![CDATA[The grand Summer of Code Mentor Summit of 2009 concluded last week and I had the fantastic opportunity of being able to attend on behalf of Gentoo, Plan 9 and Mozilla. What follows is some indication of how awesome the summit was:

(Photo courtesy of warthog from Etherboot)
I met so many folks I&#8217;d only interacted with [...]]]></description>
			<content:encoded><![CDATA[<p>The grand Summer of Code <a href="http://gsoc-wiki.osuosl.org/index.php/2009">Mentor Summit of 2009</a> concluded last week and I had the fantastic opportunity of being able to attend on behalf of <a href="http://socghop.appspot.com/org/home/google/gsoc2009/gentoo">Gentoo</a>, <a href="http://socghop.appspot.com/org/home/google/gsoc2009/plan9">Plan 9 </a>and <a href="http://socghop.appspot.com/org/home/google/gsoc2009/mozilla">Mozilla</a>. What follows is some indication of how awesome the summit was:</p>
<p><a href="http://www.flickr.com/photos/warthog9/4045565440/in/set-72157622539485821/"><img class="alignnone" title="GSoC Mentors Group Photo" src="http://farm4.static.flickr.com/3526/4045565440_5def697f21_o.jpg" alt="" width="622" height="416" /></a></p>
<p>(Photo courtesy of <a href="http://www.etherboot.org/wiki/soc/2009/start#john_warthog9_hawleylinux_foundation_chief_systems_administrator_kernel.org">warthog</a> from Etherboot)</p>
<p>I met so many folks I&#8217;d only interacted with online so far (the classic nickname-to-face matching), but even better was the opportunity to meet folks powering open source projects from so many diverse backgrounds. I met many of my personal rockstars, and learned about a bunch of open source projects I&#8217;d never heard of <img src='http://www.kix.in/blog/wp-content/plugins/smilies-themer/Silk/emoticon_smile.png' alt=':)' class='wp-smiley' /> </p>
<p>Also, one of the things that is only possible at an event like the summit was the ability to get a whole bunch of non-linux operating system groups <a href="http://twitter.com/anantn/status/5151400159">in one room</a>. We had a great <a href="http://gsoc-wiki.osuosl.org/index.php/Non-Linux_OS_Meetup">discussion</a>, and it resulted in the creation of the &#8220;<a href="http://groups.google.com/group/rosetta-os">rosetta-os</a>&#8221; special interest group. Look for more activity on the common device drivers for non-linux operating systems front soon!</p>
<p>Other sessions worthy of special mention were <a href="http://gsoc-wiki.osuosl.org/index.php/Open_Source_Security">Open Source Security</a>, <a href="http://gsoc-wiki.osuosl.org/index.php/Saturday_Sessions_2009/Recruiting_Awesome">Recruiting and Retaining Awesome People</a>, Advanced Trolling (yes, you read that right), and of course the always welcoming <a href="http://gsoc-wiki.osuosl.org/index.php/CasablancaNotes">Casablanca</a> where I spent most of my time. We discussed everything from our SoC experiences to the Afro Celt Sound System in that room, always full of creative energy and warmth.</p>
<p>After <a href="http://www.kix.in/soc/">4 years</a> of participating in the Summer of Code, I am super happy to have finally met the faces behind the program. Every single person I met over the course of last weekend was friendly, intelligent and just generally awesome; that sort of thing doesn&#8217;t happen by chance. I feel warm and fuzzy inside to think that I&#8217;m actually a part of the revolution that is free and open source software, three cheers to everyone that made it possible!</p>
<img src="http://feeds.feedburner.com/~r/kix/~4/5UnvqJalNqs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.kix.in/blog/2009/11/gsoc-mentor-summit-09-roundup/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.kix.in/blog/2009/11/gsoc-mentor-summit-09-roundup/</feedburner:origLink></item>
		<item>
		<title>The Sad Truth</title>
		<link>http://feeds.kix.in/~r/kix/~3/6i_NdW32vvk/</link>
		<comments>http://www.kix.in/blog/2009/10/the-sad-truth/#comments</comments>
		<pubDate>Sun, 18 Oct 2009 12:03:11 +0000</pubDate>
		<dc:creator>Anant</dc:creator>
				<category><![CDATA[India]]></category>
		<category><![CDATA[Life]]></category>
		<category><![CDATA[People]]></category>
		<category><![CDATA[nontech]]></category>

		<guid isPermaLink="false">http://www.kix.in/blog/?p=549</guid>
		<description><![CDATA[
Offered without comment.
]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-550" title="Macaulay" src="http://www.kix.in/blog/wp-content/uploads/2009/10/macaulay.png" alt="Macaulay" width="535" height="456" /></p>
<p>Offered without comment.</p>
<img src="http://feeds.feedburner.com/~r/kix/~4/6i_NdW32vvk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.kix.in/blog/2009/10/the-sad-truth/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://www.kix.in/blog/2009/10/the-sad-truth/</feedburner:origLink></item>
		<item>
		<title>Google Search and Culture</title>
		<link>http://feeds.kix.in/~r/kix/~3/exI7EbcaSBY/</link>
		<comments>http://www.kix.in/blog/2009/10/google-search-and-culture/#comments</comments>
		<pubDate>Thu, 15 Oct 2009 03:21:35 +0000</pubDate>
		<dc:creator>Anant</dc:creator>
				<category><![CDATA[Fun]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Humor]]></category>
		<category><![CDATA[India]]></category>
		<category><![CDATA[Life]]></category>
		<category><![CDATA[nontech]]></category>
		<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://www.kix.in/blog/?p=535</guid>
		<description><![CDATA[I usually never pay attention to the auto complete suggestions offered by Google, until now, when I found they can be quite amusing. What&#8217;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&#8217;s a sampling, [...]]]></description>
			<content:encoded><![CDATA[<p>I usually never pay attention to the auto complete suggestions offered by Google, until now, when I found they can be quite amusing. What&#8217;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&#8217;s a sampling, let&#8217;s start with India:</p>
<p><img class="size-full wp-image-536" title="&quot;How To&quot; in India" src="http://www.kix.in/blog/wp-content/uploads/2009/10/1_in.png" alt="&quot;How To&quot; in India" width="660" height="440" /></p>
<p>#1 certainly explains India&#8217;s growing population. We&#8217;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:</p>
<p><img class="size-full wp-image-536" title="&quot;How To&quot; in the Netherlands" src="http://www.kix.in/blog/wp-content/uploads/2009/10/2_nl.png" alt="&quot;How To&quot; in the Netherlands" width="660" height="440" /></p>
<p>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:</p>
<p><img class="size-full wp-image-538" title="&quot;How To&quot; in the US" src="http://www.kix.in/blog/wp-content/uploads/2009/10/3_us.png" alt="&quot;How To&quot; in the US" width="660" height="440" /></p>
<p>Hmm, why are there so many Americans wanting to learn to &#8220;tie a tie&#8221;? &#8220;How to solve a Rubix cube&#8221; is about the only intellectual entry to appear on the suggestion list among all three countries, until you realize that it&#8217;s actually spelled &#8220;Rubik&#8217;s&#8221;. I wouldn&#8217;t be surprised if &#8220;Rubix&#8221; makes the dictionary soon.</p>
<p>The common theme for all countries seems to be: learning to kiss. Indians are confused between &#8220;losing weight&#8221; and &#8220;reducing weight&#8221;, 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&#8217;t bother with the latter.</p>
<p>The geeks out there will notice the UI improvements on the US version of Google over the other two. I think I&#8217;ll stop drawing inferences now <img src='http://www.kix.in/blog/wp-content/plugins/smilies-themer/Silk/emoticon_smile.png' alt=':-)' class='wp-smiley' /> </p>
<p>Try your own fun searches to see what auto-suggest has in store! Suggested starting point: &#8220;How to use&#8221;&#8230;</p>
<img src="http://feeds.feedburner.com/~r/kix/~4/exI7EbcaSBY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.kix.in/blog/2009/10/google-search-and-culture/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://www.kix.in/blog/2009/10/google-search-and-culture/</feedburner:origLink></item>
		<item>
		<title>How does Weave use Cryptography?</title>
		<link>http://feeds.kix.in/~r/kix/~3/T_NvaSPJMm0/</link>
		<comments>http://www.kix.in/blog/2009/10/how-does-weave-use-cryptography/#comments</comments>
		<pubDate>Sun, 11 Oct 2009 15:26:53 +0000</pubDate>
		<dc:creator>Anant</dc:creator>
				<category><![CDATA[FOSS]]></category>
		<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://www.kix.in/blog/?p=530</guid>
		<description><![CDATA[I&#8217;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&#8217;s use of cryptography to protect the user&#8217;s data and privacy. Although the specs for the Weave server are [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m back from the EU MozCamp in Prague and we all had a great time! Check out the slides from my talks: <a href="http://www.kix.in/talks/mozcamp09-labs.pdf">Labs Overview</a> and <a href="http://www.kix.in/talks/mozcamp09-weave.pdf">Weave in Depth</a>.</p>
<p>A few people at the MozCamp were interested in Weave&#8217;s use of cryptography to protect the user&#8217;s data and privacy. Although the specs for the Weave server are <a href="https://wiki.mozilla.org/Labs/Weave/0.5/API">available</a>, it may take someone new a while to wrap their head around the whole scheme. I&#8217;m going to attempt explaining what crypto operations we do and why we do it in this blog post.</p>
<p>First, let&#8217;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 <a href="http://en.wikipedia.org/wiki/Advanced_Encryption_Standard">AES</a> with a 256 bit key, and we use it in a mode that requires an &#8216;initialization vector&#8217; for every decryption. Asymmetric cryptography means there&#8217;s a pair of keys (usually called &#8216;public&#8217; and &#8216;private&#8217; keys). A piece of text &#8220;encrypted&#8221; by one key can only be &#8220;decrypted&#8221; by the other key. Here, we use <a href="http://en.wikipedia.org/wiki/RSA">RSA</a> with a 2048 bit private key.</p>
<p>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&#8217;s passphrase to create a symmetric key. This is done using a pretty standard algorithm known as <a href="http://en.wikipedia.org/wiki/PBKDF2">PBKDF2</a> (short for &#8220;Password Key Derivation Function&#8221;). The PBKDF2 algorithm requires a &#8217;salt&#8217; value which is also stored on the server. Now that we have a symmetric key, we use it to encrypt the user&#8217;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&#8217;s password ever gets compromised all the attacker can get is their encrypted private key, which really isn&#8217;t of much use (especially given that the key is 2048 bits long).</p>
<p>Whenever a particular &#8220;engine&#8221; 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&#8217;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 &#8216;ciphertext&#8217; property in a &#8220;Weave Basic Object&#8221;) in that engine are encrypted with the symmetric key that was generated for it.</p>
<p>To make things clear, let&#8217;s enumerate the steps we would take to decrypt a single tab object for user &#8216;foo&#8217;:</p>
<ol>
<li>Find the user&#8217;s cluster by making a GET request to <strong>https://services.mozilla.com/user/1/foo/node/weave</strong>. It returns <strong>https://sj-weave06.services.mozilla.com/</strong>.</li>
<li>Fetch the user&#8217;s encrypted private key and public key from <strong>https://sj-weave06.services.mozilla.com/0.5/foo/storage/keys/privkey</strong> and <strong>https://sj-weave06.services.mozilla.com/0.5/foo/storage/keys/pubkey</strong> respectively. The user&#8217;s password is required to access these JSON objects.</li>
<li>Ask the user for their passphrase and generate a 256 bit symmetric key from it using PBKDF2 and the &#8217;salt&#8217; found in the privkey object.</li>
<li>Use the generated symmetric key and the initialization vector found in the &#8216;iv&#8217; property of the privkey object to decrypt the user&#8217;s private key.</li>
<li>Fetch the user&#8217;s encrypted tab objects from <strong>https://sj-weave06.services.mozilla.com/0.5/foo/storage/tabs/?full=1</strong>.</li>
<li>Fetch the corresponding symmetric key (the URL is also listed in the &#8220;encryption&#8221; property of every WBO), in this case <strong>https://sj-weave06.services.mozilla.com/0.5/foo/storage/crypto/tabs</strong>.</li>
<li>Decrypt the symmetric key with the user&#8217;s private key.</li>
<li>Use the decrypted symmetric key to decrypt any WBO from the tabs collection with the initialization vector found in the &#8216;bulkIV&#8217; property of the tabs symmetric key WBO.</li>
<li><strong>Profit</strong>.</li>
</ol>
<p>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&#8217;t. It&#8217;s still <a href="http://en.wikipedia.org/wiki/ASN.1">ASN.1</a> 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&#8217;re interested in.</p>
<p>Fortunately, I&#8217;ve already figured out most of the details for you &#8211; check out my <a href="http://hg.mozilla.org/labs/weaveweb/file/tip/weave.js#l163">Javascript</a> or <a href="http://hg.mozilla.org/users/anarayanan_mozilla.com/weave-proxy/file/tip/crypto/">PHP</a> implementations of the crypto elements required to decrypt Weave Basic Objects.</p>
<p>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&#8217;re good to go. Also, each WBO has it&#8217;s own &#8216;encryption&#8217; property so this can be as granular as needed. Secondly, the passphrase is never stored anywhere (except possibly on the user&#8217;s computer) so the server never sees anything other than encrypted blobs of Base64&#8242;ed text. Along with making HTTPS mandatory, we think this is a pretty secure way of protecting the user&#8217;s data.</p>
<p>If you have other encryption schemes that might fit into Weave&#8217;s use cases please let us know! (We&#8217;ve already been looking at interesting developments in this area such as <a href="http://allmydata.org/~warner/pycon-tahoe.html">Tahoe</a>). I&#8217;d also love to hear from you if you have any questions on our current cryptography scheme. We&#8217;re constantly trying to improve the security and efficiency of our system so these details are only valid until we change our scheme <img src='http://www.kix.in/blog/wp-content/plugins/smilies-themer/Silk/emoticon_smile.png' alt=':-)' class='wp-smiley' /> </p>
<p>Now, go write that third-party Weave client, you have no excuse not to!</p>
<img src="http://feeds.feedburner.com/~r/kix/~4/T_NvaSPJMm0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.kix.in/blog/2009/10/how-does-weave-use-cryptography/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		<feedburner:origLink>http://www.kix.in/blog/2009/10/how-does-weave-use-cryptography/</feedburner:origLink></item>
		<item>
		<title>Heading to Prague…</title>
		<link>http://feeds.kix.in/~r/kix/~3/9iAHnXZpjFw/</link>
		<comments>http://www.kix.in/blog/2009/10/heading-to-prague/#comments</comments>
		<pubDate>Thu, 01 Oct 2009 05:50:09 +0000</pubDate>
		<dc:creator>Anant</dc:creator>
				<category><![CDATA[Conferences]]></category>
		<category><![CDATA[FOSS]]></category>
		<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[Places]]></category>
		<category><![CDATA[nontech]]></category>
		<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://www.kix.in/blog/?p=521</guid>
		<description><![CDATA[
I&#8217;m off to the beautiful city of Prague, or &#8220;Praha&#8221; as it is known locally, for the European MozCamp of 2009. Memories from the MozCamp last year are still fresh, and I&#8217;m definitely looking forward to this one!
On Friday, we&#8217;re going to be hosting a Labs Hackathon on Jetpack. This is your chance to get [...]]]></description>
			<content:encoded><![CDATA[<p><a href="https://wiki.mozilla.org/EU_MozCamp_2009"><img class="alignnone" title="EU Mozcamp 2009" src="https://wiki.mozilla.org/images/thumb/b/ba/Prague_mozcamp.jpg/427px-Prague_mozcamp.jpg" alt="" /></a></p>
<p>I&#8217;m off to the beautiful city of Prague, or &#8220;Praha&#8221; as it is known locally, for the European MozCamp of 2009. Memories from the MozCamp <a href="http://www.kix.in/blog/2008/11/eu_mozcamp-and-friends/">last year</a> are still fresh, and I&#8217;m definitely looking forward to this one!</p>
<p>On Friday, we&#8217;re going to be hosting a <a href="https://wiki.mozilla.org/Prague_DevDay_2009#Mozilla_Labs_Hack_session">Labs Hackathon</a> on <a href="http://jetpack.mozillalabs.com/">Jetpack</a>. This is your chance to get to know more about the framework that&#8217;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 <img src='http://www.kix.in/blog/wp-content/plugins/smilies-themer/Silk/emoticon_wink.png' alt=';)' class='wp-smiley' /> 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. <a href="http://blog.mozilla.com/adw/">Drew Willcoxon</a> 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&#8217;s Free Pizza involved.</p>
<p>On Saturday, I&#8217;ll be giving a talk on <a href="http://labs.mozilla.com/weave/">Weave</a>. With 0.7 <a href="http://labs.mozilla.com/weave/2009/09/30/weave-0-7-released/">just released</a>, we&#8217;ll be taking a look at our current state, what&#8217;s in store for the future, and maybe a few cool demos. We&#8217;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.</p>
<p>Be there!</p>
<img src="http://feeds.feedburner.com/~r/kix/~4/9iAHnXZpjFw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.kix.in/blog/2009/10/heading-to-prague/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.kix.in/blog/2009/10/heading-to-prague/</feedburner:origLink></item>
		<item>
		<title>To PhD or not to PhD?</title>
		<link>http://feeds.kix.in/~r/kix/~3/2XEfH3t0GWI/</link>
		<comments>http://www.kix.in/blog/2009/09/to-phd-or-not-to-phd/#comments</comments>
		<pubDate>Mon, 21 Sep 2009 23:25:46 +0000</pubDate>
		<dc:creator>Anant</dc:creator>
				<category><![CDATA[College]]></category>
		<category><![CDATA[Life]]></category>
		<category><![CDATA[nontech]]></category>

		<guid isPermaLink="false">http://www.kix.in/blog/?p=517</guid>
		<description><![CDATA[
Every Master&#8217;s student in a research university would have had to face this question at some point during their stay. For some, it&#8217;s been a no-brainer. Not for me, it&#8217;s easily the most difficult decision I&#8217;ve ever faced in my life.
On one hand, there&#8217;s the opportunity to work for a corporation, draw a handsome salary [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.phdcomics.com/comics/archive.php?comicid=282"><img class="alignnone" title="To PhD or not to PhD" src="http://www.phdcomics.com/comics/archive/phd021302s.gif" alt="" width="600" height="271" /></a></p>
<p>Every Master&#8217;s student in a research university would have had to face this question at some point during their stay. For some, it&#8217;s been a no-brainer. Not for me, it&#8217;s easily the most difficult decision I&#8217;ve ever faced in my life.</p>
<p>On one hand, there&#8217;s the opportunity to work for a corporation, draw a handsome salary and help millions of people <em>today</em> by writing great software. On the other hand, there&#8217;s the opportunity to spend the next 5 years of my life with just enough money to survive on ramen, working on a really hard problem no one knows the solution to and derive satisfaction from the fact that my work <em>might</em> help millions of people <em>tomorrow</em>.</p>
<p>Computer science is also one of those fields where getting a PhD doesn&#8217;t mean you <em>have </em>to become a professor. Not that I don&#8217;t enjoy teaching, as a matter of fact I <em>love</em> teaching, but it&#8217;s comforting to know that you can always go back to what you sacrificed. The fruits of research in computer science typically reach mass consumption much faster than other fields, and several silicon valley companies specifically target doctorates for recruiting. Not to mention, you could always dropout &#8212; aren&#8217;t a lot of great institutions founded that way? <img src='http://www.kix.in/blog/wp-content/plugins/smilies-themer/Silk/emoticon_wink.png' alt=';-)' class='wp-smiley' /> </p>
<p>All of this tilts the scale a bit towards PhD, but this decision requires many more months of thinking! What are your thoughts on the matter? Have you had to make such a decision? What did you choose and why?</p>
<img src="http://feeds.feedburner.com/~r/kix/~4/2XEfH3t0GWI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.kix.in/blog/2009/09/to-phd-or-not-to-phd/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		<feedburner:origLink>http://www.kix.in/blog/2009/09/to-phd-or-not-to-phd/</feedburner:origLink></item>
		<item>
		<title>Another summer at Mozilla passes by</title>
		<link>http://feeds.kix.in/~r/kix/~3/wXxYAv3kamM/</link>
		<comments>http://www.kix.in/blog/2009/09/another-summer-at-mozilla-passes-by/#comments</comments>
		<pubDate>Tue, 01 Sep 2009 03:54:52 +0000</pubDate>
		<dc:creator>Anant</dc:creator>
				<category><![CDATA[Fun]]></category>
		<category><![CDATA[Hacks]]></category>
		<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[SoC]]></category>
		<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://www.kix.in/blog/?p=516</guid>
		<description><![CDATA[My last day at Mozilla this summer was last Thursday. I didn&#8217;t take a lot of pictures this summer, because, you know, I took a lot last time around. Also, this strategy turned out pretty well because now there are more pictures of me floating around on the tubes! After a longish trans-atlantic flight, I&#8217;m [...]]]></description>
			<content:encoded><![CDATA[<p>My last day at Mozilla this summer was last Thursday. I didn&#8217;t take a lot of pictures this summer, because, you know, I <a href="http://www.flickr.com/photos/an_ant/collections/72157606477971633/">took a lot</a> last time around. Also, this strategy turned out pretty well because now there are more pictures of me floating around on the tubes! After a longish trans-atlantic flight, I&#8217;m back in Amsterdam now resuming work on my Master&#8217;s (because <a href="http://minix3.kix.in/">hacking on Minix</a> is awesome).</p>
<p>No other internship has been ever so satisfying: over the summer, I worked on a wide range of mini-projects which allowed me to exercise skills ranging from systems to application level programming. I even did a bit of work in the mobile space (turns out programming in limited memory and processing speed is a *lot* different).</p>
<p>One such project that I&#8217;m especially excited about is support for <a href="http://hg.mozilla.org/labs/jetpack/file/tip/components/experimental/video">video recording</a> in the browser. Yes, there is even a canvas-based live preview of your webcam feed, in addition to Ogg/Theora encoding support! Combined with the <a href="http://www.kix.in/blog/2009/07/audio-recording-in-the-browser/">audio recording</a> support I wrote sometime ago, some really cool applications are now possible. Skype-like dialer in the browser? Why not?! (*hint* anyone is free to send in a patch for multiplexing the audio and video, they&#8217;re currently two separate Vorbis and Theora streams *hint*).</p>
<p>We also had 3 major releases for Weave during the summer: 0.4, 0.5 and 0.6. The last one was especially big, given the completely new, HTML based UI (big kudos to <a href="http://twitter.com/thunder/">thunder</a> for pulling it off!) and a bunch of other performance fixes. Also, the web UI I wrote <a href="http://www.kix.in/blog/2008/06/week-3-web-client-for-weave/">last year</a> underwent so many great changes by the wonderful folks at <a href="http://www.glaxstar.com/">Glaxstar</a>. Now we&#8217;re putting up a <a href="http://design-challenge.mozilla.com/fall09/">community design challenge</a> to revamp the UI so we can ship the thing! (*hint* if you&#8217;re good at UI design you should participate in the challenge *hint*).</p>
<p>There&#8217;s so many more cool things I worked on that I&#8217;d like to talk about, but perhaps they deserve a separate blog post. Soon&#8230; (I keep promising myself that I should blog more often, it never works).</p>
<p>To add the already good times, my two students in the <a href="http://www.kix.in/soc/">Summer of Code</a> this year passed with flying colors. Yay!</p>
<img src="http://feeds.feedburner.com/~r/kix/~4/wXxYAv3kamM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.kix.in/blog/2009/09/another-summer-at-mozilla-passes-by/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.kix.in/blog/2009/09/another-summer-at-mozilla-passes-by/</feedburner:origLink></item>
	</channel>
</rss><!-- Dynamic Page Served (once) in 5.087 seconds --><!-- Cached page served by WP-Cache -->
