Re: [TLS] RSASSA-PSS in certificates and "signature_algorithms"

Hubert Kario <hkario@redhat.com> Tue, 12 September 2017 17:30 UTC

Return-Path: <hkario@redhat.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 7B791132EC4 for <tls@ietfa.amsl.com>; Tue, 12 Sep 2017 10:30:36 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.921
X-Spam-Level:
X-Spam-Status: No, score=-6.921 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-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 gPOSPDF26Yd4 for <tls@ietfa.amsl.com>; Tue, 12 Sep 2017 10:30:35 -0700 (PDT)
Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 9341E1200F3 for <tls@ietf.org>; Tue, 12 Sep 2017 10:30:35 -0700 (PDT)
Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3B0F3C0587FE; Tue, 12 Sep 2017 17:30:35 +0000 (UTC)
DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 3B0F3C0587FE
Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=hkario@redhat.com
Received: from pintsize.usersys.redhat.com (unknown [10.43.21.223]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0C81377DE0; Tue, 12 Sep 2017 17:30:32 +0000 (UTC)
From: Hubert Kario <hkario@redhat.com>
To: tls@ietf.org
Date: Tue, 12 Sep 2017 19:30:30 +0200
Message-ID: <5159391.MM5YjT3ssF@pintsize.usersys.redhat.com>
In-Reply-To: <68691b3c-3496-527c-e211-2a17a7c7b555@drh-consultancy.co.uk>
References: <20170908225948.GC31695@al> <1505225444.4161.35.camel@redhat.com> <68691b3c-3496-527c-e211-2a17a7c7b555@drh-consultancy.co.uk>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="nextPart2257818.DIBmMet8D4"; micalg="pgp-sha512"; protocol="application/pgp-signature"
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Tue, 12 Sep 2017 17:30:35 +0000 (UTC)
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/vi4lS4ojjRGXX4_GJDyeMe9xY_8>
Subject: Re: [TLS] RSASSA-PSS in certificates and "signature_algorithms"
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: Tue, 12 Sep 2017 17:30:36 -0000

On Tuesday, 12 September 2017 17:42:31 CEST Dr Stephen Henson wrote:
> On 12/09/2017 15:10, Nikos Mavrogiannopoulos wrote:
> > That is, because a TLS server would typically sign with whatever
> > algorithm the client supports and would very rarely be interested to
> > utilize the security advantages of including the parameters (which,
> > advantages, are quite unclear even to a crypto expert). Otherwise, a
> > certificate restricted to SHA-384 and 48-bytes of salt, will not be
> > able to serve a client which only supports RSASSA-PSS with SHA-256.
> > 
> > As such, it would make sense for TLS 1.3 to recommend no parameters for
> > such RSASSA-PSS certificates, to ease their deployment.
> 
> Well restrictions in CA keys would be handled by the PKI verifier: if there
> is a violation the chain should be rejected and it's a problem with the
> chain itself and an error by the CA that issued it. A different case is
> where the restrictions are legal from a PKIX standpoint but not allowed by
> TLS 1.3, though again it's a CA error issuing such a chain for TLS 1.3 use.
> 
> A restriction on the EE key isn't quite the same. There are two cases.
> 
> One is that the parameters are not permitted by TLS 1.3 at all (e.g. MGF1
> digest doesn't match signing digest or minimum salt length exceeds digest
> length). In this case a server should never present the chain or if it does
> a client would justifiably reject it and abort the handshake. Again this is
> an error by the issuing authority which should be corrected.
> 
> The second case is that the parameter restriction is permitted by TLS 1.3
> and this limits the digest which the key can sign with. Say the restriction
> is SHA384 and the client only supports rsa_pss_sha256. The server might
> then use to a different PSS key (and certificate chain) that supports
> rsa_pss_sha256 or fall back to an RSA key to use rsa_pss_sha256. Again if a
> client sees a TLS message signed with parameters that violate the
> restrictions it could (with some justification) abort the handshake.
> 
> This could get pretty messy: it requires a logic not used in any other
> algorithm. I'd be more than happy to have an outright prohibition on EE PSS
> key parameter restrictions in TLS 1.3 so implementers don't have to bother
> with this.

what about hardware tokens that support only specific hashes or signatures?
(I've seen ones that can do only RSA with SHA256 and SHA-1, but not SHA-384 or 
SHA-512) Isn't it basically the same code path (though the limitation does 
come from slightly different place).
-- 
Regards,
Hubert Kario
Senior Quality Engineer, QE BaseOS Security team
Web: www.cz.redhat.com
Red Hat Czech s.r.o., Purkyňova 115, 612 00  Brno, Czech Republic