<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">

 <title>ImperialViolet</title>
 <link href="http://www.imperialviolet.org/iv-rss.xml" rel="self"/>
 <link href="http://www.imperialviolet.org/"/>
 <updated>2012-04-12T09:16:15-07:00</updated>
 <id>http://www.imperialviolet.org/</id>
 <author>
   <name>Adam Langley</name>
 </author>

 
 <entry>
   <title>False Start's Failure</title>
   <link href="http://www.imperialviolet.org/2012/04/11/falsestart.html"/>
   <updated>2012-04-11T00:00:00-07:00</updated>
   <id>http://www.imperialviolet.org/2012/04/11/falsestart</id>
   <content type="html">&lt;a&gt;Eighteen months ago(ish), &lt;a href=&quot;http://www.imperialviolet.org/2010/09/05/blacklisting.html&quot;&gt;Chrome started&lt;/a&gt; using &lt;a href=&quot;https://technotes.googlecode.com/git/falsestart.html&quot;&gt;False Start&lt;/a&gt;. False Start reduces the average time for an SSL handshake &lt;a href=&quot;http://blog.chromium.org/2011/05/ssl-falsestart-performance-results.html&quot;&gt;by 30%&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Since the biggest problem with transport security is that most sites don't use it, anything that reduces the latency impact of HTTPS is important. Making things faster doesn't just make them faster, it also makes them cheaper and more prevalent. When HTTPS is faster, it'll be used in more places than it would otherwise be.&lt;/p&gt;

&lt;p&gt;But, sadly, False Start will be disabled, except for sites doing &lt;a href=&quot;https://technotes.googlecode.com/git/nextprotoneg.html&quot;&gt;NPN&lt;/a&gt;, in Chrome 20. NPN is a TLS extension that we use to negotiate SPDY, although you don't have to use it to negotiate SPDY, you can advertise &lt;tt&gt;http/1.1&lt;/tt&gt; if you wish.&lt;/p&gt;

&lt;p&gt;False Start was known to cause problems with a very small number of servers and the &lt;a href=&quot;http://www.imperialviolet.org/2010/09/05/blacklisting.html&quot;&gt;initial announcement&lt;/a&gt; outlined the uncommon scheme that we used to deploy it: we scanned the public Internet and built up a list of problematic sites. That list was built into Chrome and we didn't use False Start for connections to those sites. Over time the list was randomly eroded away and I'd try to address any issues that came up. (Preemptively so in the case of large sites.)&lt;/p&gt;

&lt;p&gt;It did work to some extent. Many sites that had problems were fixed and it's a deployment scheme that is worth considering in the future. But it didn't ultimately work well enough for False Start.&lt;/p&gt;

&lt;p&gt;Initially we believed that False Start issues were deterministic so long as the TLS Finished and application data records were sent in the same TCP packet. We changed Chrome to do this in the hopes of making False Start issues deterministic. However, we later discovered some HTTPS servers that were still non-deterministically False Start intolerant. I hypothesise that the servers run two threads per connection: one for reading and one for writing. Although the TCP packet was received atomically, thread scheduling could mean that the read thread may or may not be scheduled before the write thread had updated the connection state in response to the Finished.&lt;/p&gt;

&lt;p&gt;This non-determinism made False Start intolerance difficult to diagnose and reduced our confidence in the blacklist.&lt;/p&gt;

&lt;p&gt;The `servers' with problems were nearly always SSL terminators. These hardware devices terminate SSL connections and proxy unencrypted data to backend HTTP servers. I believe that False Start intolerance is very simple to fix in the code and one vendor suggested that was the case. None the less, of the vendors who did issue an update, most failed to communicate that fact to their customers. (A pattern that has repeated with the &lt;a href=&quot;http://www.imperialviolet.org/2012/01/15/beastfollowup.html&quot;&gt;BEAST fix&lt;/a&gt;.)&lt;/p&gt;

&lt;p&gt;One, fairly major, SSL terminator vendor refused to update to fix their False Start intolerance despite problems that their customers were having. I don't believe that this was done in bad faith, but rather a case of something much more mundane along the lines of &amp;ldquo;the SSL guy left and nobody touches that code any more&amp;rdquo;. However, it did mean that there was no good answer for their customers who were experiencing problems.&lt;/p&gt;

&lt;p&gt;Lastly, it was becoming increasingly clear that we had a bigger problem internationally. Foreign admins have problems finding information on the subject (which is mostly in English) and foreign users have problems reporting bugs because we can't read them. We do have excellent agents in countries who liaise locally but it was still a big issue, and we don't cover every country with them. I also suspect that the distribution of problematic SSL terminators is substantially larger in some countries and that the experience with the US and Europe caused us to underestimate the problem.&lt;/p&gt;

&lt;p&gt;In aggregate this lead us to decide that False Start was causing more problems than it was worth. We will now limit it to sites that support the NPN extension. This unfortunately means that it'll be an arcane, unused optimisation for the most part: at least until SPDY takes over the world.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Very large RSA public exponents</title>
   <link href="http://www.imperialviolet.org/2012/03/17/rsados.html"/>
   <updated>2012-03-17T00:00:00-07:00</updated>
   <id>http://www.imperialviolet.org/2012/03/17/rsados</id>
   <content type="html">&lt;p&gt;After &lt;a href=&quot;http://www.imperialviolet.org/2012/03/16/rsae.html&quot;&gt;yesterday's post&lt;/a&gt; that advocated using RSA public exponents of 3 or 2&lt;sup&gt;16&lt;/sup&gt;+1 in DNSSEC for performance, Dan Kaminsky asked me whether there was a potential DoS vector by using &lt;i&gt;really&lt;/i&gt; big public exponents.&lt;/p&gt;

&lt;p&gt;Recall that the RSA signature verification core is &lt;i&gt;m&lt;sup&gt;e&lt;/sup&gt;&lt;/i&gt; mod &lt;i&gt;n&lt;/i&gt;. By making &lt;i&gt;e&lt;/i&gt; and &lt;i&gt;n&lt;/i&gt; larger, we can make the operation slower. But there are limits, at least in OpenSSL:&lt;/p&gt;

&lt;pre&gt;/* for large moduli, enforce exponent limit */
if (BN_num_bits(rsa-&amp;gt;n) &amp;gt; OPENSSL_RSA_SMALL_MODULUS_BITS) {
        if (BN_num_bits(rsa-&amp;gt;e) &amp;gt; OPENSSL_RSA_MAX_PUBEXP_BITS) {
                RSAerr(RSA_F_RSA_EAY_PUBLIC_ENCRYPT, RSA_R_BAD_E_VALUE);
                return -1;
        }
}&lt;/pre&gt;

&lt;p&gt;So, if &lt;i&gt;n&lt;/i&gt; is large, we enforce a limit on &lt;i&gt;e&lt;/i&gt;. The values of the #defines are such that for &lt;i&gt;n&amp;gt;&lt;/i&gt;3072 bits, &lt;i&gt;e&lt;/i&gt; must be less than or equal to 64 bits. So the slowest operations happen with an &lt;i&gt;n&lt;/i&gt; and &lt;i&gt;e&lt;/i&gt; of 3072 bits. (The fact that &lt;i&gt;e&amp;lt;n&lt;/i&gt; is enforced earlier in the code.)&lt;/p&gt;

&lt;p&gt;So I setup &lt;tt&gt;*.bige.imperialviolet.org&lt;/tt&gt;. This is a perfectly valid and well signed zone which happens to use a 3072-bit key with a 3072-bit public exponent. (I could probably have slowed things down more by picking a public exponent with lots of 1s in its binary representation, but it's just a random number in this case.) One can resolve records &lt;tt&gt;1.bige.imperialviolet.org&lt;/tt&gt;, &lt;tt&gt;2.bige.imperialviolet.org&lt;/tt&gt;, &amp;hellip; and the server doesn't have to sign anything because it's a wildcard: a single signature covers all of the names. However, the resolver validates the signature every time.&lt;/p&gt;

&lt;p&gt;On my 2.66GHz, Core 2 laptop, 15 requests per second causes &lt;a href=&quot;http://unbound.net/&quot;&gt;unbound&lt;/a&gt; to take 95% of a core. A couple hundred queries per second would probably put most DNSSEC resolvers in serious trouble.&lt;/p&gt;

&lt;p&gt;So I'd recommend limiting the public exponent size in DNSSEC to 2&lt;sup&gt;16&lt;/sup&gt;+1, except that people are already mistakenly using 2&lt;sup&gt;32&lt;/sup&gt;+1, so I guess that needs to be the limit. The DNSSEC spec &lt;a href=&quot;https://tools.ietf.org/html/rfc3110#section-2&quot;&gt;limits&lt;/a&gt; the modulus size to 4096-bits, and 4096-bit signatures are about 13 times slower to verify than the typical 1024-bit signatures used in DNSSEC. But that's a lot less of a DoS vector than &lt;tt&gt;bige.imperialviolet.org&lt;/tt&gt;, which is 2230 times slower than normal.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>RSA public exponent size</title>
   <link href="http://www.imperialviolet.org/2012/03/16/rsae.html"/>
   <updated>2012-03-16T00:00:00-07:00</updated>
   <id>http://www.imperialviolet.org/2012/03/16/rsae</id>
   <content type="html">&lt;p&gt;RSA public operations are much faster than private operations. Thirty-two times faster for a 2048-bit key on my machine. But the two operations are basically the same: take the message, raise it to the power of the public or private exponent and reduce modulo the key's modulus.&lt;/p&gt;

&lt;p&gt;What makes the public operations so much faster is that the public exponent is typically tiny, while the private exponent should be the same size as the modulus. One can actually use a public exponent of three in RSA, and clearly cubing a number should be faster than raising it to the power of a 2048-bit number.&lt;/p&gt;

&lt;p&gt;In 2006, Daniel Bleichenbacher (a fellow Googler) gave a &lt;a href=&quot;http://www.imc.org/ietf-openpgp/mail-archive/msg06063.html&quot;&gt;talk at the CRYPTO 2006 rump session&lt;/a&gt; where he outlined a bug in several, very common RSA signature verification implementations at the time. The bug wasn't nearly as bad as it could have been because it only affected public keys that used a public exponent of three and most keys used a larger exponent: 2&lt;sup&gt;16&lt;/sup&gt;+1. But the fact that a slightly larger public exponent saved these buggy verifiers cemented 2&lt;sup&gt;16&lt;/sup&gt;+1 as sensible default value for the public exponent.&lt;/p&gt;

&lt;p&gt;But there's absolutely no reason to think that a public exponent larger than 2&lt;sup&gt;16&lt;/sup&gt;+1 does any good. I even checked that with Bleichenbacher before writing this. Three should be fine, 2&lt;sup&gt;16&lt;/sup&gt;+1 saved some buggy software a couple of times and any larger is probably a mistake.&lt;/p&gt;

&lt;p&gt;Because of that, when writing the Go RSA package, I didn't bother supporting public exponents larger than 2&lt;sup&gt;31&lt;/sup&gt;-1. But then several people &lt;a href=&quot;http://code.google.com/p/go/issues/detail?id=3161&quot;&gt;reported&lt;/a&gt; that they couldn't verify some DNSSEC signatures. Sure enough, the DNSKEY records for &lt;tt&gt;.cz&lt;/tt&gt; and &lt;tt&gt;.us&lt;/tt&gt; are using a public exponent of 2&lt;sup&gt;32&lt;/sup&gt;+1.&lt;/p&gt;

&lt;p&gt;DNSSEC is absolutely the last place to use large, public exponents. Busy DNS resolvers have to resolve tens or hundreds of thousands of records a second; fast RSA signature verification is big deal in DNSSEC. So I measured the speed impact of various public exponent sizes with OpenSSL (1.0.1-beta3):&lt;/p&gt;

&lt;table&gt;
  &lt;tr&gt;&lt;th&gt;Public exponent&lt;/th&gt;&lt;th&gt;Verification time (&amp;micro;s)&lt;/th&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;3&lt;/td&gt;&lt;td&gt;10.6&lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;2&lt;sup&gt;16&lt;/sup&gt;+1&lt;/td&gt;&lt;td&gt;23.9&lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;2&lt;sup&gt;32&lt;/sup&gt;+1&lt;/td&gt;&lt;td&gt;42.7&lt;/td&gt;&lt;/tr&gt;
  &lt;tr&gt;&lt;td&gt;2&lt;sup&gt;127&lt;/sup&gt;-1&lt;/td&gt;&lt;td&gt;160.7&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;

&lt;p&gt;So a public exponent of 2&lt;sup&gt;32&lt;/sup&gt;+1 makes signature verification over four times slower than an exponent of three. As DNSSEC grows, and DNSSEC resolvers too, that extra CPU time is going to be a big deal.&lt;/p&gt;

&lt;p&gt;It looks like the zones using a value of 2&lt;sup&gt;32&lt;/sup&gt;+1 are just passing the &lt;tt&gt;-e&lt;/tt&gt; flag to BIND's &lt;tt&gt;dnssec-keygen&lt;/tt&gt; utility. There's some suggestion that &lt;tt&gt;-e&lt;/tt&gt; used to select 2&lt;sup&gt;16&lt;/sup&gt;+1 but silently changed semantics in some release.&lt;/p&gt;

&lt;p&gt;So today's lesson is &lt;b&gt;don't pass &lt;tt&gt;-e&lt;/tt&gt; to &lt;tt&gt;dnssec-keygen&lt;/tt&gt;&lt;/b&gt;! The default of &lt;tt&gt;dnssec-keygen&lt;/tt&gt; is 2&lt;sup&gt;16&lt;/sup&gt;+1 and that's certainly safe. The &lt;tt&gt;.com&lt;/tt&gt; zone uses a value of three and I think that's probably the best choice given the CPU cost and the fact that the original Bleichenbacher bug has been long since fixed.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Forward secrecy for IE and Safari too</title>
   <link href="http://www.imperialviolet.org/2012/03/02/ieecdhe.html"/>
   <updated>2012-03-02T00:00:00-08:00</updated>
   <id>http://www.imperialviolet.org/2012/03/02/ieecdhe</id>
   <content type="html">&lt;p&gt;When we &lt;a href=&quot;http://www.imperialviolet.org/2011/11/22/forwardsecret.html&quot;&gt;announced&lt;/a&gt; forward secrecy for Google HTTPS we noted that &amp;ldquo;we hope to support IE in the future&amp;rdquo;. It wasn't that we didn't want to support IE, but IE doesn't implement the combination of ECDHE with RC4. IE (or rather, SChannel) does implement ECDHE with AES on Vista and Windows 7, but I only wanted to make one change at a time.&lt;/p&gt;

&lt;p&gt;With the release of &lt;a href=&quot;http://technet.microsoft.com/en-us/security/bulletin/ms12-006&quot;&gt;MS12-006&lt;/a&gt; a month ago to address the BEAST weakness in TLS 1.0's CBC design, we've now made ECDHE-RSA-AES128-SHA our second preference cipher. That means that Chrome and Firefox will still use ECDHE-RSA-RC4-SHA, but IE on Vista and Windows 7 will get ECDHE now. This change also means that we support ECDHE with Safari (at least on Lion, where I tried it.)&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>RSA 2012</title>
   <link href="http://www.imperialviolet.org/2012/02/12/rsaconf.html"/>
   <updated>2012-02-12T00:00:00-08:00</updated>
   <id>http://www.imperialviolet.org/2012/02/12/rsaconf</id>
   <content type="html">&lt;p&gt;Just a brief note that I'll be at RSA 2012 in San Francisco at the end of the month and will be speaking with several others about certificate revocation. (&lt;tt&gt;tech-106&lt;/tt&gt;, Tuesday, 1pm.).&lt;/p&gt;

&lt;p&gt;If you want to chat and don't manage to grab me then, drop me an email. (&lt;tt&gt;agl&lt;/tt&gt; at &lt;tt&gt;imperialviolet.org&lt;/tt&gt; if you didn't already know.)&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Revocation checking and Chrome's CRL</title>
   <link href="http://www.imperialviolet.org/2012/02/05/crlsets.html"/>
   <updated>2012-02-05T00:00:00-08:00</updated>
   <id>http://www.imperialviolet.org/2012/02/05/crlsets</id>
   <content type="html">&lt;p&gt;When a browser connects to an HTTPS site it receives signed certificates which allow it to verify that it's really connecting to the domain that it should be connecting to. In those certificates are pointers to services, run by the Certificate Authorities (CAs) that issued the certificate, that allow the browser to get up-to-date information.&lt;/p&gt;

&lt;p&gt;All the major desktop browsers will contact those services to inquire whether the certificate has been revoked. There are two protocols/formats involved: OCSP and CRL, although the differences aren't relevant here. I mention them only so that readers can recognise the terms in other discussions.&lt;/p&gt;

&lt;p&gt;The problem with these checks, that we call online revocation checks, is that the browser can't be sure that it can reach the CA's servers. There are lots of cases where it's not possible: captive portals are one. A captive portal frequently requires you to sign in on an HTTPS site, but blocks traffic to all other sites, including the CA's OCSP servers.&lt;/p&gt;

&lt;p&gt;If browsers were to insist on talking to the CA before accepting a certificate, all these cases would stop working. There's also the concern that the CA may experience downtime and it's bad engineering practice to build in single points of failure.&lt;/p&gt;

&lt;p&gt;Therefore online revocation checks which result in a network error are effectively ignored (this is called &amp;ldquo;soft-fail&amp;rdquo;). I've previously &lt;a href=&quot;http://www.imperialviolet.org/2011/03/18/revocation.html&quot;&gt;documented&lt;/a&gt; the resulting behaviour of several browsers.&lt;/p&gt;

&lt;p&gt;But an attacker who can intercept HTTPS connections can also make online revocation checks appear to fail and so bypass the revocation checks! In cases where the attacker can only intercept a subset of a victim's traffic (i.e. the SSL traffic but not the revocation checks), the attacker is likely to be a backbone provider capable of DNS or BGP poisoning to block the revocation checks too.&lt;/p&gt;

&lt;p&gt;If the attacker is close to the server then online revocation checks can be effective, but an attacker close to the server can get certificates issued from many CAs and deploy different certificates as needed. In short, even revocation checks don't stop this from being a real mess.&lt;/p&gt;

&lt;p&gt;So soft-fail revocation checks are like a seat-belt that snaps when you crash. Even though it works 99% of the time, it's worthless because it only works when you don't need it.&lt;/p&gt;

&lt;p&gt;While the benefits of online revocation checking are hard to find, the costs are clear: online revocation checks are slow and compromise privacy. The median time for a successful OCSP check is ~300ms and the mean is nearly a second. This delays page loading and discourages sites from using HTTPS. They are also a privacy concern because the CA learns the IP address of users and which sites they're visiting.&lt;/p&gt;

&lt;p&gt;On this basis, we're currently planning on disabling online revocation checks in a future version of Chrome. (There is a class of higher-security certificate, called an EV certificate, where we haven't made a decision about what to do yet.)&lt;/p&gt;


&lt;h4&gt;Pushing a revocation list&lt;/h4&gt;

&lt;p&gt;Our current method of revoking certificates in response to major incidents is to push a software update. Microsoft, Opera and Firefox also push software updates for serious incidents rather than rely on online revocation checks. But our software updates require that users restart their browser before they take effect, so we would like a lighter weight method of revoking certificates.&lt;/p&gt;

&lt;p&gt;So Chrome will start to reuse its existing update mechanism to maintain a list of revoked certificates, as first proposed to the CA/Browser Forum by Chris Bailey and Kirk Hall of AffirmTrust last April. This list can take effect without having to restart the browser.&lt;/p&gt;

&lt;p&gt;An attacker can still block updates, but they have to be able to maintain the block constantly, from the time of revocation, to prevent the update. This is much harder than blocking an online revocation check, where the attacker only has to block the checks during the attack.&lt;/p&gt;

&lt;p&gt;Since we're pushing a list of revoked certificates anyway, we would like to invite CAs to contribute their revoked certificates (CRLs) to the list. We have to be mindful of size, but the vast majority of revocations happen for purely administrative reasons and can be excluded. So, if we can get the details of the more important revocations, we can improve user security. Our criteria for including revocations are:&lt;/p&gt;

&lt;ol&gt;
 &lt;li&gt;The CRL must be crawlable: we must be able to fetch it over HTTP and robots.txt must not exclude GoogleBot.&lt;/li&gt;
 &lt;li&gt;The CRL must be valid by RFC 5280 and none of the serial numbers may be negative.&lt;/li&gt;
 &lt;li&gt;CRLs that cover EV certificates are taken in preference, while still considering point (4).&lt;/li&gt;
 &lt;li&gt;CRLs that include revocation reasons can be filtered to take less space and are preferred.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;For the curious, there is a tool for fetching and parsing Chrome's list of revoked certificates at &lt;a href=&quot;https://github.com/agl/crlset-tools&quot;&gt;https://github.com/agl/crlset-tools&lt;/a&gt;.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Extracting Mozilla's Root Certificates</title>
   <link href="http://www.imperialviolet.org/2012/01/30/mozillaroots.html"/>
   <updated>2012-01-30T00:00:00-08:00</updated>
   <id>http://www.imperialviolet.org/2012/01/30/mozillaroots</id>
   <content type="html">&lt;p&gt;When people need a list of root certificates, they often turn to Mozilla's. However, Mozilla doesn't produce a nice list of PEM encoded certificates. Rather, they keep them in a form which is convenient for NSS to build from: &lt;a href=&quot;https://mxr.mozilla.org/mozilla/source/security/nss/lib/ckfw/builtins/certdata.txt?raw=1&quot;&gt;&lt;tt&gt;https://mxr.mozilla.org/mozilla/source/security/nss/lib/ckfw/builtins/certdata.txt?raw=1&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Several people have written quick scripts to try and convert this into PEM format, but they often miss something critical: some certificates are explicitly &lt;i&gt;distrusted&lt;/i&gt;. These include the DigiNotar certificates and the misissued COMODO certificates. If you don't parse the trust records from the NSS data file, then you end up trusting these too! There's at least one, major example of this that I know of.&lt;/p&gt;

&lt;p&gt;(Even with a correct root file, unless you do hard fail revocation checking you're still vulnerable to the misissued COMODO certificates.)&lt;/p&gt;

&lt;p&gt;So, at the prodding of Denton Gentry, I've open-sourced a tool for converting NSS's file to PEM format: &lt;a href=&quot;https://github.com/agl/extract-nss-root-certs&quot;&gt;extract-nss-root-certs&lt;/a&gt;. (At the time of writing it requires a 6g built from the weekly or current tree (&lt;tt&gt;hg -r weekly&lt;/tt&gt;), not the release tree. A few of the APIs have changed since the last Go release was done. This will be resolved when Go 1.0 is released.) &lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>BEAST followup</title>
   <link href="http://www.imperialviolet.org/2012/01/15/beastfollowup.html"/>
   <updated>2012-01-15T00:00:00-08:00</updated>
   <id>http://www.imperialviolet.org/2012/01/15/beastfollowup</id>
   <content type="html">&lt;p&gt;(See the &lt;a href=&quot;http://www.imperialviolet.org/2011/09/23/chromeandbeast.html&quot;&gt;original post&lt;/a&gt; for background.)&lt;/p&gt;

&lt;p&gt;Everyone seems to have settled on 1/n-1 record splitting as a workaround for the BEAST attack in TLS 1.0 and SSLv3. Briefly: 1/n-1 record splitting breaks CBC encrypted records in two: the first with only a single byte of application data and the second with the rest. This effectively randomises the IV and stops the attack.&lt;/p&gt;

&lt;p&gt;The workaround which OpenSSL tried many years ago, and which hit significant issues, was 0/n record splitting. It's the same thing, but with the first record being empty. The problem with it was that many stacks processed the empty record and returned a 0-byte read, which higher levels took to mean EOF.&lt;/p&gt;

&lt;p&gt;1/n-1 record splitting doesn't hit that problem, but it turns out that there's a fair amount of code out there that assumes that the entire HTTP request comes in a single read. The single byte record breaks that.&lt;/p&gt;

&lt;p&gt;We first implemented 1/n-1 record splitting in Chrome 15 but backed off after only a couple of days because logging into several large sites broke. But that did motivate the sites to fix things so that we could switch it on in Chrome 16 and it stuck that time.&lt;/p&gt;

&lt;p&gt;Opera also implemented it around this time, but I think Chrome took the brunt of the bug reports and it's time consuming dealing with them. Myself and a colleague have been emailing and phoning a lot of sites and vendors while dealing with upset users and site admins. Chrome certainly paid a price for moving before Firefox and IE but then we're nice like that.&lt;/p&gt;

&lt;p&gt;Thankfully, this week, Microsoft released a &lt;a href=&quot;http://technet.microsoft.com/en-us/security/bulletin/ms12-006&quot;&gt;security update&lt;/a&gt; which implements 1/n-1 record splitting in SChannel and switches it on in IE. (Although it defaults to off for other users of SChannel, unlike NSS.) Now the sites which broke with Chrome 16 are also broken in a patched IE and that takes some pressure off us. In a few weeks, Firefox 10 should be released and then we'll be about as good as we're going to get.&lt;/p&gt;

&lt;p&gt;After taking the brunt with Chrome 16, there is one case that I'm not going to fight: Plesk can't handle POST payloads that don't come in a single read. Chrome (currently) sends POSTs as two writes: one for the HTTP headers and a second for the POST body. That means that each write is split into two records and Plesk breaks because of the second split. IE and Firefox send the headers and body in a single write, so there's only a single split in the HTTP headers, which Plesk handles.&lt;/p&gt;

&lt;p&gt;Chrome will start merging small POST bodies into the headers with Chrome 17 (hopefully) and this will fix Plesk. Also, merging as Firefox and IE do saves an extra packet so it's worthwhile on its own. Once again, anything that's mostly true soon becomes an unwritten rule on the Internet.&lt;/p&gt;

&lt;p&gt;It's worth contrasting the BEAST response to the renegotiation attack. The BEAST workaround caused a number of problems, but it worked fine for the vast majority of sites. The renegotiation fix requires that very nearly every HTTPS site on the Internet be updated and then that browsers refuse to talk to unpatched servers.&lt;/p&gt;

&lt;p&gt;I'd bet that we'll not manage to get enough patched servers for any browser to require it this side of 2020. Unpatched servers can still disable renegotiation to protect themselves, but it's still not hard to find major sites that allow insecure renegotiation (&lt;tt&gt;www.chase.com&lt;/tt&gt; was literally the second site that I tried).&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>OTR in Go</title>
   <link href="http://www.imperialviolet.org/2012/01/14/gootr.html"/>
   <updated>2012-01-14T00:00:00-08:00</updated>
   <id>http://www.imperialviolet.org/2012/01/14/gootr</id>
   <content type="html">&lt;p&gt;&amp;ldquo;Off the record&amp;rdquo; is, unfortunately, an overloaded term. To many it's feature in gTalk and AOL IM which indicates that the conversation isn't logged. However, to crypto folks it's &lt;a href=&quot;http://www.cypherpunks.ca/otr/&quot;&gt;a protocol for secure chat&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;(In fact, resoloving the ambiguity is on &lt;a href=&quot;https://www.eff.org/deeplinks/2011/12/effs-holiday-wish-list&quot;&gt;the EFF's wish list&lt;/a&gt;.)&lt;/p&gt;

&lt;p&gt;Pidgin has been my chat client of choice for some time because it's pretty fully featured and supports OTR via a plugin. However, I just don't trust it from a security point of view. The latest incident was only a couple of weeks ago: &lt;a href=&quot;http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2011-3919&quot;&gt;CVE-2011-3919&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;So, I implemented &lt;a href=&quot;http://code.google.com/p/gocrypto/source/browse/#git%2Fotr&quot;&gt;otr in Go&lt;/a&gt;, as well as an XMPP &lt;a href=&quot;https://github.com/agl/xmpp&quot;&gt;library&lt;/a&gt; and &lt;a href=&quot;https://github.com/agl/xmpp-client&quot;&gt;client&lt;/a&gt;. It's an absolutely minimal client (except for OTR support) and implements only what I absolutely need in a client.&lt;/p&gt;

&lt;p&gt;But it does mean that the whole stack, including the TLS library, is implemented in a memory safe language. (On the other hand, pretty much everything in that stack, from the modexp function to the terminal handling code was written by me and has never really been audited. I'm a decent programmer but I'm sure there are some howlers of security issues in there somewhere.)&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Certificate Transparency</title>
   <link href="http://www.imperialviolet.org/2011/11/29/certtransparency.html"/>
   <updated>2011-11-29T00:00:00-08:00</updated>
   <id>http://www.imperialviolet.org/2011/11/29/certtransparency</id>
   <content type="html">&lt;p&gt;(&lt;i&gt;I don't have comments on this blog, but you can comment on my &lt;a href=&quot;https://plus.google.com/u/1/118082204714636759510/posts/NZ8NrLXx4Uj&quot;&gt;Google+ post&lt;/a&gt;.&lt;/i&gt;)&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.links.org/&quot;&gt;Ben Laurie&lt;/a&gt; and I have been working on a longer term plan for improving the foundations of the certificate infrastructure on which most Internet transport security is based on these days. Although Chrome has &lt;a href=&quot;http://www.imperialviolet.org/2011/05/04/pinning.html&quot;&gt;public key pinning&lt;/a&gt; for some domains, which limits the set of permitted certificates, we don't see public key pinning as a long term solution (and nor was it ever designed to be).&lt;/p&gt;

&lt;p&gt;For the 10 second summary of the plan, I'll &lt;a href=&quot;http://www.links.org/?p=1212&quot;&gt;quote Ben&lt;/a&gt;: &amp;ldquo;certificates are registered in a public audit log. Servers present proofs that their certificate is registered, along with the certificate itself. Clients check these proofs and domain owners monitor the logs.&amp;rdquo;. I would add only that anyone can check the logs: the certificate infrastructure would be fully transparent.&lt;/p&gt;

&lt;p&gt;We now have an &lt;a href=&quot;http://www.links.org/files/CertificateAuthorityTransparencyandAuditability.pdf&quot;&gt;outline of the basic idea&lt;/a&gt; and will be continuing to flesh it out in the coming months, hopefully in conjunction with other browser vendors.&lt;/p&gt;

&lt;p&gt;But I thought that, at the outset, it would be helpful to describe some of the limitations to the design space, as I see them:&lt;/p&gt;

&lt;h4&gt;No side-channels&lt;/h4&gt;

&lt;p&gt;As I've &lt;a href=&quot;http://www.imperialviolet.org/2011/10/08/certaxis.html&quot;&gt;previously described&lt;/a&gt;, side-channels occur when a browser needs to contact a server other than the immediate destination in order to verify a certificate. Revocation checking with OCSP is an example of a side-channel used today.&lt;/p&gt;

&lt;p&gt;But in order to be effective, side-channels invariably need to block the certificate verification until they complete, and that's a big problem. The Internet isn't fully connected. Captive portals, proxies and firewalls all mean that the only thing you can really depend on talking to is the immediate destination server. Because of this, browsers have never been able to make OCSP lookups blocking, and therefore &lt;a href=&quot;http://www.imperialviolet.org/2011/03/18/revocation.html&quot;&gt;OCSP is basically useless for security&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;And that's not to mention the privacy, performance and functionality issues that arise from needing side-channels. (What happens when the side-channel server goes down?)&lt;/p&gt;

&lt;p&gt;So our design requires that the servers send us the information that we require. We can use side-channels to check up on the logs, but it's an asynchronous lookup.&lt;/p&gt;

&lt;h4&gt;It's not opt-in, it's all-in&lt;/h4&gt;

&lt;p&gt;&lt;a href=&quot;http://www.thoughtcrime.org/software/sslstrip/&quot;&gt;SSL Stripping&lt;/a&gt; is a very easy and very effective attack. &lt;a href=&quot;https://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security&quot;&gt;HSTS&lt;/a&gt; prevents it and is as easy to deploy as anything can be for HTTPS sites. But, despite all this, and despite a significant amount of evangelism, take up has been very limited, even by sites which are HTTPS only and the subject of attacks.&lt;/p&gt;

&lt;p&gt;While HSTS really has to be opt-in, a solution to the certificate problem doesn't. Although our scheme is incrementally deployable, the eventual aim is that it's required for everybody. Thankfully, since certificates have to be renewed there's an obvious means to incrementally deploy it: require it for certificates issued after a certain date. Although an eventual hard requirement is still needed, it's a lot less of a problem.&lt;/p&gt;

&lt;h4&gt;It's easy on the server operator&lt;/h4&gt;

&lt;p&gt;Since the aim is to make it a requirement for all servers, we've sacrificed a lot in order to make it very easy on the server operator. For most server operators, their CA will probably take care of fetching the audit proofs, meaning there's &lt;i&gt;no&lt;/i&gt; additional work at all.&lt;/p&gt;

&lt;p&gt;Some initial designs included short-lived log signatures, which would have solved the revocation problem. (Revocation would simply be a matter of instructing the logs to stop signing a given certificate.) However, this would have required server operators to update their audit proofs on a near-daily basis. After discussions it became clear that such a requirement wouldn't be tenable for many and so we reluctantly dropped it.&lt;/p&gt;

&lt;p&gt;We are also sacrificing decentralisation to make things easy on the server. As I've previously argued, decentralisation isn't all it's cracked up to be in most cases because 99.99% of people will never change any default settings, so we haven't given up much. Our design does imply a central set of trusted logs which is universally agreed. This saves the server from possibly having to fetch additional audit proofs at runtime, something which requires server code changes and possible network changes.&lt;/p&gt;

&lt;h4&gt;There are more valid certificates than the one that's currently serving&lt;/h4&gt;

&lt;p&gt;Cheap virtual hosting and EC2 have made multi-homed services common. Even small to medium scale sites have multiple servers these days. So any scheme that asserts that the currently serving certificate is the only valid certificate will run into problems when certificates change. Unless all the servers are updated at &lt;i&gt;exactly&lt;/i&gt; the same time, then users will see errors during the switch. These schemes also make testing a certificate with a small number of users impossible.&lt;/p&gt;

&lt;p&gt;In the end, the only real authority on whether a certificate is valid &lt;a href=&quot;http://dankaminsky.com/2011/08/31/notnotar/&quot;&gt;is the site itself&lt;/a&gt;. So we don't rely on external observations to decide on whether a certificate is valid, instead to seek to make the set of valid certificates for a site public knowledge (which it currently isn't), so that the site can determine whether it's correct.&lt;/p&gt;

&lt;h4&gt;It's not easy to do&lt;/h4&gt;

&lt;p&gt;We believe that this design will have a significant, positive impact on an important part of Internet security and that it's deployable. We also believe that any design that shares those two properties ends up looking a lot like it. (It's no coincidence that we share several ideas with the EFF's &lt;a href=&quot;https://www.eff.org/deeplinks/2011/11/sovereign-keys-proposal-make-https-and-email-more-secure&quot;&gt;Sovereign Keys&lt;/a&gt;.)&lt;/p&gt;

&lt;p&gt;None the less, deployment won't be easy and, hopefully, we won't be pushing it alone.&lt;/p&gt;
</content>
 </entry>
 

</feed>

