Re: [TLS] Updating for non-X.509 certificate types

Eric Rescorla <ekr@rtfm.com> Fri, 10 March 2017 15:03 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 EC5E412996F for <tls@ietfa.amsl.com>; Fri, 10 Mar 2017 07:03:06 -0800 (PST)
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 5qyqdHumEW-X for <tls@ietfa.amsl.com>; Fri, 10 Mar 2017 07:03:04 -0800 (PST)
Received: from mail-yw0-x234.google.com (mail-yw0-x234.google.com [IPv6:2607:f8b0:4002:c05::234]) (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 D1D7D12960B for <tls@ietf.org>; Fri, 10 Mar 2017 07:03:03 -0800 (PST)
Received: by mail-yw0-x234.google.com with SMTP id v76so25235876ywg.0 for <tls@ietf.org>; Fri, 10 Mar 2017 07:03:03 -0800 (PST)
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=wkeKmsubf3VpuXOtTOJptYXNCz1KB+R68gufGePDhCk=; b=R7FIG8UuOWhgy708+wYJQ983kNPia87ZpOKfSifIgjR1rppSARniIfyCaGIV99NgLc N5TqyEmC9IM6oXBJQMrccBqls5NGroHpdrH75/zvJqOdCfXWNJoli9+BqNLuKoqbr1ub vNfJ/lHObMpu1T6Sn/bhtdP8j/leO7imyAZx+aVBD67kzPDtIYRosHAYjY61kRM9tLuV DqRMTqyzyddqevTDJY4j52WDk8XY66VEGc/FPXoB6qxfJWZgPEvHZAOtlFW9NZbvcC/Q iLfIhVZnrxg3ElAtLrQYXrqn+3M9LwdHpqgj2OqpzLO8ZOzhfnAL7iGT1gmQbFA+res2 vSTA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=wkeKmsubf3VpuXOtTOJptYXNCz1KB+R68gufGePDhCk=; b=VIP7s9/D2nqUwTrek4AD14cJU+6uNC6EaS07zxPIAC99NFABzCyxqOslK6XBpnfe6v CBARzrIq/SZocgWIZ3iNJBsBzO6rLj3joxsZPBw9/zfWOM2vRMEbhITpkfWOFZV0hoZt 5G7TvLTGbQiVGj9koUC4YtcwxQizHbLWVKfHvYvFjAkqWV50YhkBkVR7wXz6uNqdwpuE sxU2jWajzbXscWkfiwgsRiRECVDf0z/DJCHqOtPvBo0GxglRlcpzUvLaaKMfEpNDGe7w 49FrDc0EHyg1AsVZs8FRdjVNOoUjiXSP5Z/3xvH2/NdTdgx4ubupH1RPaUguYagPqynT BrLA==
X-Gm-Message-State: AMke39nWtpak/21FWodDAqnbNtYSUK+eU5XlJd6o7P5BKiNIxXUb649GXPE4RAMVnwE4v9c5APlXNh6fQ83BPg==
X-Received: by 10.37.78.195 with SMTP id c186mr8046830ybb.180.1489158182949; Fri, 10 Mar 2017 07:03:02 -0800 (PST)
MIME-Version: 1.0
Received: by 10.129.154.210 with HTTP; Fri, 10 Mar 2017 07:02:22 -0800 (PST)
In-Reply-To: <20170310124013.GA1197@LK-Perkele-V2.elisa-laajakaista.fi>
References: <CABcZeBNGkZVpoGqkc_ePF12mC0HaJgNbytXV70eV4oBBcyD2HQ@mail.gmail.com> <20170310124013.GA1197@LK-Perkele-V2.elisa-laajakaista.fi>
From: Eric Rescorla <ekr@rtfm.com>
Date: Fri, 10 Mar 2017 07:02:22 -0800
Message-ID: <CABcZeBNuVB1pdZiQmn87asfF=ARgNNTkzVM2vnyZZ1VPJ4-B+g@mail.gmail.com>
To: Ilari Liusvaara <ilariliusvaara@welho.com>
Content-Type: multipart/alternative; boundary="001a113e88fa827bc4054a61a893"
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/fy04zsPJ9s4j6B6xx1Kjw5nzvdg>
Cc: "tls@ietf.org" <tls@ietf.org>
Subject: Re: [TLS] Updating for non-X.509 certificate types
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: Fri, 10 Mar 2017 15:03:07 -0000

On Fri, Mar 10, 2017 at 4:40 AM, Ilari Liusvaara <ilariliusvaara@welho.com>
wrote:

> On Thu, Mar 09, 2017 at 04:43:19PM -0800, Eric Rescorla wrote:
> > As noted in https://github.com/tlswg/tls13-spec/issues/722, the new
> fancy
> > TLS 1.3 Certificate structure doesn't map well to the various non-X.509
> > cert structures we have defined, specifically:
> >
> > - Raw Public Keys
> > - Cached Info
> > - OpenPGP
> >
> > Probably mapping each of these to 1.3 is relatively straightforward
> > (Raw public keys == a list with one key, Cached info == the hash of
> > each cert + its extensions, and so on), but I tend to think that given
> the
> > modest/specialized deployment of these extensions, it's better to do a
> > set of small bis RFCs to define each of these, rather than add a bunch
> > of clutter to TLS 1.3 proper.
> >
> > Does anyone object to this? Volunteers.
>
> Ugh, the situation is way worse than what I thought.
>

That makes it an opportunity!


Basically, all three assume they have full control of certificate
> message, worst of all being OpenPGP, which modifies it in more
> complex ways (it isn't a pure element or list anymore).
>
> And even with RPK, which appiles least severe modifications,
> still modifies the structure in ways that are not obvious in
> implications w.r.t. TLS 1.3.
>
> Oh, and turns out I had implemented RPK in TLS 1.2 wrong by assuming
> that it doesn't actually modify the certificate message format.
> Which turned out to be wrong assumption (I fixed this after
> discovering the format changes).
>
>
> And then certificate types don't currently work sanely for client
> certs, even if you knew how those map to Certificate message.
>
>
> Client_certificate_type and server_certificate type aren't the
> only problematic extensions w.r.t. TLS 1.3. The table of
> extensions has the following too (all marked as allowed, I
> added short reason I think those are problematic):
>
> - client_certificate_url: Replaces certificate message. Hardcodes
>   SHA-1 (which is now provably broken).
>

So that's an easy fix :)



> - user_mapping: Has extra handshake message.
> - cert_type: All the problems of CCertT and SCertT, combined with
>   fixing both to be the same.
>

Does anyone use this?


>
> With user_mapping, applying similar trick as in status_request is
> not completely trivial because extensions that are answered in client
> Certificate are offered in CertificateRequest. Okay, except that
> extension is not an answer to ClientHello extensions, and the
> extension assumes offer-answer relationship between client and server
> extensions. Might need some special-casing.
>

Yeah, I think we should probably just consider banning user_mapping,
at least until someone comes up with a way to use it here.


Could be useful to have explicit list of extensions (no registry, since
> this list can be never updated) that lists extensions that are
> deprecated in TLS 1.3.
>

Currently this is by exclusion. I.e., these aren't listed as usable with
1.3. It does seem to me that we shouldn't ban cached_info and
the cert type ones, because if/when they become usable with 1.3
then they should be permissible. So I think I would rather say
"don't advertise these with 1.3 unless you're willing to do them
with 1.3"

-Ekr




That is, only allowed in ClientHello and only if also advertising
> prior versions.
>
> AFAICT, the list would be:
>
> - client_certificate_url?
> - trusted_ca_keys
> - truncated_hmac
> - client_authz
> - server_authz
> - cert_type?
> - srp
> - status_request_v2
> - client_certificate_type?
> - server_certificate_type?
> - encrypt_then_mac
> - extended_master_secret
> - cached_info?
> - SessionTicket TLS (don't ask why it is written like this)
> - renegotiation_info
>
>
>
> -Ilari
>