Re: [TLS] Possible TLS 1.3 erratum

Hubert Kario <hkario@redhat.com> Mon, 19 July 2021 13:25 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 CADC93A33A6 for <tls@ietfa.amsl.com>; Mon, 19 Jul 2021 06:25:57 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.249
X-Spam-Level:
X-Spam-Status: No, score=-3.249 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, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=redhat.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 f_AvRlEz4RV9 for <tls@ietfa.amsl.com>; Mon, 19 Jul 2021 06:25:53 -0700 (PDT)
Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 5F86C3A33A9 for <tls@ietf.org>; Mon, 19 Jul 2021 06:25:53 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1626701152; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JbtIXxAZlU1b6gnBJoccEBjiNPmWsyDO9n4VCgE9Dg0=; b=T1cGZPdaPfGvtswHSn+uB5HzCD3mHzPyc74ni9rpSrOv/io5uN36pugf/LZnpDmk/oc+V5 WMfMC4zlBsf+srN7Yyz9Uqog/K5rhc1CAHGYVz7z+7+RotnRryD8uz8imbsvbxliyviTRj AVHTheh6skQfHqDkVshL6fK5to/UO9o=
Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-469-4-6_Mw81O1moIw5ogNsWnQ-1; Mon, 19 Jul 2021 09:25:50 -0400
X-MC-Unique: 4-6_Mw81O1moIw5ogNsWnQ-1
Received: by mail-wm1-f72.google.com with SMTP id l17-20020a05600c4f11b0290225ef65c35dso3981772wmq.2 for <tls@ietf.org>; Mon, 19 Jul 2021 06:25:50 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:mime-version:message-id :in-reply-to:references:organization:user-agent :content-transfer-encoding; bh=dcChwk4Y8CJ1OiCI7DMcjF1bEmIiHu1uZF5G6pRIS1Q=; b=tQgqfWFrphRpaouwtvqCgTlJxWB0YZBZXy+OhF82V6dfy0W1zq7JW+tZU7dpXdLwVg SgQQPjIUvHUIONhDlIOWqX7MyX5k/oCsNTGFJU8kBDZWy5m92qVXmsJPGgwE5e6BnHcC PD2lIniIDeaosrgmaSuaVv03zAzr6lBOh9v/YKt1CViftiqvcXJlGpIbzBlNqLsAmkTI yAmRD04TfKEnpQW+qPQV3g02l0XmKZcziD7sQoovOuODFYbq41QQAE6iyl92d/Aon9NE LxHtn+qEP6nDSV310ereJvdn1nuqJRZ173dh9n9dnX+EgzOC3on4OIdzxNqPwljfmQv2 8R9A==
X-Gm-Message-State: AOAM533vp+q1pKSLL2oEIyEyDL/IbxCDY+BaWfvDW9bIoRBkzuwQgofm nj65ZyHBTfcPW5TABOyvMeIqZbSggYaJHn40ERZWU5yTMdTpiQH57MNPS88yN4qswCBGMUhiS0G uclc=
X-Received: by 2002:adf:9bd7:: with SMTP id e23mr30295008wrc.349.1626701149627; Mon, 19 Jul 2021 06:25:49 -0700 (PDT)
X-Google-Smtp-Source: ABdhPJzLpH3DN/VolFjnZWuOjmHi0jh85CXukN8AItnb1x5SVdViPrAV9m/T2kNj/ZCn2W8NZyf0jw==
X-Received: by 2002:adf:9bd7:: with SMTP id e23mr30294994wrc.349.1626701149391; Mon, 19 Jul 2021 06:25:49 -0700 (PDT)
Received: from localhost (ip-94-112-13-200.net.upcbroadband.cz. [94.112.13.200]) by smtp.gmail.com with ESMTPSA id j16sm20181074wrw.62.2021.07.19.06.25.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Jul 2021 06:25:49 -0700 (PDT)
From: Hubert Kario <hkario@redhat.com>
To: Peter Gutmann <pgut001@cs.auckland.ac.nz>
Cc: Ilari Liusvaara <ilariliusvaara@welho.com>, <tls@ietf.org>
Date: Mon, 19 Jul 2021 15:25:47 +0200
MIME-Version: 1.0
Message-ID: <db76d008-f90e-4f6c-ae47-dd4971d8ce13@redhat.com>
In-Reply-To: <SY4PR01MB6251452C5CD94479D34112DBEEE19@SY4PR01MB6251.ausprd01.prod.outlook.com>
References: <SY4PR01MB6251452C5CD94479D34112DBEEE19@SY4PR01MB6251.ausprd01.prod.outlook.com>
Organization: Red Hat
User-Agent: Trojita/0.7-git; Qt/5.15.2; xcb; Linux; Fedora release 33 (Thirty Three)
Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=hkario@redhat.com
X-Mimecast-Spam-Score: 0
X-Mimecast-Originator: redhat.com
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/W22kx6yVgRmBHTC22Nsz6cmNGJM>
Subject: Re: [TLS] Possible TLS 1.3 erratum
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: Mon, 19 Jul 2021 13:25:58 -0000

On Monday, 19 July 2021 14:06:41 CEST, Peter Gutmann wrote:
> Ilari Liusvaara <ilariliusvaara@welho.com> writes:
>
>> Actually, I think this is quite messy issue:
>
> It certainly is.
>
>> Signature schemes 0x0403, 0x0503 and 0x0603 alias signature 
>> algoritm 3 hash
>> 4, 5 and 6. However, those two things are not the same, because the former
>> have curve restriction, but the latter do not.
>
> That and the 25519/448 values are definitely the weirdest of the lot.  In
> particular the value 0x03 means P256 when used with SHA256, P384 when used
> with SHA384, and P521 when used with SHA512.
>
>> So one algorithm one could use is:
>> 
>> - Handle anything with signature 0-3/224-255 and hash 0-6/224-255 as
>>  signature/hash pair.
>> - Display schemes 0x0840 and 0x0841 specially.
>> - Handle anything else as signature scheme.
>
> I think an easier, meaning with less special cases, way to 
> handle it is for a
> TLS 1.2 implementation to treat the values defined in 5246 as { hash,
> signature } pairs and for TLS 1.3 and newer implementations to treat all
> values as 16-bit cipher suites, combined with a reworking of 
> the definitions,
> e.g. to define the "ed25519" suite in terms of the curve and hash algorithm,
> not just "Ed25519 and you're supposed to know the rest".
>
>> The reason is that some TLS implementations have very hard time supporting
>> RSA-PSS certificates.
>
> But why should the TLS layer care about what OID is used to represent an RSA
> key in a certificate?  The signature at the TLS level is either a PSS
> signature or it isn't, it doesn't matter which OID is used in 
> the certificate
> that carries the key.

It only doesn't matter if you don't want to verify the certificate...

It's one thing to be able to be able to verify an RSA-PSS signature on
TLS level, it's entirely another to be able to properly handle all the
different RSA-PSS limitations when using it in SPKI in X.509.

> More to the point, the TLS layer may have no way to determine which OID is
> used in the certificate, it's either an RSA key or not, not "it's an RSA key
> with OID A" or "it's an RSA key with OID B".
>
> So I think for bis the text should rename rsa_pss_rsae_xxx to 
> just rsa_pss_xxx
> and drop rsa_pss_pss_xxx, which I assume has never been used 
> anyway because I
> don't know of any public CA that'll issue a certificate with a PSS OID.

That's because browsers don't have the code to handle RSA-PSS certificates.
But that doesn't mean that there is no code that can do that.
-- 
Regards,
Hubert Kario
Senior Quality Engineer, QE BaseOS Security team
Web: www.cz.redhat.com
Red Hat Czech s.r.o., Purky┼łova 99/71, 612 45, Brno, Czech Republic