thefoundationhttp://www.thefoundation.de2010-08-23T01:30:22Z(c) 2010 Michael Kurze, Aachen, GermanyDiaspora — Can the Social Graph be Our Web of Trust?2010-08-23T01:30:22ZMichael Kurzehttp://www.thefoundation.de/about/michaeldiaspora-and-the-web-of-trust<p>On Friday we had Max, Ilya and Raphael from <a href="http://www.joindiaspora.com" title="Diaspora Project Site">Diaspora</a> over at Mozilla. They <a href="http://tieguy.org/blog/2010/08/20/notes-on-diaspora-talk/" title="Luis Villa’s Notes on the Diaspora Talk">talked</a> about their effort in creating a distributed social network. Where I think they are on the right track, and where they should think even bigger.</p><h3>Why we need Diaspora</h3> <p> Personally, I see three major challenges that everyone passionate about the <a href="http://www.mozilla.org/about/manifesto.en.html" title="Principles of the Open Web, as outlined by the Mozilla Manifesto">open internet</a> needs to make up their mind about: </p> <ul style="margin-bottom:0.5em; margin-top:0.3em; padding-top: 0;"> <li><em>The <a href="http://googlepublicpolicy.blogspot.com/2010/08/joint-policy-proposal-for-open-internet.html" title="Google Public Policy on the Verizon deal">erosion</a> of <a href="http://dig.csail.mit.edu/2006/06/neutralnet.html" title="Daniel Weitzner: The neutral internet">Net Neutrality</a></em></li> <li><em>Participants <a href="http://futureoftheinternet.org/" title="The Future of the Internet and How to Stop it by Jonathan Zittrain">switching to closed</a> environments of apps and appliances, becoming mere consumers (*)</em> </li> <li><em>People entrusting their personal data and social activity to Facebook, forced to <a href="http://www.geekymomblog.com/2010/05/18/the-facebook-dilemma/" title="Geeky Mom on the Facebook dilemma">choose</a> between control and connectedness</em></li> </ul> <p>In the context of the Diaspora talk, I’ll focus on the third issue.</p> <p>We need Diaspora because people need to be in control over with whom they share personal information. Every time Facebook <a href="http://www.aclunc.org/issues/technology/blog/facebook_places_check_this_out_before_you_check_in.shtml" title="http://arstechnica.com/web/news/2010/08/privacy-groups-facebook-already-facing-off-over-places.ars">sneaks in</a> a new default that breaks privacy, we grudgingly change the settings again — and stay, not wanting to lose our friends. Or we just don’t know about it and leave it as it is. Combined with the social monopoly that Facebook has established, this makes privacy and security optional features, subject to change like any other.</p> <h3>How Diaspora can help already</h3> <p> The main distinguishing factor of Diaspora compared to Facebook et al. is in that it decouples your social graph from the network provider, bringing back real competition to the social space. Like with E-Mail, there can be lots of network providers, loosely connected over push-interfaces. Whenever a pod (the equivalent to an e-mail-provider in Diaspora) should violate your trust, you can just switch to another one, or set up your own pod. </p> <h3>What could be done better</h3> <p> On the downside, this means that you have to trust your pod as well as all your friend’s pods. <em>No big deal?</em> Well, where the same server software is used on a distributed network, it is very prone to exploit of <a href="http://en.wikipedia.org/wiki/Sendmail#History_of_vulnerabilities" title="History of Vulnerabilities in the popular mail server sendmail">vulnerabilities</a> due to patch delay and misconfiguration (correctly setting up <abbr title="Transport Layer Security">TLS</abbr> is still a big challenge, <a href="http://www.theinquirer.net/inquirer/news/1727426/us-government-fails-secure-websites" title="The Inquirer: DHS fails to secure its website">not only</a> for regular people). </p> <p> <a href="http://en.wikipedia.org/wiki/HTTP_Secure" title="Wikipedia on HTTPS">Secure HTTP</a> is great when a large, anonymous group of people needs to trust a central service. It allows us to do online banking and purchases, free from eavesdropping and man-in-the-middle attacks. However, it is not peer-to-peer: When you fetch your mail over a secure IMAP connection, you might be sure that your password is protected, but you do not know who actually sent you that e-mail (think about it: that is the reason why phishing works). When you get it from Google Mail, you might be using TLS, but Google is still able to read your every conversation. </p> <h3>How PGP can solve this</h3> <p> I propose that Diaspora pods should be dumb post boxes that <em>are not able</em> to actually look into status updates, private messages, friend lists and so on. <em>How?</em> The technology for that has been available for quite some time and is called <a href="http://www.pgpi.org/doc/pgpintro/" title="Introduction to PGP">PGP</a>. </p> <p> Basically, PGP allows you to send and receive messages that cannot be decrypted by the servers that route them. So, if you were to encrypt your message inside your browser, you would establish secure end-to-end communication. No need to trust the shady pods that some of your friends decided to use, not knowing any better. <em>But encryption in a web client? That sounds awfully slow!</em> Well, <a href="https://addons.mozilla.org/z/en-US/firefox/addon/10868/privacy/" title="Firefox Sync (aka Weave)">Firefox Sync</a> does it already with your entire browsing history (the pass phrase to your key is never sent to the server), and I would imagine that JavaScript interpreters have become fast enough to emulate the cryptographic capabilities of a PC from 1991. </p> <p>I do have ideas on how to approach search and incremental profile updates with this, and on the new security considerations that apply here (Can you always trust your browser? Could a pod not make you use an insecure web client that transmits your passphrase?). However, that is rather technical, possibly material for a follow up post. </p> <h3>The social network is a key signing party</h3> <p> The problem with PGP has always been that people have been unable to exchange public keys in a manner that is both trustworthy and extensive. Because a <a href="http://en.wikipedia.org/wiki/Web_of_trust" title="Wikipedia on the Web of Trust">web of trust</a> can often not be established, people refrain from using encrypted e-mail. Turns out that social networks come with a mechanism that is just made for this: <em>Friending</em>. In the secure social network, accepting a friend request would be equivalent to exchanging keys. Usually you are referred to friends from people you already know, so there already is a basic level of trust. </p> <p> This means that online social networks can be transformed from a jeopardy to our security to a vehicle of the same. This idea is of course also <a href="http://serendipity.ruwenzori.net/index.php/2009/03/18/pgp-web-of-trust-meets-modern-social-networking" title="PGP web of trust meets modern social networking by Jean-Marc Liotier">not entirely new</a>. What might be new is the idea of building the social web entirely on top of PGP rather than just integrating that as an optional feature. </p> <h3>Any Comments?</h3> <p>I have not gotten around to add Commenting or Pingback to this blog, but I would love to incorporate any (links to) comments in a follow up post, please write to michael at this domain.</p> <h3>Update:</h3> <p> If I understand correctly, the diaspora guys are already planning to use GPG for cryptography <a href="http://www.joindiaspora.com/2010/04/21/a-little-more-about-the-project.html" title="Diaspora Blog: A little more about the project">somewhere</a>. This is a pretty good start. If they really already plan on generating keys for everyone, then they would only need to pull the actual encryption into the web client. </p> <p style="font-size: 85%;"><em>(*) Like any intern at Mozilla I had the opportunity to to talk to John Lilly, and I got the impression that Mozilla takes this development very seriously.</em></p>It appears I was wrong2009-04-08T23:18:11ZMichael Kurzehttp://www.thefoundation.de/about/michaelit-appears-i-was-wrong<p>Yesterday, Google <a href="http://googleappengine.blogspot.com/2009/04/seriously-this-time-new-language-on-app.html" title="Seriously this time, the new language on App Engine: Java™">announced</a> the availability of Java as the new programming language for the App Engine, refuting <a href="http://www.thefoundation.de/michael/2008/sep/21/javascript-next-app-engine-language/" title="Is JavaScript The Next App Engine Language?">my guess</a> from last year that it might be JavaScript &mdash; though of course, not entirely.</p><p> If you take the demand of the users into account, Java is of course the right choice as the next language. It might just alienate lots of Java-Developers if a niche language of the server zoo such as JavaScript was to emerge first. Additionally, Java is one Step short of full (albeit sandboxed) <abbr title="Java Virtual Machine">JVM</abbr> support. </p> <p> To allow for sandboxing, Google wraps some of its own <abbr title="Application Programmer Interface">API</abbr>'s into Java SE or <abbr title="Java Specification Request">JSR</abbr>–standardized services such as <tt>javax.mail</tt> and <tt>java.net.URL</tt>. Also, there is a <a href="http://code.google.com/appengine/docs/java/jrewhitelist.html" title="The JRE Class White List">white-list</a> currently containing 1323 of the 3700+ <a title="Overview (Java Platform SE 6)" href="http://java.sun.com/javase/6/docs/api/">Java SE 6</a> classes. Most of the classes that are not available are from the Swing and AWT suites which a web developer will not need anyway. Instead, Google provides the homebrewn <abbr title="Google Web Toolkit">GWT</abbr>. </p> <p> Thanks to the free and open source <a href="http://www.mozilla.org/rhino/" title="Mozilla Rhino: JavaScript for Java">Rhino</a> JavaScript Interpreter written in Java, server side JavaScript on the App Engine is rather easy to achieve now. I guess I might have to check it out and report back about it later, so I just signed up for the Java technology preview on my App Engine account. </p> <p>There are <a title="Campfire One: App Engine Redux" href="http://www.youtube.com/view_play_list?p=DFDBB63922B90A70">some videos</a> from the Google Campfire event over at Youtube. Most of the time they are rather interesting, plus Kevin Gibbs does a pretty decent imitation of Steve Jobs during the presentation (voluntary or not).</p> Is JavaScript The Next App Engine Language?2008-09-21T04:00:28ZMichael Kurzehttp://www.thefoundation.de/about/michaeljavascript-next-app-engine-language<p>As <em>the</em> language of the browser, JavaScript has become a kind of common denominator among web programmers. On the server it is rare compared to Java, PHP, Ruby or Python. Could this change, since Google has built an implementation of JS <em>and</em> an affordable yet scalable web application infrastructure?</p><h2>Scripting Language of The Open Web</h2> <p> JavaScript was created as a scripting language for the Netscape 2.0 browser. Other than its namesake Java, it has remained in the browser since then. Web Developers know this language because they have to use it, no matter if they like it. Throughout the late 90s and well into this decade, JavaScript was mostly regarded as a toy language for silly effects and simple form checks. Due to the more recent experience with Ajax applications and the resulting thorough coverage in technical literature, the users of JavaScript have become more professional. </p> <h2>The Server Domain</h2> <p> The development on the server side has &mdash; with some notable exceptions &mdash; ignored the language JavaScript for many years. Perl was a dominant language in the early days. Then, PHP gained momentum in the fast growing developer community during the internet bubble due to its gentle learning curve, the simple integration with MySQL and <em>the overwhelming availability of inexpensive shared hosting</em>. You could say that in its ubiquity, PHP has mimicked JavaScript, only on the server. <br /> Other languages and tool chains have gained momentum since then, most notably Ruby, Java and Python. They are not as affordable as PHP (except Python on the App Engine), and seem to be used mostly because of their modern <abbr="Model, View, Controller">MVC</abbr> frameworks. </p> <h3>Why JavaScript Is Not Popular on The Server</h3> <p> JavaScript has some fundamental weaknesses that have inhibited its inception as a server side programming language: </p> <ul class="block"> <li>JavaScript, &mdash; or rather ECMAScript &mdash; has no real standard library, it is just a language. There are no tools for file or process manipulation. There are no database bindings and there is no shared memory. There is no way to open a socket.</li> <li>In the past, JavaScript Interpreters have not been known for their performance. Anyone who has seen the message <q>A script on this page may cause Firefox to run slow.</q> would think twice before writing an application in JavaScript.</li> </ul> <p> The <a href="http://dev.helma.org/">Helma</a> framework tries to address the first issue by using the Rhino Interpreter, making the Java SDK available to the JavaScript programmer. The second issue is at least partially resolved as some performance intensive tasks are moved to Java. In Java 6, Rhino is even bundled with Java. Nevertheless Helma and similar integration efforts are not very popular, compared to Rails or Struts. A reason for this might be that Java for the web (the <em>enterprise edition</em>) is a very serious business, while the perception of JavaScript has long been ...well, the opposite of serious. The two cultures do not seem to mix well yet, as good as the technologies might blend. </p> <h3>Why The App Engine Loves JavaScript</h3> <p> When Guido van Rossum adopted Python for the Google App Engine, he had to remove lots of features because they would not work with the sandboxed, replicating environment which is the App Engine. It turns out that the limitations of JavaScript really make it an ideal candidate for the App Engine. </p> <ul class="block"> <li>JavaScript is just a language: It cannot create sockets, files or processes. App Engine does not allow for that anyway, so this is a plus!</li> <li>The language is easily sandboxed. Web Browsers have to do this all the time. This is ideal for a shared hosting environment.</li> <li>It has a no database bindings included, but a natural serialization format, <a href="http://www.json.org" title="JavaScript Object Notation">JSON</a>. This is great for the Google Data Store, because it stores objects, not table rows.</li> <li>Recently, JavaScript Interpreters (or, lets say <em>JavaScript Machines</em>) have become fast. There is <a href="http://code.google.com/p/v8/" title="">V8</a> and it is fast.</li> </ul> <p> It is known (at least since Guido van Rossums talk at DjangoCon 2008) that Google plans to adopt more languages for the app engine. Also, there are four primary languages that Google uses for development: Python, Java, C++ and JavaScript. Python is already available. Java is a good candidate for the App Engine, but it is not exactly lightweight certainly not <em>shared nothing</em>. C++ is probably the opposite of any sandboxable language. </p> <p> In combination with a template engine, a free offer on the App Engine might give the already ubiquitous JavaScript language a final boost. The prospect of <em>one language</em> from model definition to client side computation is certainly compelling! </p> <p> To encourage further speculations: With Google's V8 machine comes an embedding, <tt>process.cc</tt>, that contains <q>code necessary to extend a hypothetical HTTP request processing application - which could be part of a web server, for example (...)</q> (<cite><a href="http://code.google.com/apis/v8/samples.html" title="Sample Code &mdash; V8 JavaScript Engine Documenation">V8 Documentation</a></cite>). </p>