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

Peter Gutmann <pgut001@cs.auckland.ac.nz> Tue, 13 March 2018 07:49 UTC

Return-Path: <pgut001@cs.auckland.ac.nz>
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 8559012D778 for <curdle@ietfa.amsl.com>; Tue, 13 Mar 2018 00:49:44 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.91
X-Spam-Level:
X-Spam-Status: No, score=-1.91 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, T_RP_MATCHES_RCVD=-0.01] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=auckland.ac.nz
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 yedtl8BPk1-0 for <curdle@ietfa.amsl.com>; Tue, 13 Mar 2018 00:49:43 -0700 (PDT)
Received: from mx4-int.auckland.ac.nz (mx4-int.auckland.ac.nz [130.216.125.246]) (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 8F8D2126CB6 for <curdle@ietf.org>; Tue, 13 Mar 2018 00:49:42 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=auckland.ac.nz; i=@auckland.ac.nz; q=dns/txt; s=mail; t=1520927382; x=1552463382; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=XXa9Q3njnLwX3/byGOcClAbSwp1yMGPjbv6jHCqX8Dw=; b=X2mQxDkAjkaie5HGyxr2N6p9FXVr3iaBF6e2sYN4zQ1TbNXxn2RJfQFn He+Fz0pmdO0GpgGo3HfinJ212ueNdEXDY72l9ZnnmeEWmtNOhRjcL59xb xYrCdZ8zDhXz7ogKJfyytE+b94YgWOdYQs2uvT7rsJRwEcxhjreZpch7o GZouDk8OyLbFmT3HU8cak7uUtLcbjQvpNGwO/QWXi6XyyPSC8HNMf1KMV PcdhBUqmv5JBjsImUP01xAxk6/CKehFa0htJmNjw8J55CMkEhCe54J3rP oyjg0rSznRgginuEpyjMtMNS96FYpj+sCVzjr7Zmz8NWBc830nVJZeeJE g==;
X-IronPort-AV: E=Sophos;i="5.47,464,1515409200"; d="scan'208";a="3959302"
X-Ironport-HAT: MAIL-SERVERS - $RELAYED
X-Ironport-Source: 10.6.3.9 - Outgoing - Outgoing
Received: from exchangemx.uoa.auckland.ac.nz (HELO uxcn13-tdc-e.UoA.auckland.ac.nz) ([10.6.3.9]) by mx4-int.auckland.ac.nz with ESMTP/TLS/AES256-SHA; 13 Mar 2018 20:49:36 +1300
Received: from uxcn13-ogg-d.UoA.auckland.ac.nz (10.6.2.5) by uxcn13-tdc-e.UoA.auckland.ac.nz (10.6.3.29) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Tue, 13 Mar 2018 20:49:36 +1300
Received: from uxcn13-ogg-d.UoA.auckland.ac.nz ([10.6.2.25]) by uxcn13-ogg-d.UoA.auckland.ac.nz ([10.6.2.25]) with mapi id 15.00.1263.000; Tue, 13 Mar 2018 20:49:36 +1300
From: Peter Gutmann <pgut001@cs.auckland.ac.nz>
To: denis bider <denisbider.ietf@gmail.com>
CC: Ron Frederick <ronf@timeheart.net>, "Salz, Rich" <rsalz@akamai.com>, "curdle@ietf.org" <curdle@ietf.org>, "Mark D. Baushke" <mdb@juniper.net>
Thread-Topic: [Curdle] Confirming a change to draft-ietf-curdle-rsa-sha2-12
Thread-Index: AQHTuWKiwRoSx0z86ka0CfIYgjsJJqPLx0qH//89swCAAQHAnP//eTiAgADfEm2AACHSAIAAOeIAgAEEGG7//yukgAAcBl2K
Date: Tue, 13 Mar 2018 07:49:35 +0000
Message-ID: <1520927373727.37109@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>
In-Reply-To: <CADPMZDBF1bZez7aV=rUoUFyW2t_e7jRuKfz1F8P06ajaawpnDQ@mail.gmail.com>
Accept-Language: en-NZ, en-GB, en-US
Content-Language: en-NZ
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-ms-exchange-transport-fromentityheader: Hosted
x-originating-ip: [130.216.158.4]
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Archived-At: <https://mailarchive.ietf.org/arch/msg/curdle/SfOvIqmn-uTtBMOexZrPXl7UFeU>
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 07:49:45 -0000

denis bider <denisbider.ietf@gmail.com> writes:

>> My read-integer code accepts leading zeroes and strips them,
>> based on implementations that assume e.g. a 1024-bit RSA key
>> always produces 128 bytes of output
>
>It does. :)

No it doesn't, it can produce shorter lengths with increasingly smaller
probabilities.

>> and memcpy() the result into a zero-filled 128-byte field.
>
>That's actually the correct encoding according to RFC 8017.

D'you mean I2OSP?  That takes a variable length as a parameter, it's not fixed
at any particular size.

The only format I know of that requires a fixed-length field, for no known
reason, is X9.62 and everything derived from it, which in practice means
everything that does ECC except for Curve25519/X25519/Ed25519/etc, which does
whatever it was djb felt like doing at the time.

Peter.