Re: ssh-ed25519 implementations

"Mark D. Baushke" <mdb@juniper.net> Fri, 12 May 2017 06:39 UTC

Return-Path: <bounces-ietf-ssh-owner-secsh-tyoxbijeg7-archive=lists.ietf.org@NetBSD.org>
X-Original-To: ietfarch-secsh-tyoxbijeg7-archive@ietfa.amsl.com
Delivered-To: ietfarch-secsh-tyoxbijeg7-archive@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 958C8128B37 for <ietfarch-secsh-tyoxbijeg7-archive@ietfa.amsl.com>; Thu, 11 May 2017 23:39:26 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.09
X-Spam-Level:
X-Spam-Status: No, score=-4.09 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001, RCVD_IN_DNSWL_MED=-2.3, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, T_DKIM_INVALID=0.01, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=fail (1024-bit key) reason="fail (body has been altered)" header.d=juniper.net
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 WqkVL8wsZWyY for <ietfarch-secsh-tyoxbijeg7-archive@ietfa.amsl.com>; Thu, 11 May 2017 23:39:23 -0700 (PDT)
Received: from mail.netbsd.org (mail.NetBSD.org [IPv6:2001:470:a085:999::25]) (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 717A4129ADC for <secsh-tyoxbijeg7-archive@lists.ietf.org>; Thu, 11 May 2017 23:34:45 -0700 (PDT)
Received: by mail.netbsd.org (Postfix, from userid 605) id DCBC28559D; Fri, 12 May 2017 06:34:44 +0000 (UTC)
Delivered-To: ietf-ssh@netbsd.org
Received: by mail.netbsd.org (Postfix, from userid 1347) id 45B2E85599; Fri, 12 May 2017 06:34:44 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 8A2E785582 for <ietf-ssh@NetBSD.org>; Fri, 12 May 2017 05:22:02 +0000 (UTC)
X-Virus-Scanned: amavisd-new at netbsd.org
Authentication-Results: mail.netbsd.org (amavisd-new); dkim=pass (1024-bit key) header.d=juniper.net
Received: from mail.netbsd.org ([IPv6:::1]) by localhost (mail.netbsd.org [IPv6:::1]) (amavisd-new, port 10025) with ESMTP id o1gAdyOdfk7O for <ietf-ssh@netbsd.org>; Fri, 12 May 2017 05:22:01 +0000 (UTC)
Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on070f.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe49::70f]) by mail.netbsd.org (Postfix) with ESMTP id 3A83084CEA for <ietf-ssh@NetBSD.org>; Fri, 12 May 2017 05:21:58 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=juniper.net; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=4Zd9k3TB7C7WvaXcK/faS1/NRdHk3tVXzINyY/n+zYM=; b=ituqSBQNsTQ+trCRgHYq3qlg6RLaXs/cxj4OpiBUuOuQeG/mXK6GWwe5nwE6IGwA27bxkkUYabqWqma1IhGdB0uzeqq2bNedhP744OPh9HoFgqPbmJJgTWEJJ/UfRmw2wWFJMVh+U808ZcOv3MODlfYJayv8U97jhAb0xPgHclo=
Received: from BY2PR05CA033.namprd05.prod.outlook.com (10.141.250.23) by BN1PR05MB261.namprd05.prod.outlook.com (10.141.65.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1084.7; Fri, 12 May 2017 05:21:55 +0000
Received: from BY2NAM05FT043.eop-nam05.prod.protection.outlook.com (2a01:111:f400:7e52::206) by BY2PR05CA033.outlook.office365.com (2a01:111:e400:2c5f::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1084.7 via Frontend Transport; Fri, 12 May 2017 05:21:54 +0000
Authentication-Results: spf=softfail (sender IP is 66.129.239.12) smtp.mailfrom=juniper.net; ietf.org; dkim=none (message not signed) header.d=none;ietf.org; dmarc=fail action=none header.from=juniper.net;
Received-SPF: SoftFail (protection.outlook.com: domain of transitioning juniper.net discourages use of 66.129.239.12 as permitted sender)
Received: from p-emfe01a-sac.jnpr.net (66.129.239.12) by BY2NAM05FT043.mail.protection.outlook.com (10.152.100.180) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA_P256) id 15.1.1075.12 via Frontend Transport; Fri, 12 May 2017 05:21:54 +0000
Received: from p-mailhub01.juniper.net (10.160.2.17) by p-emfe01a-sac.jnpr.net (172.24.192.21) with Microsoft SMTP Server (TLS) id 14.3.123.3; Thu, 11 May 2017 22:21:53 -0700
Received: from eng-mail01.juniper.net (eng-mail01.juniper.net [172.17.28.114]) by p-mailhub01.juniper.net (8.14.4/8.11.3) with ESMTP id v4C5LqKj019830; Thu, 11 May 2017 22:21:52 -0700 (envelope-from mdb@juniper.net)
Received: from eng-mail01.juniper.net (localhost [127.0.0.1]) by eng-mail01.juniper.net (Postfix) with ESMTP id 5FFD611446; Thu, 11 May 2017 22:21:52 -0700 (PDT)
To: Ron Frederick <ronf@timeheart.net>
CC: Eric Rescorla <ekr@rtfm.com>, Brian Smith <brian@briansmith.org>, denis bider <denisbider.ietf@gmail.com>, Simon Tatham <anakin@pobox.com>, "ietf-ssh@NetBSD.org" <ietf-ssh@NetBSD.org>, "curdle@ietf.org" <curdle@ietf.org>
Subject: Re: ssh-ed25519 implementations
In-Reply-To: <6047C877-67DE-404F-8FBD-5B2C19D16EA6@timeheart.net>
References: <76FD0F39-1F3D-4476-A3D8-D4C942C2EFD1@juniper.net> <CABcZeBNYUV=-azoZzZjnNtCEu3K0A-THHN2mt02V65oihbbrXw@mail.gmail.com> <36528.1494509552@eng-mail01.juniper.net> <6047C877-67DE-404F-8FBD-5B2C19D16EA6@timeheart.net>
Comments: In-reply-to: Ron Frederick <ronf@timeheart.net> message dated "Thu, 11 May 2017 19:27:30 -0700."
From: "Mark D. Baushke" <mdb@juniper.net>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Date: Thu, 11 May 2017 22:21:52 -0700
Message-ID: <1139.1494566512@eng-mail01.juniper.net>
X-EOPAttributedMessage: 0
X-MS-Office365-Filtering-HT: Tenant
X-Forefront-Antispam-Report: CIP:66.129.239.12; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(39850400002)(39450400003)(39410400002)(39840400002)(39860400002)(39400400002)(2980300002)(199003)(377424004)(189002)(24454002)(377454003)(9170700003)(50986999)(54356999)(2906002)(76176999)(8656002)(76506005)(53416004)(7696004)(2950100002)(6916009)(2810700001)(23676002)(229853002)(7846003)(6392003)(55016002)(478600001)(7126002)(6306002)(54906002)(93886004)(6246003)(6266002)(117636001)(53936002)(5660300001)(106466001)(305945005)(105596002)(4326008)(39060400002)(189998001)(47776003)(38730400002)(356003)(77096006)(110136004)(50466002)(86362001)(8936002)(81166006)(8746002)(8676002)(42262002); DIR:OUT; SFP:1102; SCL:1; SRVR:BN1PR05MB261; H:p-emfe01a-sac.jnpr.net; FPR:; SPF:SoftFail; MLV:ovrnspm; A:1; MX:1; PTR:InfoDomainNonexistent; LANG:en;
X-Microsoft-Exchange-Diagnostics: 1; BY2NAM05FT043; 1:KNsIhHSwKUiMDOxcZ+8ZBolPUrmxSQPq/wpdCIQtbk71p5fV3jcGzFfRds+NoTo6jwMDtx/jSpxpOOIkZbqE4t1tViduXqUTKz29GEq4VljdlSbDlqjP5qKU3QUiA9X0Ynuv/mTivVo+YBpP25IxDArf5Y2+ISLR7TUH7SeQx34aMsPE/jCzrqJkNjOH/ydnMenLWzsaOdOMDBgdV9qAizb54hDKL0bJ8/jUMCOHNI95L8lsYnQQJHqvk/QZ1YD7ZK/rT7Pb9dKFFNvodQ6e83YyIQYcqbvRXN2usDc+0GpohDGu1/BubBms9PjnL+UXdQV4DUfOvaDXGv922OwkGqZFHr6IRS/cq10ruLQDy60TVME+9rdCJiFJo5YUgOCwogvjn3l8AWvW0XbXCfQ3qFoVEf/CSFwqLrBoZoyjn/MwsF/wcFeyCvyBa5oz1nQ90KSNtqRwfAt3Br2BPo+EsdEIXxG0nKCoAU8/QN+EQ8wPNVWrkrE4QhR7PCDbXgl/5o6jX7d6vKZHP3eFS5M9Kd/Zfzakz4O+lcdIahpqkzp2Ujm5xLlvdTMpVy7suaNpDePKlcmUVzi9ZHMLXNCiPNmKD+uimo3rptfAZxNWDNiBUWWawOxIQcEq2S4Y8Fbi
X-MS-PublicTrafficType: Email
X-MS-Office365-Filtering-Correlation-Id: 8ff02e0a-9786-4eb8-eb0a-08d498f6cd85
X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(201703131423075)(201703031133081)(201702281549075); SRVR:BN1PR05MB261;
X-Microsoft-Exchange-Diagnostics: 1; BN1PR05MB261; 3:trmMcwRI2Y4YfvZ0h5gqWPHE2Oj2rT1l/khXk2lDpy8khhYwHpGngzXDyrEwXO7BLwLvsxRDOL9aJ7t8Rrc2NMSTym/Y0r+HoWUvu6SENeV26euiyz9rEbkUvtYHcuuciEm8/2uYtPKZSNz1QdCvr0aKfMEm7WaOv9jHmbZaQsC4bqd7vmG7kwNmfr7LqsftSfzSVLyE5W6YDTxMVKVIHdF9qEYCER8W12Y+8IKbqqjVxbdsWr8E3dGOxQ7z1ILzdES5vV8qbWmTJMfeO9KovFsrf/Qd1naGA6FhDWegPJ05zPfg6ySEghc8go2GdnK0/kYdJR7UVInbxS3MDcZNmRjcbcybPV+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z/C9xtvW0h+rGChQ+V9nAbkT4cCl3H768RGuBo+DmT7ABySPOYQZNcGwMM/4WDWzZgLsdmHXFhFTQdBO1ta/53AuZQ2ENR16pG5SvyJZF/HEDwQIsAyGDlyAMRwiSeoTUrKKu4by36dgCAvC90OEQIuApHdEpvXjVaUD9YE7PHNSu5qS/7WYZbRMbwsHuoM1kYunMoQfU6PsK3Fom3i0Q9i3JQ7DWe5p0P2u52M1XxC+gfl9jc/wixaq/PJ3nLtJ4zloeDbeisipPrWKv6vEc5UMJRUAqB1vDQX69CrRkqdqj9gdJrV8J2lJB5Mu393wLD7GARot7m0XdqYc1CEX8WtbL/CbfZWa6dykqvIX06BCmXhsxWlMw2zOtuzPSPxN9T02vqMfknWZqLnxDl31MdFzqEW+R174kbXpfEZCv/vG2YKrHmf0EPjelRubSD9q
X-Microsoft-Antispam-PRVS: <BN1PR05MB2612E36CC2B828AE7037D79BFE20@BN1PR05MB261.namprd05.prod.outlook.com>
X-Exchange-Antispam-Report-Test: UriScan:(138986009662008)(788757137089);
X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(13024025)(8121501046)(13023025)(13018025)(5005006)(13017025)(13015025)(3002001)(93006095)(93003095)(10201501046)(6055026)(6041248)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123558100)(20161123564025)(20161123562025)(6072148); SRVR:BN1PR05MB261; BCL:0; PCL:0; RULEID:; SRVR:BN1PR05MB261;
X-Microsoft-Exchange-Diagnostics: 1;BN1PR05MB261;4:/leky5lWrigIZqkWHuwYbZ1AD6D+ALdvb19ALqJYB1mJ9AKXdAWiwJcly/JCb9GuZGavYRO0j7p+PPrUhOdHn8jyaonLvXlDSHWSge6EGOZERGBD686ohvkhHhrWjQG9dDDY6LMDy/DWlNwn8nHnMiv72d3ustNO3SR/d9zD0rsH8Xc5P8ZIm8zIXz06dXYZWJWEWRUooV2LxdKZwzxsqXZY3IVAkSBlS2ly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vlX+9YuMroo+7QUCkCIaOk/xy8tmFgsZqZZwuAZvsFrY2KhK9RisdSw9
X-Microsoft-Exchange-Diagnostics: 1; BN1PR05MB261; 6:Q/zZowRN4lwhPfU/7kAL/5TlFYmvJS/UobE29BEFnJSvzvB6SI1ZMeMvddGFq9VD1OcuhRk2DOB9hSLRLTzxKADUFqkepqYH5BVzaTpwMQyoyxd0byvk1uVq+js3C88AeO6dTax2TVXBqiRIhrYpEMx8akR9Xj5qiBSfwci+rVV3BJ+OCoQdXqNUoIWxqtoFlu2zAzqSXlwfKxoJgV1aMVF01Yhz1aBTtc6tYedFJaNMbE2akkyXX8u3v8DaYPXY/XkXftX/o80K7IGC13+KG7Lgcx27qMM+vbBBLdxHDu/II1ykS5XdkURXc81Ulci/1H2odpG7Rk+aCKC60l05ShcwtdVgSpAqVXtx7/AomBLsP0YB8U1DQf+/blFPFKJ5tJgV+a9KmhuxEENFp9hCA7mUPyaq8DT9MUzp04sPBky14tLsxwpOvZVUJunV4H5OoLy4p01MUc5kjyn/wxPpwFjeRHOL8+W6X9BsgrcSmliecnLGN7zuTuyGi155uJnzdkFdAhrpualyRrAZAr9QaFmK4uC/U06y56GkmHv6Ghg=; 5:RbdNLjPLFPPpqrXP5yqWSYii+VgsOZroFglcWfJMB7BWAZecO1o/Y2byLkonsnI+1CTo9GRfs8iyfHa5jpnPPzLaDhDo7o0Yg+igdlgsqtgnOeiVBxWlS/LsRiGVtvPtRPkKPHopOIJ7eg5i7cE4+w==; 24:H1niofDoP8YRVAxK9t136KPGQhPlK+pP7IEQaaZW4KpG9OxB9Pzp1k2pnlV4XldHh7uu9fDcYRaZyrdO4goK3KGh55C43n9SdOko0tR+KlM=
SpamDiagnosticOutput: 1:99
SpamDiagnosticMetadata: NSPM
X-Microsoft-Exchange-Diagnostics: 1; BN1PR05MB261; 7:TapZbingXwEE4fnH1TvlgVj8YutQXJgdbZUjMuUJDC6V5a093BC2krun6/TUtNtLWC0dtr/N2BpLq0hASFz4LuOyAe+c0uTEZPNMyNFy2WV3OBhx6F6ZeTvQOyt1TjOoeFlx1LldASqs5rR2JRB7A9uE5XYr8D2SfRhEjkGZX9/J695bk8TgcTL2SIBradimTZIXujUZlj3qlhsPaUB2x+70rpz9pGhEJNcHLzPBWVzqA/qm020N/N8WSU6sMvraeK0WK03Bv5epapoOASgFsP/yUqg6TnC2TrJGMOvtU569AkEZQIkCZW9Hv0nuT97N2f60zwwYheLq0eJNmWr1FA==
X-OriginatorOrg: juniper.net
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 May 2017 05:21:54.1143 (UTC)
X-MS-Exchange-CrossTenant-Id: bea78b3c-4cdb-4130-854a-1d193232e5f4
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=bea78b3c-4cdb-4130-854a-1d193232e5f4; Ip=[66.129.239.12]; Helo=[p-emfe01a-sac.jnpr.net]
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN1PR05MB261
Sender: ietf-ssh-owner@NetBSD.org
List-Id: ietf-ssh.NetBSD.org
Precedence: list
List-Unsubscribe: <mailto:majordomo@NetBSD.org?subject=Unsubscribe%20ietf-ssh&body=unsubscribe%20ietf-ssh>

Hi Ron,

Ron Frederick <ronf@timeheart.net> writes:

> Hi Mark,
> 
> On May 11, 2017, at 6:32 AM, Mark D. Baushke <mdb@juniper.net> wrote:
> 
> I just took a look at the updated draft. Here’s a copy of the text in
> section 2.1 and some inline suggestions:

I am always interested in making the text better.

> 2.1 Shared Secret Encoding
> 
>    The following step differs from [RFC5656], which uses a different
>    conversion.  This is not intended to modify that text generally, but
>    only to be applicable to the scope of the mechanism described in this
>    document.
> 
>    The shared secret, K, is defined in [RFC4253] as a multiple precision
>    integer (mpint).  Curve25519/448 outputs a binary string X, which is
> 
> [Ron] RFC 4253 actually says that K is “encoded as an mpint”. I’d
> suggest saying “The shared secret, K, is defined in [RFC4253] as an
> integer."

Section 8 of RFC 5253 actually says "It computes K = e^y mod p" which
means that K is a multiple precision integer.

As an aside, it really should end up be larger than a simple integer.
Not stated, but the math works best if it is on the order of at least
half the number of bits of q such that g^(xy) is greater than p which
lets the mod operation do something useful.

>    the 32 or 56 byte point obtained by scalar multiplication of the
>    other side's public key and the local private key scalar.  The 32 or
>    56 bytes of X are converted into K by interpreting the bytes as an
>    unsigned fixed-length integer encoded in network byte order.  This
>    conversion follows the normal "mpint" process as described in section
>    5 of [RFC4251].
> 
> [Ron] There are actually two conversions here, from the byte string X
> to the integer K, and then from K back to a byte string to be fed to
> the hash used for key generation. This text makes it sound like the
> conversion from X to K should follow the “mpint” conversion, but
> that’s not the case. 

True, that is confusing and should be fixed.

> The sentence about how to convert X into the integer K looks good, but
> I would drop the last sentence here and begin a new paragraph which
> discusses the second conversion from the integer K back to a byte
> string for insertion into the hash, such as:
> 
>   The integer K is then fed along with other data to the key exchange
>   method’s hash function to generate encryption keys. During this
>   process, [RFC4253] specifies that K should be encoded as an “mpint”
>   as described in section 5 of [RFC4251]. This conversion may result
>   in a value which varies from the fixed-length byte string X as
>   follows:



> This new paragraph can replace the next paragraph below.
> 
>    To clarify a corner-case in this conversion, when X is encoded as an
>    mpint K, in order to calculate the exchange hash, it may vary as
>    follows:
> 
>    o  Trim all leading zero-bytes of X.  If X is all zero-bytes, then
>       the key exchange MUST fail.
> 
> [Ron] Are you sure this is necessary? 

Yes.

> I don’t see any mention of this restriction in RFC 4253. If the
> integer value of K is 0, it can still be encoded as a valid mpInt.

It is not in RFC4253, it is in RFC4251 where it says:

   mpint

      Represents multiple precision integers in two's complement format,
      stored as a string, 8 bits per byte, MSB first.  Negative numbers
      have the value 1 as the most significant bit of the first byte of
      the data partition.  If the most significant bit would be set for
      a positive number, the number MUST be preceded by a zero byte.
      Unnecessary leading bytes with the value 0 or 255 MUST NOT be
      included.  The value zero MUST be stored as a string with zero
      bytes of data.

The check for X is all zero-bytes needs to be done per RFC7748:

   Both now share K = X25519(a, X25519(b, 9)) = X25519(b, X25519(a, 9))
   as a shared secret.  Both MAY check, without leaking extra
   information about the value of K, whether K is the all-zero value and
   abort if so (see below).
   ...elided...
   The check for the all-zero value results from the fact that the
   X25519 function produces that value if it operates on an input
   corresponding to a point with small order, where the order divides
   the cofactor of the curve (see Section 7).  The check may be
   performed by ORing all the bytes together and checking whether the
   result is zero, as this eliminates standard side-channels in software
   implementations.

I suppose that could be done first in linear time by oring all of the
bytes without leaking side channel information...

        k := x
        zbcheck := 0
	for byte in k: zbcheck |= k[byte];
        assert(zbcheck > 0);
        while (k.length() > 0 &amp;&amp; k[0] == 0) k := k[1:];
        if 0 != (k[0] &amp; 0x80) k := '\0' .. k;    

which is kind of ugly...

>    o  If the high bit of X is set, the mpint format requires a zero byte
>       to be prepended.
> 
>    o  The length of the encoded K may not be the same as the original
>       length of X due to trimming or prepending zero-bytes as needed for
>       "mpint" format.
> 
> [Ron] Actually, after doing all of this, the mpint conversion also
> requires the that resulting byte string be preceded by a 4-byte
> big-endian length value. So, even if the X value has no bytes removed
> or prepended, it will be 4 bytes longer than it was originally.
> There’s no mention of this length here.

True, because the prepended length is not a part of the hash to the best
of my recollection. Am I mistaken?

>    Or, as pseudo code:
> 
>                  k := x;
>                  while (k.length() > 0 && k[0] == 0) k = k[1:];
>                  assert(k.length() > 0);
>                  if 0 != (k[0] & 0x80) k = '\0' .. k;

Hmmm... should the above use := for assignments everywhere like this?

              k := x;
              while (k.length() > 0 &amp;&amp; k[0] == 0) k := k[1:];
              assert(k.length() > 0);
              if 0 != (k[0] &amp; 0x80) k := '\0' .. k;

> 
>                                  Figure 1
> 
>    When performing the X25519 or X448 operations, the integer values
>    there will be encoded into byte strings by doing a fix-length
>    unsigned litle-endian conversion, per [RFC7748 <https://tools.ietf.org/html/rfc7748>].  It is only later
>    when these byte strings are then passed to the ECDH code in SSH that
>    the bytes are re-interpreted as a fixed-length unsigned big-endian
>    integer value K, and then later that K value is encoded as a
>    variable-length signed "mpint" before being fed to the hash algorithm
>    used for key generation.
> 
> [Ron] With the changes I have proposed above, I’m not sure this last
> paragraph is needed. Alternately, I’d think about working some of this
> text into the two paragraphs above that discuss the conversion from X
> to K and then from K to an mpint. 

I am also not sure, but I have left it in for now. Please see my 'diff'
below for the changes to see if it looks better or worse to you.

> Also, “fix-length” here should be “fixed-length”.

Sure, I can make that change.

> I think it is better to cover this point before diving into the
> details of how the “mpint” conversion is different from the original X
> byte string.

Hmmm.... here is how I have updated the text:

--- draft-ietf-curdle-ssh-curves-05.xml	2017-05-11 11:58:15.000000000 -0700
+++ draft-ietf-curdle-ssh-curves-06.xml	2017-05-11 22:18:37.000000000 -0700
@@ -169,8 +169,15 @@
           key and the local private key scalar.  The 32 or 56 bytes of
           X are converted into K by interpreting the bytes as an
           unsigned fixed-length integer encoded in network byte order.
+        </t>
+
+        <t>
+          The integer K is then fed along with other data to the key
+          exchange method's hash function to generate encryption keys.
           This conversion follows the normal "mpint" process as
-          described in section 5 of <xref target="RFC4251"/>.
+          described in section 5 of <xref target="RFC4251"/> which
+          requires that unnecessary leading bytes with the value 0
+          MUST NOT be included.
         </t>
 
         <t>
@@ -181,32 +188,36 @@
           <list style="symbols">
 
             <t>
-              Trim all leading zero-bytes of X. If X is all
-              zero-bytes, then the key exchange MUST fail.
+              Trim all leading zero-bytes of X, as required in section
+              5 of <xref target="RFC4251"/>. If X is all
+              zero-bytes, then the key exchange MUST fail as required
+              in section 6 of <xref target="RFC7748"/>.
             </t>
 
             <t>
-              If the high bit of X is set, the mpint format requires a
-              zero byte to be prepended.
+              Given X is a positive, if the MSB of X is set, then
+              the "mpint" format requires a zero-byte to be prepended.
             </t>
 
             <t>
-              The length of the encoded K may not be the same as the
-              original length of X due to trimming or prepending
-              zero-bytes as needed for "mpint" format.
+              The length of the "mpint" form of K may not be the same
+              as the original length of X due to trimming or
+              prepending zero-byte values as needed for "mpint"
+              format.
             </t>
 
           </list>
 
           <figure anchor="pseudo.code">
             <preamble>
-              Or, as pseudo code:
+              Or, as pseudo code (without dealing with side-channel
+              issues):
             </preamble>
             <artwork>
               k := x;
-              while (k.length() > 0 &amp;&amp; k[0] == 0) k = k[1:];
+              while (k.length() > 0 &amp;&amp; k[0] == 0) k := k[1:];
               assert(k.length() > 0);
-              if 0 != (k[0] &amp; 0x80) k = '\0' .. k;
+              if 0 != (k[0] &amp; 0x80) k := '\0' .. k;
             </artwork>
           </figure>
         </t>
@@ -214,7 +225,7 @@
         <t>
           When performing the X25519 or X448 operations, the integer
           values there will be encoded into byte strings by doing a
-          fix-length unsigned litle-endian conversion, per <xref
+          fixed-length unsigned litle-endian conversion, per <xref
           target="RFC7748"/>. It is only later when these byte strings
           are then passed to the ECDH code in SSH that the bytes are
           re-interpreted as a fixed-length unsigned big-endian integer