Re: [CFRG] RSA PSS Salt Length for HTTP Message Signatures

Neil Madden <neil.e.madden@gmail.com> Sat, 29 May 2021 09:14 UTC

Return-Path: <neil.e.madden@gmail.com>
X-Original-To: cfrg@ietfa.amsl.com
Delivered-To: cfrg@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id D0C1E3A1164 for <cfrg@ietfa.amsl.com>; Sat, 29 May 2021 02:14:13 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.097
X-Spam-Level:
X-Spam-Status: No, score=-2.097 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_BLOCKED=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 (2048-bit key) header.d=gmail.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 e5BR2rR5oPB2 for <cfrg@ietfa.amsl.com>; Sat, 29 May 2021 02:14:09 -0700 (PDT)
Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) (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 2CBA33A1166 for <Cfrg@irtf.org>; Sat, 29 May 2021 02:14:08 -0700 (PDT)
Received: by mail-wm1-x336.google.com with SMTP id s5-20020a7bc0c50000b0290147d0c21c51so3636880wmh.4 for <Cfrg@irtf.org>; Sat, 29 May 2021 02:14:08 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=content-transfer-encoding:from:mime-version:subject:date:message-id :references:cc:in-reply-to:to; bh=opnLkysyhpPI9NW2wdIQHyCv5K+ET0n+aihRDwOf2Xo=; b=oRXSu41Pxg1pGuTjHiwT+EPLRUD0tYd3yBgVAUqdNshWhw97zDSiZMNeTQjKWTS97R 0y5Sn/6OGcenZN6M7MfKyxC8efDGeHmCz/hU9G2BZMP25C/lbXULQczXDtgMhA5Z0aPH /H+Xe8O4+0rrAr/d0mjh1dCdZ1aJC/TJhRBPyZdfmO1ZUlYkQVkURC6RtNYnhnm/itxA ul6NEBQ8R/NAQswxpMjt2lxLYrl7LXndXRUtHVh8k+bt5/goXHNdmZlvWwmHVdGvlzdv KsAAfdF8aKan8ICqZTkVQydM0xPZ6FN5qKQRvrVbKKeiAHSfD4R6qB4TWRAHl6HhO7tO uLXQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:date:message-id:references:cc:in-reply-to:to; bh=opnLkysyhpPI9NW2wdIQHyCv5K+ET0n+aihRDwOf2Xo=; b=g/ydGg1g1OdLaFMQX2xmGA5qWAn8143rXvfU1lf5xy72JVq6DkDbI+07GfWkMemSfe pbY4/C3kvsFuLr85orq4q3O7B87/DagvV81AGsdZhxCOx5Yb4ri9PTqleCB3/PwuCMIt SbNMaaqy0Au2rYYK8VG0Y4JBEzOCAfYzwFnDe9m9l4DRxzdi6CiKcDqe12sWVESKn48G t8jONGeInd7JN6t69/7p83GmmwNYKhvyCy7wzP7p0hHRNcxHPZq1jRACvH96rlka5pTN mQWpLty/aLi87ruCroD3SDWk6rAET8v0rbVB3hEYmYxHQ3u1AHYTz5JGRcUH8EqyCXJm 6oxg==
X-Gm-Message-State: AOAM5310YSf7Y3NaPrH+Gr1F5DHS1tyafBWFft6IAi5hFFbVH1wtgX6Q r27l0RDAIxtLVfXScDt7aRE=
X-Google-Smtp-Source: ABdhPJyn3ykslQ3LNFjagauZlo0gttQwIvgY90shNt8GqoTGN1GBc5GcxVtn8i/IehpCdcQxf5ZPRg==
X-Received: by 2002:a7b:cf15:: with SMTP id l21mr12437000wmg.30.1622279646574; Sat, 29 May 2021 02:14:06 -0700 (PDT)
Received: from [10.0.0.5] (252.207.159.143.dyn.plus.net. [143.159.207.252]) by smtp.gmail.com with ESMTPSA id v18sm11536740wro.18.2021.05.29.02.14.05 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 29 May 2021 02:14:06 -0700 (PDT)
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
From: Neil Madden <neil.e.madden@gmail.com>
Mime-Version: 1.0 (1.0)
Date: Sat, 29 May 2021 10:14:04 +0100
Message-Id: <D9B7C7B1-9677-4E7A-A8CE-D3822B067AEB@gmail.com>
References: <SY4PR01MB62518EDBDBF1867BDBC2EAE2EE229@SY4PR01MB6251.ausprd01.prod.outlook.com>
Cc: Justin Richer <jricher@mit.edu>, IRTF CFRG <Cfrg@irtf.org>
In-Reply-To: <SY4PR01MB62518EDBDBF1867BDBC2EAE2EE229@SY4PR01MB6251.ausprd01.prod.outlook.com>
To: Peter Gutmann <pgut001@cs.auckland.ac.nz>
X-Mailer: iPhone Mail (18D70)
Archived-At: <https://mailarchive.ietf.org/arch/msg/cfrg/MHu0jfuDSJBx6nbuQH4EwrYhabw>
Subject: Re: [CFRG] RSA PSS Salt Length for HTTP Message Signatures
X-BeenThere: cfrg@irtf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Crypto Forum Research Group <cfrg.irtf.org>
List-Unsubscribe: <https://www.irtf.org/mailman/options/cfrg>, <mailto:cfrg-request@irtf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cfrg/>
List-Post: <mailto:cfrg@irtf.org>
List-Help: <mailto:cfrg-request@irtf.org?subject=help>
List-Subscribe: <https://www.irtf.org/mailman/listinfo/cfrg>, <mailto:cfrg-request@irtf.org?subject=subscribe>
X-List-Received-Date: Sat, 29 May 2021 09:14:14 -0000

On 28 May 2021, at 04:11, Peter Gutmann <pgut001@cs.auckland.ac.nz> wrote:
> 
> Justin Richer <jricher@mit.edu> writes:
> 
>> When I was just updating my test vector implementation I saw this as another
>> optional parameter alongside the salt length and so I was about to ask if
>> this was important to specify. I see here that it is. :)
> 
> I would recommend specifying a complete cipher suite that locks down every
> single variable parameter to a fixed value, hashes, MGFs, data block sizes,
> everything.  Without that you're always going to get some implementation that
> creates fully standards-compliant signatures that, nevertheless, nothing else
> can deal with.
> 
> Or, as I mentioned, use encode-then-memcmp() PKCS #1, since there's nothing to
> get wrong in there.

By this do you mean *constant-time* memcmp? Otherwise that seems something quite easy to get wrong. 

— Neil