Re: [Curdle] Confirming a change to draft-ietf-curdle-rsa-sha2-12

denis bider <denisbider.ietf@gmail.com> Tue, 13 March 2018 10:20 UTC

Return-Path: <denisbider.ietf@gmail.com>
X-Original-To: curdle@ietfa.amsl.com
Delivered-To: curdle@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id B584A12D87B for <curdle@ietfa.amsl.com>; Tue, 13 Mar 2018 03:20:59 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.698
X-Spam-Level:
X-Spam-Status: No, score=-2.698 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, 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 AUL_WOwvbzkT for <curdle@ietfa.amsl.com>; Tue, 13 Mar 2018 03:20:58 -0700 (PDT)
Received: from mail-qk0-x236.google.com (mail-qk0-x236.google.com [IPv6:2607:f8b0:400d:c09::236]) (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 0E12B12D878 for <curdle@ietf.org>; Tue, 13 Mar 2018 03:20:58 -0700 (PDT)
Received: by mail-qk0-x236.google.com with SMTP id o25so14688163qkl.7 for <curdle@ietf.org>; Tue, 13 Mar 2018 03:20:58 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=tEcKSaMjH62lCODzuHNaYPcaMh5BBcJYnz8pnAdHD70=; b=tveeylU1KrHVQgDtNgLV1tcvoC+s63X46vyBncUbvNwGJ4NtGNnP5qH/JUuMjr98x2 x4CHcl75NEaUgA8ktN+nLBgl/gJau0OUDtAvfmkP4vUiHckjC2i54FNzkUH9XLIzVsAr feyA+z3uU4GhXRIcdqvKsRkSBR2p9VvriJRZklmZO5t3sUQpnGjViN0XIkwe8upWU8FJ gIwK0a0Uz+dpJehKmmJPKzdjwUw22iLgnwpdP6wWm8n0CyQ+v4I9cA6vv91Ow9dXuhJ3 FQDMNmnqyU7A/lpOOlAh+hP0oQJ+7IEDIKqi6RzLPbdNL0u052LxPioU2ln8IX9HD+Ef D0Kg==
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=tEcKSaMjH62lCODzuHNaYPcaMh5BBcJYnz8pnAdHD70=; b=CFH7t5//AZH8IT6zXdtvKh2gFdMtfB7LBMWhssTSRfZ4KUqf2v2YqyYqG5WI0yxDRl TMqOnWBd89YCETwTwFXxaL2t3ho8lxn64l5Rp2jiVkM7FSUMQt5+jJpIDsepXN6RgLb0 A1JuX2Fx40JVwKAyDWpzPXe9HjeMjhvpu8k8g6zEAqBYaoRAX6Pvu+E73eb5RYz3ArBV LTw3Azsy8VNV6+JkR24jjdGH5k1uQDetiFBMnyf6t35niIgQX8nIbNV7RGZedG+Vwhur CdN3leK4wZ3fjP0K61r80NkfNn+lTUScvuFxnc89a1gDrTVwWhZvsyX5fHhEkQWarfDg J9gA==
X-Gm-Message-State: AElRT7Gr83PPHe2knbP857M/QEAaTIt9OdQdswQs5IbRZ1gbDUd+mUvC 3nIF303xiHiSVsz0rc5T86gd/WEjgU/nb00JOUA=
X-Google-Smtp-Source: AG47ELsVNa+Z7fBE1ylMJ7jkJSV6X/5t+HECvYS78qnRcdEr1N0hh1cUINB43SYD7XTB3hKbjXxhRgOrHdoiUTkpzv4=
X-Received: by 10.55.107.70 with SMTP id g67mr67656qkc.105.1520936457088; Tue, 13 Mar 2018 03:20:57 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.12.225.71 with HTTP; Tue, 13 Mar 2018 03:20:56 -0700 (PDT)
In-Reply-To: <1520932717731.67261@cs.auckland.ac.nz>
References: <4C40F019-21FB-46AC-95D3-CC94BB976AAB@akamai.com> <12087.1520816187@eng-mail01.juniper.net> <CADPMZDCwRN-GHXhAe=-xPFHMnUBN39UWmENGNUeLbFkneEAgcA@mail.gmail.com> <17856.1520829824@eng-mail01.juniper.net> <CADPMZDBnG1hv5D74vLv2bXqxZjceJgHQ9oYrufKHskLdV7nRSQ@mail.gmail.com> <28093.1520848786@eng-mail01.juniper.net> <40465B0B-FED4-4C16-A5C3-7E2C04E1B666@timeheart.net> <CADPMZDDXi_h1uXzWJy37HXMrogQxJ5+Sd-G7ZZzfZJX_s390TA@mail.gmail.com> <1520924499970.11406@cs.auckland.ac.nz> <CADPMZDBF1bZez7aV=rUoUFyW2t_e7jRuKfz1F8P06ajaawpnDQ@mail.gmail.com> <1520927373727.37109@cs.auckland.ac.nz> <CADPMZDBXUjTSDj7V6m0EvAJveEuU_TswPOL0+cuHsQaew9cA6Q@mail.gmail.com> <1520930362726.75879@cs.auckland.ac.nz> <CADPMZDAM-MSZMTHk9j_sqRtC1XJyBMPi7aNZLExqWY2+1ACyFg@mail.gmail.com> <1520932717731.67261@cs.auckland.ac.nz>
From: denis bider <denisbider.ietf@gmail.com>
Date: Tue, 13 Mar 2018 05:20:56 -0500
Message-ID: <CADPMZDBrjU73Z3J30rQuTGuw_EAH0sMdRzLjWfh-O0FcJenHVw@mail.gmail.com>
To: Peter Gutmann <pgut001@cs.auckland.ac.nz>
Cc: Ron Frederick <ronf@timeheart.net>, "Salz, Rich" <rsalz@akamai.com>, "curdle@ietf.org" <curdle@ietf.org>, "Mark D. Baushke" <mdb@juniper.net>
Content-Type: multipart/alternative; boundary="001a114873f240331c0567489d5c"
Archived-At: <https://mailarchive.ietf.org/arch/msg/curdle/UrRCVTBpcs3fHfkdcXvg2n45Ov8>
Subject: Re: [Curdle] Confirming a change to draft-ietf-curdle-rsa-sha2-12
X-BeenThere: curdle@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: "List for discussion of potential new security area wg." <curdle.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/curdle>, <mailto:curdle-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/curdle/>
List-Post: <mailto:curdle@ietf.org>
List-Help: <mailto:curdle-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/curdle>, <mailto:curdle-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 13 Mar 2018 10:21:00 -0000

Well, to me, "without padding" means "don't add ornamentation to S". It
does not mean "trim leading zeros from S", since the spec says we're using
RSASSA-PKCS1-v1_5, and the output of that is S with a fixed-length
encoding. :)

But yes:

> Given that this has been ambiguous for untold years,
> it might be a good idea to mention that you shouldn't
> expect to find this fixed-length zero-padded encoding
> but may get a form, uh "without lengths or padding".

That is what we're doing. :) The reason for this discussion is that I
requested a sentence added (to draft-ietf-curdle-rsa-sha2) to clarify that
both S and leading-zero-trimmed-S are acceptable.

denis



On Tue, Mar 13, 2018 at 4:18 AM, Peter Gutmann <pgut001@cs.auckland.ac.nz>
wrote:

> denis bider <denisbider.ietf@gmail.com> writes:
>
> >The problem with this phrasing is that it doesn't say:
> >
> >encode "S" as specified in RSASSA-PKCS1-v1_5
> >
> >It instead says:
> >
> >[...]
> >
> >- "a string containing s (which is an integer, without lengths or padding,
> >unsigned, and in network byte order)"
>
> By saying "without lengths or padding" it seems to be saying that you
> shouldn't zero-pad.  Or at least that's how I interpreted it.
>
> >Because of this ambiguity, the spec for "rsa-sha2-256" and "rsa-sha2-512"
> -
> >which is the subject of present discussion - comes out and says
> explicitly:
> >though shalt encode "S". Which is fixed-length.
>
> Given that this has been ambiguous for untold years, it might be a good
> idea
> to mention that you shouldn't expect to find this fixed-length zero-padded
> encoding but may get a form, uh "without lengths or padding".  I don't care
> either way since my code will handle both forms, but there are
> I-don't-know-
> how-many different SSH implementations out there where we can't easily tell
> what they do.
>
> >It has been like that since the first version if the draft, in November
> 2015,
> >which you reviewed. :)
>
> Well, yeah, but that text says different things to different people :-).
>
> Peter.
>