Re: [TLS] Enforcing stronger server side signature/hash combinations in TLS 1.2

Eric Rescorla <ekr@rtfm.com> Thu, 23 March 2017 16:58 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 D3813129A57 for <tls@ietfa.amsl.com>; Thu, 23 Mar 2017 09:58:30 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.598
X-Spam-Level:
X-Spam-Status: No, score=-2.598 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, URIBL_BLOCKED=0.001] 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 gv-SRC7D3zDa for <tls@ietfa.amsl.com>; Thu, 23 Mar 2017 09:58:28 -0700 (PDT)
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 7980B129A72 for <tls@ietf.org>; Thu, 23 Mar 2017 09:58:28 -0700 (PDT)
Received: by mail-yw0-x234.google.com with SMTP id v76so151269185ywg.0 for <tls@ietf.org>; Thu, 23 Mar 2017 09:58:28 -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=lpDZ1ZKyhLVnqBMKqiVXWmeaIoaxu4sXl6NvAGzpNDs=; b=VP3YGJMeILHQMikmJdgfa28ZdYe1f3LjYS35uGFFSiPxzhIZF0c6hgYYBtO3wY0w7R 2dwa1Vfr/3pU8hBjT55V8kONL73sD4CznEHqzETR/xcTsF9qncTUavTLZTi3FUEoAEv3 GfApaE367SWC9k3bFhLM+VcLeWAX9qKL3/USFsS6dzZjYpljVG+CX76/SCkIj1u3yEiJ /bgbfl7hWXQxQfkzeSRTcria073aUPECV64R3qaSI0H/CjJy6Te9dI/A/fe+BY9+nrD5 2Js/ZDFRQWG0u4AhmL0g2qSox46aRvz53bQlNADSsxYLsZQ59LJIiUyxMyBtPICY5+ov bKTw==
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=lpDZ1ZKyhLVnqBMKqiVXWmeaIoaxu4sXl6NvAGzpNDs=; b=qY+QxqoHCo8mTiYaa9GGnVStgg6f+FqmQ8SJF0vcqIfzkiN84jidrqq+FP0tRT4fnJ DwRrzq6ccPH0JDbfA6jqeYG6Qr+mBzspblhrPbkt8zFruHdPCIgSx3kN2rU+5UW0kvBS OZq33R9AaId4OH/qpnFt/cZGCZrKOy6m7mSaU0O6cfrEI0JENFJ9JQkGIZzmvHvp/gq3 iMkZIvjHgNZu7gLlOMLFh1h9jmfKBeu6zQyE/kYG3raq/DZU1FoEp5T26JpMp40D272w w4hHjuQXemEWKa3l3watwX1vMIwuvW3erYxcZF1ilLtB741eV17AO2MXmazKaQm8meFp CIJw==
X-Gm-Message-State: AFeK/H3kmDiT5g2g9LlStCbbLPoA65EPCP6Fgm/gVJAMoHvndkYUt9nPM9rInr2MQjb1lR/1BZhr9mz71bx3pg==
X-Received: by 10.13.204.206 with SMTP id o197mr2644651ywd.87.1490288307638; Thu, 23 Mar 2017 09:58:27 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.129.154.210 with HTTP; Thu, 23 Mar 2017 09:57:47 -0700 (PDT)
In-Reply-To: <E6C9F0E527F94F4692731382340B337846DE14@DENBGAT9EH2MSX.ww902.siemens.net>
References: <E6C9F0E527F94F4692731382340B337846DD1B@DENBGAT9EH2MSX.ww902.siemens.net> <4DD1F233-D659-4F79-9ADA-BC31A49DA653@dukhovni.org> <CABcZeBNu_9EHKWFzWFvtcUZ5GA5SQ8DbjHqEvn4yjBLH6=yuXg@mail.gmail.com> <E6C9F0E527F94F4692731382340B337846DE14@DENBGAT9EH2MSX.ww902.siemens.net>
From: Eric Rescorla <ekr@rtfm.com>
Date: Thu, 23 Mar 2017 09:57:47 -0700
Message-ID: <CABcZeBPfHWJDPWqtb9HcOi1714NF_xhQtLD1MwybAawgm_Xx5g@mail.gmail.com>
To: "Fries, Steffen" <steffen.fries@siemens.com>
Cc: TLS WG <tls@ietf.org>
Content-Type: multipart/alternative; boundary="001a114e6b3c30aad7054b68c9ea"
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/yl1mSHE9l1pI7jLS75zzezdoYDg>
Subject: Re: [TLS] Enforcing stronger server side signature/hash combinations in TLS 1.2
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: Thu, 23 Mar 2017 16:58:31 -0000

On Thu, Mar 23, 2017 at 8:37 AM, Fries, Steffen <steffen.fries@siemens.com>
wrote:

> Hi Erik,
>
>
>
> based on your reply my conclusion is that
>
> -          there is no (standard compliant) way for a server to use a
> SHA256 based certificate for server side authentication in cases where the
> client does not provide the signature_algorithm extension
>
Not quite. If the client offers TLS 1.1 or below, then you simply don't
know if it
will accept SHA-256 and you should send whatever you have. If the client
offers
TLS 1.2 and no signature_algorithm extension, then you technically are
forbidden
from sending it a SHA-256 certificate. Note that any client which in fact
supports
SHA-256 with TLS 1.2 but doesn't send signature_algorithms containing it,
is noncomformant. It's not clear to me how many such clients in fact exist.

-          clients should always use the signature algorithm extension to
> ensure the server can apply a certificate with the appropriate crypt
> algorithms
>
Yes.

-Ekr


>
>
> Best regards
>
> Steffen
>
>
>
> On Thu, Mar 23, 2017 at 7:39 AM, Viktor Dukhovni <ietf-dane@dukhovni.org>
> wrote:
>
>
> > On Mar 23, 2017, at 10:31 AM, Fries, Steffen <steffen.fries@siemens.com>
> wrote:
> >
> > According to  TLS 1.2 section 7.4.1.4.1. a client may use the
> > signature_algorithm extension to signal any combinations the
> > client supports, listed in the order of preferences.
>
> The signature algorithm is primarily about signatures made as part
> of the TLS handshake, and not so much signatures in certificates.
>
>
>
> This does not seem consistent with https://tools.ietf.org/
> rfcmarkup?doc=5246#section-7.4.2
>
>
>
> "If the client provided a "signature_algorithms" extension, then all
> certificates provided by
>
> the server MUST be signed by a hash/signature algorithm pair that appears
> in that extension."
>
>
>
> I appreciate that there are people who feel that this rule is bad, and
>
> to some extent it has been relaxed in 1.3, but I think the text is
>
> pretty clear here.
>
>
>
>
>
> > If the client does not use this extension, the server must use the
> > signature algorithm in combination with SHA1.
>
> For signing the TLS key exchange, however, it should still present
> whatever certificate chain it has, even if that chain employs SHA256.
> It is exceedingly unlikely these days that a client will not support
> SHA256 signatures in the certificate chain.
>
>
>
> Yes, that's generally true. Though a TLS 1.2 client which does not offer
> SHA-256
>
> in its ClientHello but accepts SHA-256 is broken. So, this should generally
>
> only happen with TLS 1.1 and below.
>
>
>
>
>
>
>
> > Unfortunately the server is not allowed to use this extension, otherwise
> > he could tell the client his preferences according to his security
> policy.
>
> The protocol (as it should) lacks the additional round-trips necessary for
> the server to initiate signature algorithm negotiation.
>
>
>
> I'm not sure quite what the OP Is trying to achieve here. For certificates
> offered
>
> by the server, the client just tells you what algorithms it will accept
> for no negotiation
>
> is needed. For certificates offered by the client, the server tells the
> client
>
> what algorithms it will accept in the CertificateRequest.
>
> https://tools.ietf.org/rfcmarkup?doc=5246#section-7.4.4
>
>
>
> -Ekr
>
> _______________________________________________
> TLS mailing list
> TLS@ietf.org
> https://www.ietf.org/mailman/listinfo/tls
>
>