Re: [TLS] In-handshake CertificateRequest and 0-RTT

Eric Rescorla <ekr@rtfm.com> Thu, 12 May 2016 19:26 UTC

Return-Path: <ekr@rtfm.com>
X-Original-To: tls@ietfa.amsl.com
Delivered-To: tls@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id E4CD012D0EE for <tls@ietfa.amsl.com>; Thu, 12 May 2016 12:26:36 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Level:
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=rtfm-com.20150623.gappssmtp.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id oSpuOikHceTF for <tls@ietfa.amsl.com>; Thu, 12 May 2016 12:26:33 -0700 (PDT)
Received: from mail-yw0-x231.google.com (mail-yw0-x231.google.com [IPv6:2607:f8b0:4002:c05::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 9BD7012B039 for <tls@ietf.org>; Thu, 12 May 2016 12:26:33 -0700 (PDT)
Received: by mail-yw0-x231.google.com with SMTP id o66so93234306ywc.3 for <tls@ietf.org>; Thu, 12 May 2016 12:26:33 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rtfm-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=u7p545iU5droTeZ82mRme1lz/Hj+h8wY4aDQDYjcjG8=; b=i2bGL31hVnCjHinDHepUvsOAvCC+seocZfmPrbnAsb5w7UWSwuqJsCDhaafe6mIAW6 Er7cIbnZL1uTyVxlJVAFu6LY+0SxPvXbTCB+qJjwegknNhJLJK0N/kKUb2P/eTzh94P7 EOi51SQ6IuejPpkpq5Crxa0hmeNY9kE1qzOEehVxp9zTgwnfsindoeACZIYuZAi+ku5B LMPqGKFrPYCaQ4Txo6KyeabAp6wJXilUz2jL+NNRjsHHbTul8HRv6u7vMPYt2Md7/XjD RS4ZOxfX4R1C6c3Rn9DuE6XPxPSlyy0ad7gbx5hlKMFCsBi+DVxRWFo6wiPc7IVu6Q7u F08g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=u7p545iU5droTeZ82mRme1lz/Hj+h8wY4aDQDYjcjG8=; b=D/jvycnkRptPx+9sWgwU5bQWE6c78vrKetloYyCMntcTaPBb3VK56RBp/Mr9+vT09p Yr8ZW9B0pBJetPGu5casRJWfEZHeNNf2lgMn8IorSGy8YjbXQbhJsKuo/ltXH6PSa0A/ jBSTQkDMsAxfTBoxFV36yDj0ZM51nS6ZF6PhgoMeoB8lo2JjCdW50o6FneHYm0cHqsZB zAZc2fS1CJ52l5P90PTU5CNGAkULBFo+7B1qMCpZbZtpVBEu/MB1D2EqTj9aZN2p1vyU UqbyvchSlPIUcIioFN2nKYmdPM5++zuJciUb5E2ucc2ligQJLFuN2eoEHxx8M+TiLLpk 2gEg==
X-Gm-Message-State: AOPr4FUFWFNIkYhqFvr4nxmw6FWUNX6gv5U/naLBbTxCRSuzRfXRJ7KtfGZVt2SDK0bDRz2fNEbRyqtddGcZwg==
X-Received: by 10.37.203.68 with SMTP id b65mr5427183ybg.130.1463081192840; Thu, 12 May 2016 12:26:32 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.129.132.12 with HTTP; Thu, 12 May 2016 12:25:53 -0700 (PDT)
In-Reply-To: <CAF8qwaAqHeyn3O0-n1-EJNiHae8=mE=mM+vDbE8bRbVLqA2D2w@mail.gmail.com>
References: <CAF8qwaD870fuNuVnhnbKBEk3Vc4G7_AfR+mOAtvLwDYNtNgcwA@mail.gmail.com> <CABcZeBPUmahhCN97wrjUE1iR2f8jT9Sp3D81qQBfM8aMM8EA7Q@mail.gmail.com> <CAF8qwaAqHeyn3O0-n1-EJNiHae8=mE=mM+vDbE8bRbVLqA2D2w@mail.gmail.com>
From: Eric Rescorla <ekr@rtfm.com>
Date: Thu, 12 May 2016 21:25:53 +0200
Message-ID: <CABcZeBN-fYXjmOcpZO6Vk-+G6==XJaqfFT=cMJTmYFi=gWA9yQ@mail.gmail.com>
To: David Benjamin <davidben@chromium.org>
Content-Type: multipart/alternative; boundary="94eb2c059e16c7124a0532aa2253"
Archived-At: <http://mailarchive.ietf.org/arch/msg/tls/6f5RYu_dNVErt-zD4MaxaE8dR3M>
Cc: "tls@ietf.org" <tls@ietf.org>
Subject: Re: [TLS] In-handshake CertificateRequest and 0-RTT
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: "This is the mailing list for the Transport Layer Security working group of the IETF." <tls.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/tls>, <mailto:tls-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/tls/>
List-Post: <mailto:tls@ietf.org>
List-Help: <mailto:tls-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tls>, <mailto:tls-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 12 May 2016 19:26:37 -0000

I agree that the current draft is ambiguous on this point but I think the
question is what the right
thing is. My intuition here is that we should try to make the client's side
and the server's side
more independent so that you can have client auth in either case. Given
that we're going to
allow post-handshake client auth when you resume, it's just not clear to me
why you wouldn't
allow in-handshake client-auth. I'm not sure it's a hill I'm willing to die
on though.

-Ekr



On Thu, May 12, 2016 at 9:06 PM, David Benjamin <davidben@chromium.org>
wrote:

> Which PSK/non-PSK symmetry are you referring to? I didn't think 1.3
> currently allowed CertificateRequest in a PSK handshake either, or are you
> referring to something else?
>
> Actually, looking at the text again, it's a little confusing right now
> where CertificateRequest is and isn't allowed. The message flow in 6.2.2
> implies a PSK resumption handshake does not send CertificateRequest. The
> flow in 6.2.3 implies a 0-RTT handshake does, but it describes the 0-RTT
> handshake as:
>
> """
> When resuming via a PSK, clients can also send data on their first flight
> (“early data”). This data is encrypted solely under keys derived using the
> PSK as the static secret. As shown in Figure 4, the Zero-RTT data is just
> added to the 1-RTT handshake in the first flight, the rest of the handshake
> uses the same messages.
> """
>
> This suggests it should match 6.2.2 in whether CertificateRequest is
> allowed. Arguably the rules should be in text, not diagrams, but the text
> in 6.3.3.2 just says:
>
> """
> A non-anonymous server can optionally request a certificate from the
> client, if appropriate for the selected cipher suite. This message, if
> sent, will follow EncryptedExtensions.
> """
>
> (I'm guessing "non-anonymous" is a holdover from TLS 1.2's text.)
>
> In TLS 1.2, I believe CertificateRequest in a PSK-based cipher wasn't
> allowed. RFC 4279 explicitly says it's not allowed in plain PSK. It's not
> clear whether that applies to DHE_PSK, but I think that combined with 1.2's
> "non-anonymous" rule gives client auth => certificate-based cipher as the
> most reasonable interpretation.
>
> David
>
> On Thu, May 12, 2016 at 11:19 AM Eric Rescorla <ekr@rtfm.com> wrote:
>
>> Interesting suggestion. I see what you mean about symmetry with the server
>>
>> The symmetry I was optimizing for is that the PSK and non-PSK handshake,
>> and I think from that perspective the current design is simpler, so I see
>> it both ways.
>>
>> WRT to the 0.5RTT data, Hugo Krawczyk has done some nice work on
>> analyzing this case and I think we're starting to get more comfort with
>> that.
>>
>> So, not sure what I think...
>>
>> -Ekr
>>
>>
>>
>>
>>
>> On Wed, May 11, 2016 at 10:44 PM, David Benjamin <davidben@chromium.org>
>> wrote:
>>
>>> The 0-RTT handshake originally had two places with a client
>>> Certificate + CertificateVerify: in the 0-RTT flow and in the second
>>> Finished block in response to a server CertificateRequest. We've
>>> dropped the first now. I propose we drop the second too. Client auth with
>>> 0-RTT is solely carried over via resumption. (I mentioned this previously,
>>> but with 0-RTT looking closer to resumption and the IETF 95 decision on
>>> 0.5-RTT data, I think the case is clearer.)
>>>
>>> This makes 6.2.3 more consistent with 6.2.2 where neither side
>>> authenticates in a resumption handshake. 0-RTT is much more similar to
>>> resumption with most parameters carrying over anyway.
>>>
>>> 1-RTT client auth in a 0-RTT handshake also invites more of the
>>> retroactive auth confusion as with post-handshake auth. The client stream
>>> switches from unauthenticated to authenticated. I believe this was one
>>> of the reasons we agreed at IETF 95 to discourage/forbid (not sure which)
>>> sending 0.5-RTT data following a CertificateRequest. In-handshake
>>> CertificateRequest either requires this discouraged situation or accepting
>>> 0-RTT data without sending 0.5-RTT data, which is largely pointless.
>>>
>>> We accepted the retroactive auth issue in post-handshake auth, but I
>>> think we should limit it to that. For implementations, BoringSSL made
>>> accepting renego an opt-in feature. I expect we'd do the same for
>>> post-handshake auth. For specs, one might specify that post-handshake
>>> authentication is forbidden. HTTP/2 did this for renegotiation. I
>>> haven't been following the HTTP/2 client cert saga as closely, but
>>> draft-thomson-http2-client-certs-02 is the current plan, right? If so,
>>> HTTP/2 should forbid TLS-level post-handshake auth too.
>>>
>>> In both cases, excluding post-handshake auth should exclude any
>>> transition from unauthenticated to authenticated in the stream. Instead, if
>>> you want to change authentication state, send a post-handshake
>>> CertificateRequest, as you would have normally.
>>>
>>> David
>>>
>>> _______________________________________________
>>> TLS mailing list
>>> TLS@ietf.org
>>> https://www.ietf.org/mailman/listinfo/tls
>>>
>>>
>>