<?xml version="1.0"?>

<rss version="2.0">
  <channel>
    <title>Imperialviolet</title>
    <link>http://www.imperialviolet.org</link>
    <description>Adam Langley's Weblog</description>
    <language>en-us</language>
    <lastBuildDate>Thu, 14 Aug 2008 00:32:13 BST</lastBuildDate>
<item><link>http://imperialviolet.org/page30.html#e595</link><pubDate>Wed, 13 Aug 2008 23:32:03 GMT</pubDate><title>Entry 595</title><link>http://imperialviolet.org/page30.html#e595</link><description>
&lt;p&gt;Several groups of Linux kernel papers have been published recently. Here's
my pick of them:&lt;/p&gt;

&lt;p&gt;First we have the &lt;a href=&quot;http://ols.fedoraproject.org/OLS/Reprints-2008/&quot;&gt;Proceedings of the 2008 Linux Symposium&lt;/a&gt; (these are in some order of order, favourite first):&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;http://ols.fedoraproject.org/OLS/Reprints-2008/mckenney-reprint.pdf&quot;&gt;'Real Time' vs. 'Real Fast': How to Choose?&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://ols.fedoraproject.org/OLS/Reprints-2008/bencohen-reprint.pdf&quot;&gt;Korset: Automated, Zero False-Alarm Intrusion Detection for the Linux Kernel&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://ols.fedoraproject.org/OLS/Reprints-2008/hwang-reprint.pdf&quot;&gt;Low Power MPEG4 Player&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://ols.fedoraproject.org/OLS/Reprints-2008/gupta-reprint.pdf&quot;&gt;I/O Containment&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://ols.fedoraproject.org/OLS/Reprints-2008/lameter-reprint.pdf&quot;&gt;Bazillions of pages: The future of memory management under Linux&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://ols.fedoraproject.org/OLS/Reprints-2008/hallyn-reprint.pdf&quot;&gt;Linux capabilities: making them work&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://ols.fedoraproject.org/OLS/Reprints-2008/babulal-reprint.pdf&quot;&gt;Keeping The Linux Kernel Honest (Testing Kernel.org kernels)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Next there's the &lt;a href=&quot;http://portal.acm.org/toc.cfm?id=1400097&quot;&gt;ACM SIGOPS Operating Systems Review&lt;/a&gt;. These papers are about much more experimental developments in the kernel and are thus more fun, even if they are less likely to see the light of day:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;http://portal.acm.org/ft_gateway.cfm?id=1400100&amp;type=pdf&amp;coll=GUIDE&amp;dl=GUIDE&amp;CFID=81846787&amp;CFTOKEN=53948882&quot;&gt;Extending futex for kernel to user notification&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://portal.acm.org/ft_gateway.cfm?id=1400104&amp;type=pdf&amp;coll=GUIDE&amp;dl=GUIDE&amp;CFID=81846787&amp;CFTOKEN=53948882&quot;&gt;PipesFS: fast Linux I/O in the unix tradition&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://portal.acm.org/ft_gateway.cfm?id=1400101&amp;type=pdf&amp;coll=GUIDE&amp;dl=GUIDE&amp;CFID=81846787&amp;CFTOKEN=53948882&quot;&gt;Plan 9 authentication in Linux&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description></item><item><link>http://imperialviolet.org/page30.html#e594</link><pubDate>Wed, 13 Aug 2008 18:17:22 GMT</pubDate><title>Entry 594</title><link>http://imperialviolet.org/page30.html#e594</link><description>
&lt;p&gt;I've just &lt;a href=&quot;http://code.google.com/p/curve25519-donna/&quot;&gt;released&lt;/a&gt;
two new &lt;a href=&quot;http://cr.yp.to/ecdh.html&quot;&gt;curve25519&lt;/a&gt; implementations: one
in C and one in x86-64 assembly. The latter is 10% faster than djb's
implementation.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://cr.yp.to/ecdh.html&quot; rel=&quot;nofollow&quot;&gt;curve25519&lt;/a&gt; is an elliptic curve, developed by &lt;a href=&quot;http://cr.yp.to/djb.html&quot; rel=&quot;nofollow&quot;&gt;Dan Bernstein&lt;/a&gt;, for fast &lt;a href=&quot;http://en.wikipedia.org/wiki/Diffie-Hellman&quot; rel=&quot;nofollow&quot;&gt;Diffie-Hellman&lt;/a&gt; key agreement. DJB&amp;#x27;s &lt;a href=&quot;http://cr.yp.to/ecdh.html&quot; rel=&quot;nofollow&quot;&gt;original implementation&lt;/a&gt; was written in a language of his own devising called &lt;a href=&quot;http://cr.yp.to/qhasm.html&quot; rel=&quot;nofollow&quot;&gt;qhasm&lt;/a&gt;. The original qhasm source isn&amp;#x27;t available, only the x86 32-bit assembly output. &lt;/p&gt;&lt;p&gt;Since many x86 systems are now 64-bit, and portability is important, this project provides alternative implementations for other platforms. &lt;/p&gt;&lt;p&gt;&lt;table&gt;&lt;tr&gt;&lt;td style=&quot;border: 1px solid #aaa; padding: 5px;&quot;&gt; &lt;strong&gt;Implementation&lt;/strong&gt; &lt;/td&gt;&lt;td style=&quot;border: 1px solid #aaa; padding: 5px;&quot;&gt; &lt;strong&gt;Platform&lt;/strong&gt; &lt;/td&gt;&lt;td style=&quot;border: 1px solid #aaa; padding: 5px;&quot;&gt; &lt;strong&gt;Author&lt;/strong&gt; &lt;/td&gt;&lt;td style=&quot;border: 1px solid #aaa; padding: 5px;&quot;&gt; &lt;strong&gt;32-bit speed&lt;/strong&gt; &lt;/td&gt;&lt;td style=&quot;border: 1px solid #aaa; padding: 5px;&quot;&gt; &lt;strong&gt;64-bit speed&lt;/strong&gt; &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td style=&quot;border: 1px solid #aaa; padding: 5px;&quot;&gt; &lt;tt&gt;curve25519&lt;/tt&gt; &lt;/td&gt;&lt;td style=&quot;border: 1px solid #aaa; padding: 5px;&quot;&gt; x86 32-bit &lt;/td&gt;&lt;td style=&quot;border: 1px solid #aaa; padding: 5px;&quot;&gt; &lt;tt&gt;djb&lt;/tt&gt; &lt;/td&gt;&lt;td style=&quot;border: 1px solid #aaa; padding: 5px;&quot;&gt; 265µs &lt;/td&gt;&lt;td style=&quot;border: 1px solid #aaa; padding: 5px;&quot;&gt; N/A &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td style=&quot;border: 1px solid #aaa; padding: 5px;&quot;&gt; &lt;tt&gt;curve25519-donna-x86-64&lt;/tt&gt; &lt;/td&gt;&lt;td style=&quot;border: 1px solid #aaa; padding: 5px;&quot;&gt; x86 64-bit &lt;/td&gt;&lt;td style=&quot;border: 1px solid #aaa; padding: 5px;&quot;&gt; &lt;tt&gt;agl&lt;/tt&gt; &lt;/td&gt;&lt;td style=&quot;border: 1px solid #aaa; padding: 5px;&quot;&gt; N/A &lt;/td&gt;&lt;td style=&quot;border: 1px solid #aaa; padding: 5px;&quot;&gt; 240µs &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td style=&quot;border: 1px solid #aaa; padding: 5px;&quot;&gt; &lt;tt&gt;curve25591-donna&lt;/tt&gt; &lt;/td&gt;&lt;td style=&quot;border: 1px solid #aaa; padding: 5px;&quot;&gt; Portable C &lt;/td&gt;&lt;td style=&quot;border: 1px solid #aaa; padding: 5px;&quot;&gt; &lt;tt&gt;agl&lt;/tt&gt; &lt;/td&gt;&lt;td style=&quot;border: 1px solid #aaa; padding: 5px;&quot;&gt; 2179µs &lt;/td&gt;&lt;td style=&quot;border: 1px solid #aaa; padding: 5px;&quot;&gt; 628µs &lt;/td&gt;&lt;/tr&gt; &lt;/table&gt;&lt;/p&gt;&lt;p&gt;(All tests run on a 2.33GHz Intel Core2) &lt;/p&gt;
</description></item><item><link>http://imperialviolet.org/page30.html#e593</link><pubDate>Tue, 08 Jul 2008 04:55:00 GMT</pubDate><title>Entry 593</title><link>http://imperialviolet.org/page30.html#e593</link><description>
&lt;p&gt;Google has, at last, open sourced &lt;a href=&quot;http://code.google.com/p/protobuf/&quot;&gt;Protocol buffers&lt;/a&gt;. My, very minor contribution to this is that I wrote the basis for the &lt;a href=&quot;http://code.google.com/apis/protocolbuffers/docs/encoding.html&quot;&gt;encoding documentation&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Protocol buffers pretty much hit the sweet spot of complexity and capability. (See XML and ASN.1 for examples of attempts which missed.) I have the beginnings of a protocol buffer compiler for Haskell that I wrote for internal apps. Now that the C/Java/Python versions are out, I should probably clean that up and put it on Hackage. But every coder should consider protocol buffers for their serialisation needs from now on.&lt;/p&gt;
</description></item><item><link>http://imperialviolet.org/page30.html#e592</link><pubDate>Wed, 02 Jul 2008 03:31:14 GMT</pubDate><title>Entry 592</title><link>http://imperialviolet.org/page30.html#e592</link><description>
&lt;p&gt;Firstly, if you're wondering what happened to all the ObsTCP stuff, it didn't disappear, it just moved &lt;a href=&quot;http://obstcp.blogspot.com&quot;&gt;to a different blog&lt;/a&gt;. Things are still moving as fast as I can push them.&lt;/p&gt;

&lt;h6&gt;The Black Swan&lt;/h6&gt;

&lt;p&gt;(&lt;i&gt;ISBN: 1400063515&lt;/i&gt;)&lt;/p&gt;

&lt;p&gt;This book has some good, if unoriginal, points about the stupidity of much of the modeling done in today's world, esp the world of finance. Sadly, these are hidden in many pages of self-centered rambling and discourse on adventitious topics. If you're thinking of buying this book, get The (Mis)behaviour of Markets by Mandelbrot instead; you'll thank me.&lt;/p&gt;
</description></item><item><link>http://imperialviolet.org/page30.html#e591</link><pubDate>Wed, 11 Jun 2008 20:00:39 GMT</pubDate><title>Entry 591</title><link>http://imperialviolet.org/page30.html#e591</link><description>
&lt;p&gt;I've added a bunch of Obsfucated TCP stuff to the &lt;a href=&quot;http://code.google.com/p/obstcp/&quot;&gt;obstcp project page&lt;/a&gt; &lt;tt&gt;code.google.com&lt;/tt&gt; include kernel patches, userland tools, specs and friendly introductions.&lt;/p&gt;

&lt;p&gt;Also, I &lt;a href=&quot;http://www.reddit.com/r/programming/info/6mz7x/comments/&quot;&gt;posted it to Reddit&lt;/a&gt;. If it doesn't get downvoted into /dev/null in 60 seconds, the comments will probably end up there.&lt;/p&gt;
</description></item><item><link>http://imperialviolet.org/page30.html#e590</link><pubDate>Tue, 27 May 2008 16:52:20 GMT</pubDate><title>Entry 590</title><link>http://imperialviolet.org/page30.html#e590</link><description>
&lt;h6&gt;OpenID - not actually spawn of Satan&lt;/h6&gt;

&lt;p&gt;A &lt;a href=&quot;http://idcorner.org/2007/08/22/the-problems-with-openid/&quot;&gt;blog
post aggregating complaints about OpenID&lt;/a&gt; has been popping up in different
places this morning. If you've read it, you might want a little perspective.
I'm not going to deal with each point in turn because there's so many, mostly
repeating each other.&lt;/p&gt;

&lt;h6&gt;Phishing&lt;/h6&gt;

&lt;p&gt;At login time, the site that you're logging into can end up redirecting you
  to your OpenID provider. Your provider then tells you to go to their site and
  enter your login information, then click a button to try again. They don't
  provide a &quot;link&quot; to their site and they don't ask for your password.&lt;/p&gt;

&lt;p&gt;Some early providers might not have followed these basic steps, but all &lt;a
href=&quot;https://www.myopenid.com/&quot;&gt;the reasonable ones&lt;/a&gt; do.&lt;/p&gt;

&lt;p&gt;Yes, it's still possible for users to be confused but, by habit they'll be
used to doing to right thing.&lt;/p&gt;

&lt;h6&gt;XSS and CSRF&lt;/h6&gt;

&lt;p&gt;XSS problems on the providers site are a big deal. This criticism is
reasonable.&lt;/p&gt;

&lt;p&gt;CSRF may be a bigger deal because you are more likely to be 'logged in' to
the target. However, most users already keep persistent cookies to save logging
into these sites. The additional attack surface here is dubious; CSRF issues
are a problem with or without OpenID.&lt;/p&gt;

&lt;h6&gt;DNS poisoning&lt;/h6&gt;

&lt;p&gt;If your OpenID starts with &lt;tt&gt;https://&lt;/tt&gt;, you should be protected from
DNS poisoning attacks and the like by the usual TLS PKI. This isn't perfect,
but it's pretty good.&lt;/p&gt;

&lt;p&gt;However, the OpenID spec says that plain domain names are normalised by
prepending &lt;tt&gt;http://&lt;/tt&gt;. This is a technical problem with the spec and
should be fixed. Until then, this is a reasonable criticism but not a
fundamental issue.&lt;/p&gt;

&lt;h6&gt;Privacy&lt;/h6&gt;

&lt;p&gt;The OpenID provider has a lot of information about your activities. This is
little different than, say, your email account and many people are happy with
Gmail. Likewise, password recovery on most of the sites which could use OpenID
is based on email access, so most people already have a single password that
suffices for entry to many sites.&lt;/p&gt;

&lt;p&gt;If you don't like the idea of Gmail you can run your own email server.
Likewise, you can run your own OpenID provider.&lt;/p&gt;

&lt;p&gt;Using the same OpenID on many sites does allow them to link your activities.
So does giving these sites your email address for password recovery. So does
using the same IP (although to a lesser extent).&lt;/p&gt;

&lt;p&gt;Some providers will let you have many OpenIDs linked to the same account for
this reason. Joe user probably won't use that feature and probably gives the
same email address to all those sites already and so looses nothing.&lt;/p&gt;

&lt;h6&gt;Trust problems&lt;/h6&gt;

&lt;p&gt;OpenID is not a trust system. Trust systems may be built on top of identity
systems. Likewise, apples are not oranges and complaints about their lack of
tangyness are moot.&lt;/p&gt;

&lt;h6&gt;Usability / Adoption&lt;/h6&gt;

&lt;p&gt;Somewhat valid points here. It's a big job to get widespread adoption and,
at the moment, it's a pretty small crowd that uses OpenID. However, OpenID
doesn't need a flag day; it can have incremental deployment.&lt;/p&gt;

&lt;h6&gt;Availability&lt;/h6&gt;

&lt;p&gt;Valid points. If your provider goes down you're going to have a bad day.&lt;/p&gt;

&lt;h6&gt;Conclusion&lt;/h6&gt;

&lt;p&gt;I don't believe that OpenID should be used to login to your bank account.
However, for the myriad of sites that I login to (Google Reader, reddit, ...)
it would be nice to just be able to type my OpenID in. It's decently suited to
that because I'm fed up with all these accounts.&lt;/p&gt;
</description></item><item><link>http://imperialviolet.org/page30.html#e589</link><pubDate>Wed, 21 May 2008 03:48:46 GMT</pubDate><title>Entry 589</title><link>http://imperialviolet.org/page30.html#e589</link><description>
&lt;p&gt;I'm now running a Ubuntu based laptop with a somewhat functions Obsfucated TCP patch in its kernel. (If you have a Neo like view of the Internets you'll be able to see it by the funny options in the SYN packets.)&lt;/p&gt;

&lt;p&gt;Hopefully soon I'll be able to post a first draft patch for other people to try. In the mean time, I wrote the start of the mounds of documentation I suspect it'll need: &lt;a href=&quot;http://code.google.com/p/obstcp/wiki/Introduction&quot;&gt;a very non-technical introduction&lt;/a&gt;.&lt;/p&gt;
</description></item><item><link>http://imperialviolet.org/page30.html#e588</link><pubDate>Thu, 01 May 2008 03:55:31 GMT</pubDate><title>Entry 588</title><link>http://imperialviolet.org/page30.html#e588</link><description>
&lt;p&gt;I've updated the patches linked to in the last post with today's work. Both
sides now end up with the same shared key (and not just because they got the
same private key from lack of entropy like before). That took some fun tracking
down of bugs.&lt;/p&gt;

&lt;p&gt;Also, packets are now HMAC-MD5'ed with the shared key, and invalid packets
are dropped. That also took far longer than expected. I ended up using the MD5
implementation from the CIFS filesystem because the kernel's crypto library is
just plain terrible. It's also totally undocumented but, from what I can see,
you can't lookup an algorithm without taking a semaphore, and that requires
that you be able to sleep. I almost think I must be missing something because
that's dumber than the bastard offspring of Randy Hickey and Jade Goodie.&lt;/p&gt;

&lt;p&gt;But there we go. Encryption (with Salsa20) to come next Wednesday.&lt;/p&gt;
</description></item><item><link>http://imperialviolet.org/page30.html#e587</link><pubDate>Thu, 24 Apr 2008 03:20:41 GMT</pubDate><title>Entry 587</title><link>http://imperialviolet.org/page30.html#e587</link><description>
&lt;h6&gt;First Obsfucated TCP patches&lt;/h6&gt;

&lt;p&gt;After a day of kernel hacking, I have a few patches which, together, make a
start towards implementing ObsTCP.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Add support for Jumbo TCP options, as documented &lt;a href=&quot;/binary/jumbo-tcp-options.html&quot;&gt;here&lt;/a&gt;: &lt;a href=&quot;/binary/obstcp/tcp-jumbo-options&quot;&gt;&lt;tt&gt;tcp-jumbo-options.patch&lt;/tt&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Add curve25519: &lt;a href=&quot;/binary/obstcp/curve25519&quot;&gt;&lt;tt&gt;curve25519.patch&lt;/tt&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;Some ObsTCP work: &lt;a href=&quot;/binary/obstcp/tcp-obsfucated-tcp&quot;&gt;&lt;tt&gt;tcp-obsfucated-tcp.patch&lt;/tt&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;At the moment, it will advertise ObsTCP on all connections and, if you have
two kernels which support it, you'll get a shared key setup. At the moment, the
private key is generated at boot time and since the host doesn't have any
entropy then, it's always the same. So I'll have to do something special there.
Also, I've a problem where the ACK with the connecting host's public key can
get lost. Since ACKs aren't ACKed, this can be a real pain. I think I need to
include it in every transmitted packet until (yet another) option signifies
that it's been received.&lt;/p&gt;
</description></item><item><link>http://imperialviolet.org/page30.html#e586</link><pubDate>Wed, 16 Apr 2008 22:13:37 GMT</pubDate><title>Entry 586</title><link>http://imperialviolet.org/page30.html#e586</link><description>
&lt;p&gt;After the last post explained why small curves aren't good enough for obsfucated TCP, I decided that, since I'm going to have to do some damage to the TCP header to get a bigger public key in there anyway, I might as well go the whole way and use &lt;a href=&quot;http://cr.yp.to/ecdh.html&quot;&gt;curve25519&lt;/a&gt;, by djb. Now, djb has forgotten more about elliptic curves than I'll ever know and I feel much happier using a curve that's been designed by him. As you can probably guess from the name, it's a curve over 2&lt;sup&gt;255&lt;/sup&gt;-19 - a prime. So the public keys are 32 bytes long.&lt;/p&gt;

&lt;p&gt;In order to get that much public key material into a TCP header, here's my proposed hack: &lt;a href=&quot;/binary/jumbo-tcp-options.html&quot;&gt;Jumbo TCP options&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;djb's sample implementation of curve25519 is written in a special assembly language called &lt;a href=&quot;http://cr.yp.to/qhasm.html&quot;&gt;qhasm&lt;/a&gt;. Sadly, it's so alpha that he's not actually released it. So the sample implementation is for ia32 only, uses the floating point registers and has 5100 lines of uncommented assembly. It is, however, freaking quick.&lt;/p&gt;

&lt;p&gt;However, since I have kernel-space in mind for this I've written a C implementation. It's about 1/3 the speed (and I've not really tried to optimise it yet), doesn't use any floating point (since kernel-space doesn't have easy access to the fp registers in Linux) and fuzz testing seems to indicate that it's correct. (At least, it's giving the same answers as djb's code.)&lt;/p&gt;

&lt;p&gt;Next step: hacking up the kernel. (And I thought the elliptic curve maths was hard enough.)&lt;/p&gt;
</description></item></channel></rss>