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

mrex@sap.com (Martin Rex) Tue, 12 September 2017 13:21 UTC

Return-Path: <mrex@sap.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 048CC133049 for <tls@ietfa.amsl.com>; Tue, 12 Sep 2017 06:21: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 AHxj9ye91pPG for <tls@ietfa.amsl.com>; Tue, 12 Sep 2017 06:21:32 -0700 (PDT)
Received: from smtpde01.smtp.sap-ag.de (smtpde01.smtp.sap-ag.de [155.56.68.170]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 1217513304C for <tls@ietf.org>; Tue, 12 Sep 2017 06:21:32 -0700 (PDT)
Received: from mail07.wdf.sap.corp (mail04.sap.corp [194.39.131.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtpde01.smtp.sap-ag.de (Postfix) with ESMTPS id 3xs56K6p7nz1HW3; Tue, 12 Sep 2017 15:21:29 +0200 (CEST)
X-purgate-ID: 152705::1505222489-000014F4-D0725BDC/0/0
X-purgate-size: 1185
X-purgate: clean
X-purgate: This mail is considered clean (visit http://www.eleven.de for further information)
X-purgate-Ad: Categorized by eleven eXpurgate (R) http://www.eleven.de
X-purgate-type: clean
X-SAP-SPAM-Status: clean
Received: from ld9781.wdf.sap.corp (ld9781.wdf.sap.corp [10.21.82.193]) by mail07.wdf.sap.corp (Postfix) with ESMTP id 3xs56K5LhpzGpR2; Tue, 12 Sep 2017 15:21:29 +0200 (CEST)
Received: by ld9781.wdf.sap.corp (Postfix, from userid 10159) id AB29E1A6F4; Tue, 12 Sep 2017 15:21:29 +0200 (CEST)
In-Reply-To: <20170912122506.qa56yifturgbxadw@LK-Perkele-VII>
To: Ilari Liusvaara <ilariliusvaara@welho.com>
Date: Tue, 12 Sep 2017 15:21:29 +0200
CC: Martin Rex <mrex@sap.com>, Eric Rescorla <ekr@rtfm.com>, "tls@ietf.org" <tls@ietf.org>
Reply-To: mrex@sap.com
X-Mailer: ELM [version 2.4ME+ PL125 (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="US-ASCII"
Message-Id: <20170912132129.AB29E1A6F4@ld9781.wdf.sap.corp>
From: mrex@sap.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/xbwQ6TL3vHi8xMRTWrWbPgQlfCo>
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 13:21:36 -0000

Ilari Liusvaara wrote:
> On Tue, Sep 12, 2017 at 01:02:19PM +0200, Martin Rex wrote:
>> 
>> A new TLS extension to convey acceptable signatures on certs would be
>> needed, and for this, it would be preferable to pass along ASN.1
>> OIDs from AlgIds (not full AlgIds, this would be too messy with RSA-PSS).  
> 
> With RSA-PSS, there is also the parametrization signature by hashes.
> 
> The implementation I have supports the following six sets of parameters
> for RSA-PSS:
> 
> - hash=SHA-256, mgf=MGF1[SHA-256], salt=256, trailer=1
> - hash=SHA-384, mgf=MGF1[SHA-384], salt=384, trailer=1
> - hash=SHA-512, mgf=MGF1[SHA-512], salt=512, trailer=1
> - hash=SHA3-256, mgf=MGF1[SHA3-256], salt=256, trailer=1
> - hash=SHA3-384, mgf=MGF1[SHA3-384], salt=384, trailer=1
> - hash=SHA3-512, mgf=MGF1[SHA3-512], salt=512, trailer=1


The salt length is supposed to be in bytes, not bits, and for SHA-1
defaults to 20.  The salt length suggested in the standard is the
output size of the underlying hash length in bytes.

But it seems that some existing implementations use weird/unusual salt
values for RSA-PSS signature with hash algs other than SHA-1.

-Martin