Re: [TLS] How ALPN makes the http2-tls-relaxed option less secure, compared to NPN (was Re: ALPN concerns)

Brian Smith <> Mon, 09 December 2013 16:10 UTC

Return-Path: <>
Received: from localhost ( []) by (Postfix) with ESMTP id 0281D1AE2DC for <>; Mon, 9 Dec 2013 08:10:35 -0800 (PST)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -1.979
X-Spam-Status: No, score=-1.979 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id Z9iTF8zGciin for <>; Mon, 9 Dec 2013 08:10:33 -0800 (PST)
Received: from ( []) by (Postfix) with ESMTP id 0274A1ADFCE for <>; Mon, 9 Dec 2013 08:10:32 -0800 (PST)
Received: by with SMTP id cy11so2898715qeb.41 for <>; Mon, 09 Dec 2013 08:10:27 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=snZgCuC622gkyjVML4y6IWJRAkHsxr68/W4ucS1uiKo=; b=WPZ19o+fBAHfHMKIPSUJ/l5wwz9AEV8kc4Ky7v6W61UBv/jawR0VbYRnwQTBRY9LT6 X1e8kX5NPHeOVGXpi/HYatiZc++uk83WwAzI8Bi7QtY7ym37cpgEzKJJKPHMWREzK7c+ 3TjPavY+oP6Lr1LvEGGROWELI4Q2/NICbANmqyQBQ2RsKxa7Xzr46KSJs3ILP7dWb/rg MiKmGr+kSUykz5dBAsBW1e/IjCu2nb76mnBDAt8jRUzARmGtP3GNgV9/gpBVNtlV7F/I lk2stwA+eus2GfRWnWWgo3fOIS8XcWufa82+cJTIW4kWVUseCUdxdgKUg8j7+xf43sxn o0Tw==
X-Gm-Message-State: ALoCoQk3bJhPcqDtLRTY57zWi0xt1UXObDJTMm4CR0nRjLqR22tZoDc6NE2yQWadUgwUFVqbqv1u
MIME-Version: 1.0
X-Received: by with SMTP id g6mr26182333qaz.80.1386605427830; Mon, 09 Dec 2013 08:10:27 -0800 (PST)
Received: by with HTTP; Mon, 9 Dec 2013 08:10:27 -0800 (PST)
X-Originating-IP: []
In-Reply-To: <>
References: <> <>
Date: Mon, 9 Dec 2013 08:10:27 -0800
Message-ID: <>
From: Brian Smith <>
To: Alfredo Pironti <>
Content-Type: text/plain; charset=UTF-8
Cc: Peter Gutmann <>, "<>" <>
Subject: Re: [TLS] How ALPN makes the http2-tls-relaxed option less secure, compared to NPN (was Re: ALPN concerns)
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: "This is the mailing list for the Transport Layer Security working group of the IETF." <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Mon, 09 Dec 2013 16:10:35 -0000

On Mon, Dec 9, 2013 at 7:23 AM, Alfredo Pironti <> wrote:
>> The case where the server does not use a certificate that the client
>> would verify correctly as it would in the "normal" HTTPS case is not
>> interesting. However, the case where opportunistic encryption is being
>> used with a certificate that *is* valid (as defined by RFC5280, et
>> al.) is interesting.
> I think this pre-condition makes your counter-example invalid.
> A client that only accepts valid certificates is in practice only
> implementing http2, not http2-tls-relaxed, in that client's behavior
> doesn't change.

Let's say the client is connecting to using TLS. There
are two interesting possibilities:

1. The client could be resolving an http:// link that uses
opportunistic encryption. In this case, if the client supports
opportunistic encryption, the client would support "http2-tls-relaxed"
and "http2-tls" (and "http1-tls") and a MitM attack, if attempted,
would succeed.

2. The client could be resolving an https:// link. In this case, the
client would only support "http2-tls" (and "http1-tls") and a MitM
attack, if attempted, would fail in a end-user-notable way.

With ALPN, it is trivial for the MitM to determine which case it is
and act accordingly. With NPN, it is not trivial (it requires
correlating data from multiple connections) and in many cases it may
be impossible (e.g. when an HTTP cache has stored the response with
the alternate-service upgrade header).

> Indeed, but under the assumption that only valid certificates are
> accepted, the behaviors coincide to "http2".

In the case of opportunistic encryption, we would support both valid
and invalid certificates. In the case of normal "http2-tls" and
"http1-tls", we would support only valid certificates.


Mozilla Networking/Crypto/Security (Necko/NSS/PSM)