Re: [TLS] AD Review of draft-ietf-tls-tls13

Ilari Liusvaara <ilariliusvaara@welho.com> Sat, 20 May 2017 08:29 UTC

Return-Path: <ilariliusvaara@welho.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 F16E21273E2 for <tls@ietfa.amsl.com>; Sat, 20 May 2017 01:29:02 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.901
X-Spam-Level:
X-Spam-Status: No, score=-1.901 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RP_MATCHES_RCVD=-0.001] autolearn=ham autolearn_force=no
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 u-QiE0Pwnjgk for <tls@ietfa.amsl.com>; Sat, 20 May 2017 01:29:00 -0700 (PDT)
Received: from welho-filter2.welho.com (welho-filter2.welho.com [83.102.41.24]) by ietfa.amsl.com (Postfix) with ESMTP id 585A5124234 for <tls@ietf.org>; Sat, 20 May 2017 01:28:59 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1]) by welho-filter2.welho.com (Postfix) with ESMTP id B5DE422EE1; Sat, 20 May 2017 11:28:57 +0300 (EEST)
X-Virus-Scanned: Debian amavisd-new at pp.htv.fi
Received: from welho-smtp3.welho.com ([IPv6:::ffff:83.102.41.86]) by localhost (welho-filter2.welho.com [::ffff:83.102.41.24]) (amavisd-new, port 10024) with ESMTP id fo17uBzEIWOX; Sat, 20 May 2017 11:28:57 +0300 (EEST)
Received: from LK-Perkele-V2 (87-92-51-204.bb.dnainternet.fi [87.92.51.204]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by welho-smtp3.welho.com (Postfix) with ESMTPSA id 571B52313; Sat, 20 May 2017 11:28:57 +0300 (EEST)
Date: Sat, 20 May 2017 11:28:56 +0300
From: Ilari Liusvaara <ilariliusvaara@welho.com>
To: Dave Garrett <davemgarrett@gmail.com>
Cc: tls@ietf.org, Viktor Dukhovni <ietf-dane@dukhovni.org>
Message-ID: <20170520082855.GA32428@LK-Perkele-V2.elisa-laajakaista.fi>
References: <CAPZZOTgizE2n06V9wEtARFCXB7FP_eikW-K1k67bZG11kNhSAw@mail.gmail.com> <44AED5C2-B21C-442A-8412-9134D1C10BCD@dukhovni.org> <201705192143.19490.davemgarrett@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Disposition: inline
In-Reply-To: <201705192143.19490.davemgarrett@gmail.com>
User-Agent: Mutt/1.5.23 (2014-03-12)
Sender: ilariliusvaara@welho.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/CMNY3snsN3mwFHX-25MNGdbrpec>
Subject: Re: [TLS] AD Review of draft-ietf-tls-tls13
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.22
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: Sat, 20 May 2017 08:29:03 -0000

On Fri, May 19, 2017 at 09:43:19PM -0400, Dave Garrett wrote:
> On Friday, May 19, 2017 04:51:21 pm Viktor Dukhovni wrote:
> > Which brings us to some more undesirable layer violation in the current
> > draft.  The language in question is appropriate for updates to RFC5280,
> > but does not belong in TLS.  The problems in question are largely
> > already addressed elsewhere (as CAs no longer issue MD5, SHA1, ...
> > certificates, browsers no longer support them, ...) and continue to
> > be further remediated in the appropriate standards and products.
> > 
> > Therefore delete:
> > 
> >    Section 4.2.3 (Legacy algorithms paragraph final sentence):
> > 
> >       ...                                       TLS 1.3 servers
> >       MUST NOT offer a SHA-1 signed certificate unless no valid
> >       certificate chain can be produced without it (see
> >       Section 4.4.2.2).
> > 
> >    Section 4.4.2.2:
> > 
> >    ...          This fallback chain MAY use the deprecated SHA-1 hash
> >    algorithm only if the "signature_algorithms" extension provided by
> >    the client permits it.  If the client cannot construct an acceptable
> >    chain using the provided certificates and decides to abort the
> >    handshake, then it MUST abort the handshake with an
> >    "unsupported_certificate" alert.
> > 
> >    Section 4.4.2.4:
> > 
> >    Any endpoint receiving any certificate signed using any signature
> >    algorithm using an MD5 hash MUST abort the handshake with a
> >    "bad_certificate" alert.  SHA-1 is deprecated and it is RECOMMENDED
> >    that any endpoint receiving any certificate signed using any
> >    signature algorithm using a SHA-1 hash abort the handshake with a
> >    "bad_certificate" alert.  All endpoints are RECOMMENDED to transition
> >    to SHA-256 or better as soon as possible to maintain interoperability
> >    with implementations currently in the process of phasing out SHA-1
> >    support.
> 
> No. I strongly oppose stripping all off this out.

This requirement is bad layering violation.

It is even further made problematic by:

- TLS and PKIX libraries are often decoupled, making this difficult to
  implement.
- It requires code to support MD5, which as weak algorithm is hazardous.

I do have written TLS implementation. It does not follow this, because I
regard the aborting requirements as insane (it does not have any code to
support MD5, and is not architecturally capable of aborting based on
signature algorithm).

The code treats MD5 as unknown signature algorithm, which does not
require hazardous code. Pathbuilding avoids MD5 signatures and it is
not possible to validate signatures using MD5 (algorithm conversion
will return an error).

(The SHA-1 handling is more complex, as RSA-PKCS#1v1.5-SHA1 is actually
validateable, but only in certain context. Suffice to say, I would
love to just dump the SHA-1 code).

> > I note that TLS 1.3 does not have any language prohibiting MD2, MDC2DES,
> > MD4, RIPEMD160, private signature oids, ... that may be weaker than SHA-1
> > or even MD5.
> 
> They're not listed as possible field values anywhere directly in the TLS spec.
> If someone wants to add a line to one of the "MUST NOT" lists somewhere for
> all hashes weaker than SHA-1, that sounds fine to me.

These are values internal to PKIX. And the draft _does_ allow sending a
certificate contaning those (hint: If the server does not have any
other chain using only signaled algorithms).

And MD5 isn't listed as possible field value either.



-Ilari