Re: [TLS] I-D Action: draft-ietf-tls-md5-sha1-deprecate-08.txt

David Benjamin <davidben@chromium.org> Thu, 09 September 2021 19:40 UTC

Return-Path: <davidben@google.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 233DA3A1327 for <tls@ietfa.amsl.com>; Thu, 9 Sep 2021 12:40:30 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -9.949
X-Spam-Level:
X-Spam-Status: No, score=-9.949 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.452, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, USER_IN_DEF_SPF_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=chromium.org
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 4arlF2C-iX4f for <tls@ietfa.amsl.com>; Thu, 9 Sep 2021 12:40:25 -0700 (PDT)
Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) (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 07D973A1328 for <tls@ietf.org>; Thu, 9 Sep 2021 12:40:24 -0700 (PDT)
Received: by mail-pj1-x1029.google.com with SMTP id rj12-20020a17090b3e8c00b001991428ded8so1685226pjb.1 for <tls@ietf.org>; Thu, 09 Sep 2021 12:40:24 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=8DgWHVvUf0dtSFgEhaAEs8zrjraeWHZsgaHWeEQ8c48=; b=F/v5VeeSFvoZqWuJWqRYjQptSYCFwDDU7USr9MnpHEEoRfuCjmubTkY1ZaN+fmzMG+ lmHDe6fwCEsqqo2B88L7KoV1TgwREK3wFh4AZKAS/LDl6OjC90M/8Tbizu/iMOSO2wyY EvVBiBUEV+8bSmekzLPgsE2fJ+eSQFAfsIobw=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=8DgWHVvUf0dtSFgEhaAEs8zrjraeWHZsgaHWeEQ8c48=; b=3O/ZsIIHWhEKIDUv5hKVuxRTD6lI4/Zlj0uLCuswV+YwgqtGhB3qfU5h2R8/A2ACDX 33f9k9bo5K1oosJQJmpCF4Xta2BqwJe92CBc9GzGvblArtw0JWqN4mK9I6YTcVgFrOhE /INZ+aFC/kdXQRlfqD5crdtcW9VEpwXAIu55BtnT8vwgYqJ4yhhSzQJhY+1gZMwizcnd oVtShBw7DRmDbXFIRVU8SuJQ2RzUVFjkXiH0/NRejfcU4BnqL6ceL8MED6H9fUYmK16V k4t/idrt6VvXOsQBgb68au2JvArVlMs5AoJVmEAvVXkm0GgEXykCImTiaUj4UdU1HDLM EpKg==
X-Gm-Message-State: AOAM533LEUU9o/AG3VqGsO2XUJ6poAVN1t8sV1EbYiJsqgUD90ynMzwQ bLQkfaC02AIdXlR/zrrm7vRmjkhztFYeElZIcYNw
X-Google-Smtp-Source: ABdhPJymWkojHQImQF95/85fCH8YejiVx7YJ2okreFCswvyVNxo/nKXPlfo7EczNrqdzWdGQ1X9twipp09xTAZPcktk=
X-Received: by 2002:a17:90a:1009:: with SMTP id b9mr5298932pja.184.1631216421468; Thu, 09 Sep 2021 12:40:21 -0700 (PDT)
MIME-Version: 1.0
References: <163068481195.6396.4015668882511523788@ietfa.amsl.com> <6f0942ee-e946-48fb-96db-1fe35d2c1d46@redhat.com> <CAF8qwaBQdw5m7BAqaVL7hw9_1gDrw8=6uZSZfJ2BmzaOBpyY9g@mail.gmail.com> <25F5F4EE-7777-4C7C-8218-938392A59A5E@sn3rd.com>
In-Reply-To: <25F5F4EE-7777-4C7C-8218-938392A59A5E@sn3rd.com>
From: David Benjamin <davidben@chromium.org>
Date: Thu, 09 Sep 2021 15:40:05 -0400
Message-ID: <CAF8qwaDgeKcLBk0GMg3JZboehF4PrE=1XRT0fPq8CQ2S_1AsBw@mail.gmail.com>
To: Sean Turner <sean@sn3rd.com>
Cc: Hubert Kario <hkario@redhat.com>, TLS List <tls@ietf.org>
Content-Type: multipart/alternative; boundary="0000000000005b177605cb952bef"
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/58RLKytpHRbLh3xUWX9v09tNcac>
Subject: Re: [TLS] I-D Action: draft-ietf-tls-md5-sha1-deprecate-08.txt
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.29
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, 09 Sep 2021 19:40:30 -0000

On Thu, Sep 9, 2021 at 2:12 PM Sean Turner <sean@sn3rd.com> wrote:

>
> > On Sep 4, 2021, at 17:45, David Benjamin <davidben@chromium.org> wrote:
> >
> > On Fri, Sep 3, 2021 at 1:24 PM Hubert Kario <hkario@redhat.com> wrote:
> > On Friday, 3 September 2021 18:00:12 CEST, internet-drafts@ietf.org
> wrote:
> > > A New Internet-Draft is available from the on-line
> > > Internet-Drafts directories.
> > > This draft is a work item of the Transport Layer Security WG of the
> IETF.
> > >
> > >         Title           : Deprecating MD5 and SHA-1 signature
> > > hashes in (D)TLS 1.2
> > >         Authors         : Loganaden Velvindron
> > >                           Kathleen Moriarty
> > >                           Alessandro Ghedini
> > >       Filename        : draft-ietf-tls-md5-sha1-deprecate-08.txt
> > >       Pages           : 6
> > >       Date            : 2021-09-03
> > >
> > > Abstract:
> > >    The MD5 and SHA-1 hashing algorithms are increasingly vulnerable to
> > >    attack and this document deprecates their use in TLS 1.2 digital
> > >    signatures.  However, this document does not deprecate SHA-1 in HMAC
> > >    for record protection.  This document updates RFC 5246.
> > >
> > >
> > > The IETF datatracker status page for this draft is:
> > > https://datatracker.ietf.org/doc/draft-ietf-tls-md5-sha1-deprecate/
> > >
> > > There is also an htmlized version available at:
> > >
> https://datatracker.ietf.org/doc/html/draft-ietf-tls-md5-sha1-deprecate-08
> >
> > >   Servers SHOULD NOT include MD5 and SHA-1 in CertificateRequest
> > >   messages.
> >
> > >    Clients MUST NOT include MD5 and SHA-1 in CertificateVerify
> messages.
> > >   If a server receives a CertificateVerify message with MD5 or SHA-1 it
> > >   MUST abort the connection with handshake_failure or
> > >   insufficient_security alert.
> >
> > As written, this would make already existing implementations not RFC
> > compliant
> > when they are configured to not support SHA-1.
> >
> > RFC5246 requires the server to abort with illegal_parameter if the
> > CV included an algorithm that wasn't advertised in CR.
> >
> > Ah, good catch. There's also some odd asymmetry here. Section 4 talks
> about a server being unable to *send* a ServerKeyExchange (and uses the
> correct alerts). It says nothing about the client *receiving* an invalid
> (by ClientHello) ServerKeyExchange which is, as in the case you describe,
> an illegal_parameter. Meanwhile, Section 5 talks about the server
> *receiving* an invalid (by CertificateRequest) CertificateVerify, and with
> the wrong alerts. It says nothing about the client being unable to *send* a
> CertificateVerify.
> >
> > I don't feel very strongly about whether we talk about sending,
> receiving, or both, for each of these messages. But we should be consistent
> and use the right alerts. (Or we could just talk about preferences and let
> the message behavior fall out of that.)
>
> I think what might solve this is the following (I just included all of the
> text with 2119-language because there isn’t much of it):
>
> 2.  Signature Algorithms
>
>    Clients MUST include the signature_algorithms extension.  Clients
>    MUST NOT include MD5 and SHA-1 in this extension.
>
> 3.  Certificate Request
>
>    Servers SHOULD NOT include MD5 and SHA-1 in CertificateRequest
>    messages.
>
> 4.  Server Key Exchange
>
>    Servers MUST NOT include MD5 and SHA-1 in ServerKeyExchange messages.
>    If the client receives a ServerKeyExchange message indicating MD5 or
>    SHA-1, then it MUST abort the connection with an illegal_parameter
>    alert.
>
> 5.  Certificate Verify
>
>    Clients MUST NOT include MD5 and SHA-1 in CertificateVerify messages.
>    If a server receives a CertificateVerify message with MD5 or SHA-1, then
>    it MUST abort the connection with illegal_parameter alert.


LGTM with one comment. (Sorry, for all the last-minute comments! I didn't
notice this in my last email. :-( ) It is a little odd that servers
advertising MD5/SHA1 in CertificateRequest is merely a SHOULD NOT, but
rejecting them in CertificateVerify is a MUST NOT. Though that's also
present in the existing text. I forget how we ended up here. Was it to
allow for SHA-1 in the Certificate message?

...I wonder if that's why we ended up with the funny alerts. Because if the
server declines to do the SHOULD NOT, the client isn't doing anything
wrong, protocol-wise, by taking the server up on its offer of SHA-1.

If we want to keep it very simple, we could upgrade section 3 to MUST NOT
and avoid this problem, but I don't know if there was some reason for the
asymmetric expectations here. We could also condition the server rule in
section 5 on having taken the SHOULD NOT in section 3. (Prior to TLS 1.3,
there is no way to say "SHA-1 is okay in Certificate, but not okay in
CertificateVerify/ServerKeyExchange".)

David