
From bounces-ietf-ssh-owner-secsh-tyoxbijeg7-archive=lists.ietf.org@NetBSD.org  Thu May  4 23:04:58 2017
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 9C7E1129454 for <ietfarch-secsh-tyoxbijeg7-archive@ietfa.amsl.com>; Thu,  4 May 2017 23:04:58 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.201
X-Spam-Level:
X-Spam-Status: No, score=-4.201 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.001, RCVD_IN_DNSWL_MED=-2.3, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
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 zJOkyMkJVZn0 for <ietfarch-secsh-tyoxbijeg7-archive@ietfa.amsl.com>; Thu,  4 May 2017 23:04:57 -0700 (PDT)
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200]) (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 2615A12944C for <secsh-tyoxbijeg7-archive@lists.ietf.org>; Thu,  4 May 2017 23:04:57 -0700 (PDT)
Received: by mail.netbsd.org (Postfix, from userid 605) id B6A0584DA7; Fri,  5 May 2017 06:04:53 +0000 (UTC)
Delivered-To: ietf-ssh@netbsd.org
Received: by mail.netbsd.org (Postfix, from userid 1347) id 6BA5184DA4; Fri,  5 May 2017 06:04:53 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 4A12284D9C for <ietf-ssh@netbsd.org>; Thu,  4 May 2017 20:57:24 +0000 (UTC)
X-Virus-Scanned: amavisd-new at netbsd.org
Received: from mail.netbsd.org ([IPv6:::1]) by localhost (mail.netbsd.org [IPv6:::1]) (amavisd-new, port 10025) with ESMTP id MuUSwWWsEy8o for <ietf-ssh@netbsd.org>; Thu,  4 May 2017 20:57:23 +0000 (UTC)
Received: from ppsw-41.csi.cam.ac.uk (ppsw-41.csi.cam.ac.uk [131.111.8.141]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.netbsd.org (Postfix) with ESMTPS id 9BDD084D81 for <ietf-ssh@netbsd.org>; Thu,  4 May 2017 20:57:19 +0000 (UTC)
X-Cam-AntiVirus: no malware found
X-Cam-ScannerInfo: http://help.uis.cam.ac.uk/email-scanner-virus
Received: from thunderbird-2.linux.ds.cam.ac.uk ([131.111.9.24]:59270) by ppsw-41.csi.cam.ac.uk (ppsw.cam.ac.uk [131.111.8.139]:25) with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) id 1d6NoK-0001gk-Qi (Exim 4.89) (return-path <bjh21@cam.ac.uk>); Thu, 04 May 2017 21:57:16 +0100
Received: from bjh21 (helo=localhost) by thunderbird-2.linux.ds.cam.ac.uk with local-esmtp (Exim 4.86_2) (envelope-from <bjh21@cam.ac.uk>) id 1d6NoK-0007Yt-6M; Thu, 04 May 2017 21:57:16 +0100
Date: Thu, 4 May 2017 21:57:16 +0100 (BST)
From: Ben Harris <bjh21@bjh21.me.uk>
To: "Mark D. Baushke" <mdb@juniper.net>
cc: denis bider <denisbider.ietf@gmail.com>, ietf-ssh@netbsd.org,  curdle <curdle@ietf.org>
Subject: Re: [Curdle] eddsa25519 & eddsa448 for use with SSH
In-Reply-To: <17136.1493159459@eng-mail01.juniper.net>
Message-ID: <alpine.DEB.2.20.1705042155080.28960@thunderbird-2.linux.ds.cam.ac.uk>
References: <53117.1493095177@eng-mail01.juniper.net> <CADPMZDBEasXekZv9kGTJdArxy8CCy-sZnTY4yjtGvy39sftHDQ@mail.gmail.com> <17136.1493159459@eng-mail01.juniper.net>
User-Agent: Alpine 2.20 (DEB 67 2015-01-07)
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII; format=flowed
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>

On Tue, 25 Apr 2017, Mark D. Baushke wrote:

> denis bider <denisbider.ietf@gmail.com> writes:
>
>> I believe the spec for ssh-ed25519 is already an active draft under
>> the purview of Curdle:
>>
>> https://tools.ietf.org/html/draft-ietf-curdle-ssh-ed25519-00
>
> You are correct. This one is expired. I wonder if Ben Harris is likely
> to resubmit it?

I'm not in any imminent danger of doing so.  If someone were to pick it up 
and make it useful I would be very happy, but I'm a bit short of energy 
for navigating bureaucracies at the moment.

-- 
Ben Harris

From bounces-ietf-ssh-owner-secsh-tyoxbijeg7-archive=lists.ietf.org@NetBSD.org  Wed May 10 09:18:39 2017
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 92B5F129C66 for <ietfarch-secsh-tyoxbijeg7-archive@ietfa.amsl.com>; Wed, 10 May 2017 09:18:39 -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=unavailable 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 daewEKX0EC7V for <ietfarch-secsh-tyoxbijeg7-archive@ietfa.amsl.com>; Wed, 10 May 2017 09:18:38 -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 E54D7129C56 for <secsh-tyoxbijeg7-archive@lists.ietf.org>; Wed, 10 May 2017 09:18:37 -0700 (PDT)
Received: by mail.netbsd.org (Postfix, from userid 605) id D533D85569; Wed, 10 May 2017 16:18:35 +0000 (UTC)
Delivered-To: ietf-ssh@NetBSD.org
Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id CFA1784DA8 for <ietf-ssh@NetBSD.org>; Wed, 10 May 2017 16:18:33 +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 ([127.0.0.1]) by localhost (mail.netbsd.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id e0XYmIuY1kVG for <ietf-ssh@netbsd.org>; Wed, 10 May 2017 16:18:33 +0000 (UTC)
Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on072e.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe41::72e]) by mail.netbsd.org (Postfix) with ESMTP id 9344484CDB for <ietf-ssh@NetBSD.org>; Wed, 10 May 2017 16:18:31 +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=9LR1jh7Y8ILJ3AtRCwJ57z8LHtDnqEmvUJQDfYfRJVw=; b=TuMVqdLPhmNWRgWGTd3S3QYrQBuUNtWC+joIEpcoDoEq0oUvoG2EK7V14EgohDa9fTPqNpCT7qIKLgPj6utWQtkUhS+eKFvF1SDzKEcBW4aQbtmJCo0vClh5aEjb2+z7Pc4B19nbrlDRpifqETiDWJYd2HFelyl60MZL4iIKC0g=
Received: from BN6PR05MB2916.namprd05.prod.outlook.com (10.173.18.137) by BN6PR05MB2916.namprd05.prod.outlook.com (10.173.18.137) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1084.7; Wed, 10 May 2017 16:18:29 +0000
Received: from BN6PR05MB2916.namprd05.prod.outlook.com ([10.173.18.137]) by BN6PR05MB2916.namprd05.prod.outlook.com ([10.173.18.137]) with mapi id 15.01.1084.017; Wed, 10 May 2017 16:18:29 +0000
From: Mark Baushke <mdb@juniper.net>
To: "ietf-ssh@NetBSD.org" <ietf-ssh@NetBSD.org>
CC: "curdle@ietf.org" <curdle@ietf.org>, Eric Rescorla <ekr@rtfm.com>
Subject: ssh-ed25519 implementations
Thread-Topic: ssh-ed25519 implementations
Thread-Index: AQHSyakPmB025K0AyEG1vsM36lGUqQ==
Date: Wed, 10 May 2017 16:18:29 +0000
Message-ID: <76FD0F39-1F3D-4476-A3D8-D4C942C2EFD1@juniper.net>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: NetBSD.org; dkim=none (message not signed) header.d=none;NetBSD.org; dmarc=none action=none header.from=juniper.net;
x-originating-ip: [66.129.239.12]
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1;BN6PR05MB2916;7:7gnGkpz9aQM1h14FcAYB/Q69U2YPThT1C4zvBUF9xlboB2GVAeAVRH8GduxgoLr1BGtL2kDEjlaFHVj8ssJ++1m7zPOWU83gqXzQAMD74wbiVIrnfJ1NFeLP2AJBPQNH956jR3gG0Z5fVgsD7IjFH1ODZqRRsufP8gLl2ALziFvViScSBNYt5PGakYS8+84CeaEyzDjz7vc+PpJ60X9uh6PTPtGDGdbgIcmchrsN7W2jix6gw831WNs6cEpJdK2cbByDDOoOHls4jmc9TP0fZ6mdZ7p6bwA/i21yxZZgovcMcf5ghipDJP6EJ2pLx7byDySMCdA0uQ8lv8zmPnduAw==
x-ms-office365-filtering-correlation-id: 1d95b54b-32b4-45d3-5db7-08d497c031df
x-ms-office365-filtering-ht: Tenant
x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(2017030254075)(48565401081)(201703131423075)(201703031133081);SRVR:BN6PR05MB2916;
x-microsoft-antispam-prvs: <BN6PR05MB2916CFC10BE2A3FF7714EE50BFEC0@BN6PR05MB2916.namprd05.prod.outlook.com>
x-exchange-antispam-report-test: UriScan:(100405760836317);
x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040450)(601004)(2401047)(5005006)(8121501046)(93006095)(93001095)(10201501046)(3002001)(6055026)(6041248)(20161123558100)(20161123560025)(20161123564025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(6072148);SRVR:BN6PR05MB2916;BCL:0;PCL:0;RULEID:;SRVR:BN6PR05MB2916;
x-forefront-prvs: 03030B9493
x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(39450400003)(39840400002)(39410400002)(39400400002)(39850400002)(39860400002)(2501003)(2906002)(5660300001)(66066001)(82746002)(3660700001)(3280700002)(478600001)(189998001)(6916009)(83716003)(81166006)(54356999)(50986999)(4326008)(8936002)(25786009)(8676002)(38730400002)(6486002)(86362001)(6436002)(2900100001)(77096006)(99286003)(53936002)(7736002)(305945005)(36756003)(122556002)(6506006)(33656002)(5640700003)(2351001)(102836003)(6116002)(3846002)(110136004)(6306002)(6512007)(54906002)(42262002);DIR:OUT;SFP:1102;SCL:1;SRVR:BN6PR05MB2916;H:BN6PR05MB2916.namprd05.prod.outlook.com;FPR:;SPF:None;MLV:sfv;LANG:en;
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="us-ascii"
Content-ID: <F5C6D64527891940866454D3FADDAF6E@namprd05.prod.outlook.com>
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: juniper.net
X-MS-Exchange-CrossTenant-originalarrivaltime: 10 May 2017 16:18:29.2029 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: bea78b3c-4cdb-4130-854a-1d193232e5f4
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR05MB2916
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,

Eric Rescorla <ekr@rtfm.com> has brought to my attention that in
https://tools.ietf.org/html/draft-ietf-curdle-ssh-curves-04 it is
currently specifying the SSH encoding of secrets on the wire using the
mpint process as described in section 5 of [RFC4251] while RFC 7748
describes using a little-endian format:

  GF(2^448 - 2^224 - 1) and are encoded as an array of bytes, u,
  in little-endian order such that u[0] + 256*u[1] + 256^2*u[2] + ... +

This seems to be what is being implemeneted for
curve25519-sha256@libssh.org, so I should make
an explicit note of this in the draft.

However, I am unaware of any curve448-sha512 implementations at
present and would like consensus that it should also follow the mpint
method rather than the RFC 7748 method.

Please reply to curdle@ietf.org with your opinions.

        Thank you,
        -- Mark


From bounces-ietf-ssh-owner-secsh-tyoxbijeg7-archive=lists.ietf.org@NetBSD.org  Wed May 10 09:57:50 2017
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 037F7129B8D for <ietfarch-secsh-tyoxbijeg7-archive@ietfa.amsl.com>; Wed, 10 May 2017 09:57:50 -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 jaPU4l9p9xOr for <ietfarch-secsh-tyoxbijeg7-archive@ietfa.amsl.com>; Wed, 10 May 2017 09:57:44 -0700 (PDT)
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200]) (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 0EDC312945B for <secsh-tyoxbijeg7-archive@lists.ietf.org>; Wed, 10 May 2017 09:57:44 -0700 (PDT)
Received: by mail.netbsd.org (Postfix, from userid 605) id 574E08556D; Wed, 10 May 2017 16:57:42 +0000 (UTC)
Delivered-To: ietf-ssh@netbsd.org
Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 61F2384CEE for <ietf-ssh@netbsd.org>; Wed, 10 May 2017 16:57:38 +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 Gtn2aTclDqnl for <ietf-ssh@netbsd.org>; Wed, 10 May 2017 16:57:37 +0000 (UTC)
Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on072b.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe45::72b]) by mail.netbsd.org (Postfix) with ESMTP id AA85C84CDB for <ietf-ssh@netbsd.org>; Wed, 10 May 2017 16:57:35 +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=HMdb4XeNk35iGPeZ+lwZnRJbAqcSMSaLcbrzDC2Mg58=; b=iudELkJCM01AI157JUSUpMSbR3UpqYC8UG6RJVzOO9iG9rzzsBXa+Y2FIHkntc0+jS6warj1I5baJD06v9l0WsPOlnTqM/bW7xq/cRn1uZoQXIUWMcKEFUytIX2FMmmgE5tdYuv2e4ZAFmzWpbuXN3G3vq/BE9rnEzPaQY73BT4=
Received: from BY1PR0501CA0032.namprd05.prod.outlook.com (10.162.139.42) by MWHPR05MB2911.namprd05.prod.outlook.com (10.168.245.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1084.7; Wed, 10 May 2017 16:57:33 +0000
Received: from DM3NAM05FT034.eop-nam05.prod.protection.outlook.com (2a01:111:f400:7e51::203) by BY1PR0501CA0032.outlook.office365.com (2a01:111:e400:4821::42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1101.5 via Frontend Transport; Wed, 10 May 2017 16:57:33 +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 DM3NAM05FT034.mail.protection.outlook.com (10.152.98.146) 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; Wed, 10 May 2017 16:57:32 +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; Wed, 10 May 2017 09:57:26 -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 v4AGvQJM029327;	Wed, 10 May 2017 09:57:26 -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 2E0EF11513;	Wed, 10 May 2017 09:57:26 -0700 (PDT)
To: Eric Rescorla <ekr@rtfm.com>
CC: "ietf-ssh@NetBSD.org" <ietf-ssh@netbsd.org>, "curdle@ietf.org" <curdle@ietf.org>
Subject: Re: ssh-ed25519 implementations 
In-Reply-To: <CABcZeBNYUV=-azoZzZjnNtCEu3K0A-THHN2mt02V65oihbbrXw@mail.gmail.com> 
References: <76FD0F39-1F3D-4476-A3D8-D4C942C2EFD1@juniper.net> <CABcZeBNYUV=-azoZzZjnNtCEu3K0A-THHN2mt02V65oihbbrXw@mail.gmail.com>
Comments: In-reply-to: Eric Rescorla <ekr@rtfm.com> message dated "Wed, 10 May 2017 09:20:37 -0700."
From: "Mark D. Baushke" <mdb@juniper.net>
Date: Wed, 10 May 2017 09:57:26 -0700
Message-ID: <46168.1494435446@eng-mail01.juniper.net>
MIME-Version: 1.0
Content-Type: text/plain
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)(39410400002)(39850400002)(39400400002)(39450400003)(39840400002)(39860400002)(2980300002)(199003)(189002)(377454003)(24454002)(9170700003)(2810700001)(229853002)(81166006)(8676002)(7126002)(7696004)(53546009)(77096006)(86362001)(2906002)(5003940100001)(8936002)(5660300001)(7846003)(6916009)(2950100002)(50986999)(345774005)(189998001)(48376002)(50466002)(53936002)(53416004)(55016002)(105596002)(356003)(478600001)(117636001)(76506005)(47776003)(6306002)(6266002)(54356999)(54906002)(4326008)(110136004)(38730400002)(106466001)(305945005)(76176999)(42262002);DIR:OUT;SFP:1102;SCL:1;SRVR:MWHPR05MB2911;H:p-emfe01a-sac.jnpr.net;FPR:;SPF:SoftFail;MLV:sfv;A:1;MX:1;LANG:en;
X-Microsoft-Exchange-Diagnostics: 1;DM3NAM05FT034;1:fLc6js7/Z9FzTN68CzzD8Oz5PemvvkZ6rsvbqckoYcaRGiGGO3GDT/rwEm4aDjatzM6mrxOPF262ftB6nixmdEVVSgf76tYdQx1XoBxlk6uuRnlhqp3wjojiqRtqZCz36Vk8zTCcG7rV3vitsonn6aupg4aAyUGGxb5A8KcCL4/wEe0rXkE47UnnVKktnG4x61eqypSCqt8A6rIPyvxMQBRy6HjhxELV3nQpnHldXmjHwRTykvVIJK+H/VjkMvLIehhGfplDgy0Ky8vdsS0VlFoakOVGHQAAfGLmx4EirMYljDzd5fLgF5p9DGZluHG5tKNBCrkdLXzrPIV19y2YigSu+uK8Kc9zik9oYtZxSG4NyBLsMkoLOSl0QV3TCM+MioiYovRFyNuDq1RoEIxGUUdVZ3zpRTbMFQXHyOwaY5u0LKvvf7F5Ck1g4vpINE1oAKl3XFx1pD1hhGl/x9pYwBs5HtmtCSBtPwg3nbnLbmD7VxzIHQSMOZaSyvjP459kHinL/dMHXI6VhAVFwHLj5EwSYoZPWn7RDBWBFpV+/gcud71UoyTzB2yU93fnVLkRnvNtYyBW1zsoZLFygXW0BYyh5j2kR0L93Mzlqd9VSj0=
X-MS-PublicTrafficType: Email
X-MS-Office365-Filtering-Correlation-Id: a4e02a59-14ac-4df3-fcba-08d497c5a6fa
X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(2017030254075)(201703131423075)(201703031133081)(201702281549075);SRVR:MWHPR05MB2911;
X-Microsoft-Exchange-Diagnostics: 1;MWHPR05MB2911;3:Zrm7UG1Vdp/e3kSzOXPYecddbl6pWk5G2XCYNOqdFnxQINFw5EQK2Dt01OgPi3Dvfn0es6jy5LyHpMS0nAH1+FH0Is2R5vJt8L4hkMm676gXdhjXGHGzqdybG1dN+VQeYJjAcZ5V/apuzmTQh9GfBomiTnzv2zfpOMZP2tx+3JmIFA14Y015P+z11I8eBFMh+hj/UVt9PSPj3EuDniqVoVjrd+L0FtEbDLyJirlCOc/IazIrpGyuWuK7KPyc4KqC6BkW46PT1g7CyDgcsq40ogPRRgCWplh+LrK2ZkxqYh6hZZwa5zFlaPrOeISI0qJCHPImkcWKt8aL92+hw01eUawUqgNNCag+dTMPAdlNznMU4YNGOg1Ktsv7zPP/684K2NVBhbC96RCzLruhqMMw7ID72FTkyeUWEGj8OWc6xBb9iSueoD4HxHVEcHwrG5dcqEF9BBfodVDwRqFbboJyx19VUEDZrzb3Rnz0Td7fBSPQelmWbTyTCNDsbFNSNTve
X-Microsoft-Exchange-Diagnostics: 1;MWHPR05MB2911;25:x0tfS421EZmzkCCi7SDA57v5BumqTxZ3lzlqo375UF/DoumszhkaSgjzbeE/85PXq5ae3uEK3I7a5P3xZ2TzgoBvr4fUmiAS/yfIyLVbW6uy/M4hEwU6QC00rI2PwCk9Aprc6MvgjnYZsTY84xzBjmgM2bUxdSow9Y+PDyPdcRwWR3yeEOVXhYPsLEdk6O5QTXdHM0zUY5X4KaZUbw1fML7GW/S1OVP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DOhybBXH8FAreByNMRcjBf72AHGDJxmG1KwFf0d7b3jMI
X-Microsoft-Antispam-PRVS: <MWHPR05MB2911FACC451363C0C147077BBFEC0@MWHPR05MB2911.namprd05.prod.outlook.com>
X-Exchange-Antispam-Report-Test: UriScan:(138986009662008)(100405760836317);
X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040450)(601004)(2401047)(5005006)(13017025)(13015025)(13024025)(8121501046)(13023025)(13018025)(93006095)(93003095)(3002001)(10201501046)(6055026)(6041248)(20161123555025)(20161123560025)(20161123564025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(6072148);SRVR:MWHPR05MB2911;BCL:0;PCL:0;RULEID:;SRVR:MWHPR05MB2911;
X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;MWHPR05MB2911;4:zgJd3k+Q4J5fHuG2/p1EKqokrEFqwIxwrJ4Xpvravj?= =?us-ascii?Q?5U70Hpkb90tEkUwPFIJw3ECr/8DKrC+Yht8p4hguScjqopXr1wOpQ4Az5w2u?= =?us-ascii?Q?cvd8jPVc4sq1YzzT3ZFPy/GVSBMdSHx340LGkyM5ZoqALEsc/zXMIPmQ75M3?= =?us-ascii?Q?42Yk2H9xOFvBDEgIVhtGvQzJEE79pEdO5WrGcTgBA5sUfQiUDS1z/w4FRSUe?= =?us-ascii?Q?+Y+pJP75WVWsrZDXnGMcVq3s14tdRBIoXk2xkJPXHH9ReYFzQcQGmHRgjQbZ?= =?us-ascii?Q?ba4TXYryj/Qhu0/rxGHNlfG4wQe+hsSeLQ98H74Kn78vMFlBIL9oPgkqufFz?= =?us-ascii?Q?VNrDzQzmcgyas8AyeajV1abmgCeL9/EWV8P7wxNhnJ3GMGRfDW0bgs7PbmEv?= =?us-ascii?Q?WAZlCy3eCCUaY5BQ3jlpWfguCj0uL5xl12+QCXj9Le4kXXATaDBIQ1aFV2Wd?= =?us-ascii?Q?WY2jLFfiB6kEhPI0cPK08+0Tq4ssAi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utput: 1:99
SpamDiagnosticMetadata: NSPM
X-Microsoft-Exchange-Diagnostics: 1;MWHPR05MB2911;7:Fv6XPXdKSwKjeI0fu5Mr1JzviJrEx6giNSafrLuCuNkyxE/Ns2EO2CogcoctVMoGhjcjJFMBEET+FHyTZgE6k30caVZ5zVP2Rmkt0iFvfUcUqYCTRJuNaw4paGvTjWH5VxrPuhQamZffikbf5DvEwFpbly3RKKVxUgq6hVz7wGDsBhKZCW6F4W1w+0zaSvzoeJvOPgTVysXJX2wdaPkZpfufoMoee5KKdk9kN/oGzxHpYqvqdB0jiMql6ebPxpbqYGVwJtr1PQ63Mvn2JKn4OFjhHtU5Uhqa3zBYCnXPAc3y+YCFqhm0QvojfFu2mcHa0WjD2qaIULdiZjN4CG4exA==
X-OriginatorOrg: juniper.net
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 May 2017 16:57:32.8537 (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: MWHPR05MB2911
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>

Eric Rescorla <ekr@rtfm.com> writes:

> On Wed, May 10, 2017 at 9:18 AM, Mark Baushke <mdb@juniper.net> wrote:
> 
> > Hi,
> >
> > Eric Rescorla <ekr@rtfm.com> has brought to my attention that in
> > https://tools.ietf.org/html/draft-ietf-curdle-ssh-curves-04 it is
> > currently specifying the SSH encoding of secrets on the wire using the
> > mpint process as described in section 5 of [RFC4251] while RFC 7748
> > describes using a little-endian format:
> >
> >   GF(2^448 - 2^224 - 1) and are encoded as an array of bytes, u,
> >   in little-endian order such that u[0] + 256*u[1] + 256^2*u[2] + ... +
> >
> > This seems to be what is being implemeneted for
> > curve25519-sha256@libssh.org, so I should make
> > an explicit note of this in the draft.
> >
> 
> Thanks. To be clear, I'm not saying this is the wrong thing in the draft
> (though I do think it's kind of an unfortunate outcome). I just think it's
> critically important to be clear.

Thank you for the clarification. I agree it is unfortunate.

> > However, I am unaware of any curve448-sha512 implementations at
> > present and would like consensus that it should also follow the mpint
> > method rather than the RFC 7748 method.
> >
> 
> I tend to think the 7748 method, but all the options are pretty terrible
> here

I am agnostic on the best way to deal with curve448 for SSH.
I agree all options are unlpleasant.

RFC 8032 vs implementations for ssh-ed25519 will have the same issue.

So, if https://tools.ietf.org/html/draft-ietf-curdle-ssh-ed25519
is updated to point to RFC 8032, it will likely need to worry about
the mpint vs little-endian encoding issue as well. :-(

	-- Mark

From bounces-ietf-ssh-owner-secsh-tyoxbijeg7-archive=lists.ietf.org@NetBSD.org  Wed May 10 18:47:55 2017
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 E09FF129501 for <ietfarch-secsh-tyoxbijeg7-archive@ietfa.amsl.com>; Wed, 10 May 2017 18:47:55 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.091
X-Spam-Level:
X-Spam-Status: No, score=-4.091 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] 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 UDCatzJavOVA for <ietfarch-secsh-tyoxbijeg7-archive@ietfa.amsl.com>; Wed, 10 May 2017 18:47:54 -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 4DD4B1275C5 for <secsh-tyoxbijeg7-archive@lists.ietf.org>; Wed, 10 May 2017 18:47:54 -0700 (PDT)
Received: by mail.netbsd.org (Postfix, from userid 605) id 18E3084D94; Thu, 11 May 2017 01:39:48 +0000 (UTC)
Delivered-To: ietf-ssh@NetBSD.org
Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 4DDE384D78 for <ietf-ssh@NetBSD.org>; Thu, 11 May 2017 01:39:45 +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 ([127.0.0.1]) by localhost (mail.netbsd.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id t8zxzW1ZVcmp for <ietf-ssh@netbsd.org>; Thu, 11 May 2017 01:39:44 +0000 (UTC)
Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on072a.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe44::72a]) by mail.netbsd.org (Postfix) with ESMTP id 7A5C184CDB for <ietf-ssh@NetBSD.org>; Thu, 11 May 2017 01:39:42 +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=xeYYTv4024rfXDlKRo7fvC9RvMAIz24AoAFXs/L7ck4=; b=Ur3Ko7+4bZvakjhufD4lxLN2TYH/Mcw1K/IYCNKizhmS6mSui6ytyo608lXBT+GSVXarayle+LyLC37oDgOVuEydAJI1Y9fyJm5uU2hvaboJUndRuOa24MIgeYQeoqCAese8HtLDWCC/decDN2E8fFHVxULO5pnWDgg/bMev3ys=
Received: from CO2PR05CA0071.namprd05.prod.outlook.com (10.166.88.167) by DM5PR05MB2908.namprd05.prod.outlook.com (10.168.176.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1084.7; Thu, 11 May 2017 01:39:40 +0000
Received: from BY2NAM05FT025.eop-nam05.prod.protection.outlook.com (2a01:111:f400:7e52::204) by CO2PR05CA0071.outlook.office365.com (2603:10b6:102:2::39) 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; Thu, 11 May 2017 01:39:40 +0000
Authentication-Results: spf=softfail (sender IP is 66.129.239.12) smtp.mailfrom=juniper.net; NetBSD.org; dkim=none (message not signed) header.d=none;NetBSD.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 BY2NAM05FT025.mail.protection.outlook.com (10.152.100.162) 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; Thu, 11 May 2017 01:39:39 +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; Wed, 10 May 2017 18:39:20 -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 v4B1dKsO004080;	Wed, 10 May 2017 18:39:20 -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 9D0241145A;	Wed, 10 May 2017 18:39:19 -0700 (PDT)
To: <ietf-ssh@NetBSD.org>
From: "Mark D. Baushke" <mdb@juniper.net>
Subject: ssh-ed25519 implementations
Date: Wed, 10 May 2017 18:39:19 -0700
Message-ID: <72914.1494466759@eng-mail01.juniper.net>
MIME-Version: 1.0
Content-Type: text/plain
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)(39410400002)(39450400003)(39860400002)(39850400002)(39840400002)(39400400002)(2980300002)(189002)(199003)(9170700003)(305945005)(2906002)(6392003)(7846003)(6916009)(48376002)(50986999)(50466002)(5660300001)(55016002)(47776003)(5003940100001)(8676002)(117636001)(86362001)(81166006)(8936002)(54356999)(6266002)(105596002)(106466001)(478600001)(2351001)(6306002)(53416004)(2810700001)(77096006)(356003)(110136004)(38730400002)(7696004)(189998001)(53936002)(7126002)(76506005)(42262002);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR05MB2908;H:p-emfe01a-sac.jnpr.net;FPR:;SPF:SoftFail;MLV:sfv;MX:1;A:1;LANG:en;
X-Microsoft-Exchange-Diagnostics: 1;BY2NAM05FT025;1:pjqDIV0IiNCGXxDVul8nE2KhuefCU0udSNK678lYN+TnvAr/lPQO8rE6GEz3GXAh1lBC8t/mYcJf0LLxC/mTL3HXJ+O8B7fLmKz/Ng/Jw56d0vMHnrGJIkuB0kjsc020mKxBoOtO+ahuC7tbl98thMHaYdYP0IBiEwQ3mLf6wNvNr0Sf8Al1ymiVeWtjg9djUr9Ch8BCGKvPidah1GKv9FgQ6u1IMvt6JnF71pmaeqT3WNoM30LUSwFHZBUKAcDx7Q5qDuDBvRJNEpbpCu+BHr0uNPArK2bKpF0mh6f5KVKPnaBgC9jabs4j1wjA4nxbOz109tQTI/mg64fizhkcOGJR3ZAqSXOMaY7UQMIVoyHpt/qB6QLlKzCtwbMYNwc/X0KIHBPd5zqcPgF29iijsQbDbzSiJi1IxBwJa4hsMF2YdGH2PKEhJ3It4LGAnboBBOFp71AG4pI/eAPTUKPbPqyzaQj9q6BMxaqN2rWZQp1A4ql8NHAW6PDGgdcH0ylIUm3aPPTgo7NFMGKRyxKu/GoDeD5cmREJm2hHtNNkyOEP+qo4dzwijomxRoY2lzLZ
X-MS-PublicTrafficType: Email
X-MS-Office365-Filtering-Correlation-Id: 97720a8a-8547-4c4a-e5a8-08d4980e9718
X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(2017030254075)(201703131423075)(201703031133081)(201702281549075);SRVR:DM5PR05MB2908;
X-Microsoft-Exchange-Diagnostics: 1;DM5PR05MB2908;3:4BlmlsvinJLCq3ewFn2evo9Anr4SWIs0tLA1dK4f1IaZ5nptigc7SzqiL46g36LaK7M3UJB0pBs6GUQf+xAt5Fr9IIfhk5BKkxcwHSu4DrmPZHZVn87u5glyGBauTgSZkRZ6Sznj8/5c2M5AHUicqKrlW3E4ui6w/qvr89YouJmU2arsMwoSt5H6W4beNpVg27geN7zjaMsp+pW9yntmteDDcZf+ZPZuOACLCPGyoo78VXrWAS+UyrwIQfrSj9NmViOrfC4jfmghWkR2NRZPiWqxVRcxOhf2JDtiLcCeU10X974O8/PAl/pZxDd0fIlWqambEkmajr/d4morVvEQylo6xggOHnlfxTg4Jmy3SYb9xuxu+FGVogwAdEuFoiwkVhV8rmWb3u95VNnarj/yH3XxvN5/PiMYQpE2OF+WxK72RyxAMw3BUknYYm4+NXacwB6YiOg8mrlv2sWxN6ddiYbD2cfTDyMJe30SY5Vm54UF3GGuo1Xckh5bhhRLqRbn
X-Microsoft-Exchange-Diagnostics: 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2UVrMiLCUfciEZNjgdxcJSAaOF3zbAT6K9L/hihmR9ABg6wO9JAPyLLAv9ML34eaPHG/9ZKiAysomURpMOHwf4tteDkaOKO5vwGaprmw5iIHPQu1zNX///14POFtspmEcpGRgYH53DUr6PV//hXxBa5fednY6rIxo8Gly4+fSX3tIvZd1jqi/4pr5HsTgVJRTVJ1jFWEN5q+pmLaStc47GLAc5AiX0vnt+XkfUUFsd+UGNaWcSFJCLEu
X-Microsoft-Antispam-PRVS: <DM5PR05MB29088220B20848EBA137EF3CBFED0@DM5PR05MB2908.namprd05.prod.outlook.com>
X-Exchange-Antispam-Report-Test: UriScan:(100405760836317);
X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040450)(601004)(2401047)(13024025)(13023025)(13018025)(8121501046)(5005006)(13015025)(13017025)(3002001)(93006095)(93003095)(10201501046)(6055026)(6041248)(20161123558100)(20161123562025)(20161123555025)(20161123560025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148);SRVR:DM5PR05MB2908;BCL:0;PCL:0;RULEID:;SRVR:DM5PR05MB2908;
X-Microsoft-Exchange-Diagnostics: 1;DM5PR05MB2908;4:oUipjwyrSK/YuioUzxMaaOnhfDc9+9NAaD0fzV7t+mdqptf82Ml2xI7GnICXYcysk7XOGPamXVjiTMLthGmhhnx04FXiqBSwlAlCRBC0WJjMIHl3kVBNCYrNL+VSXItmiSDwsAZi5U2SJD2XohUO9JH8FJviyuCuazEsVIdaBAdgRfA+xGMs4E04Uep74EbUt2QplIvzCgmKV5XLupE6BE33kILEBPNSXqdLfr5Py2x+CF+m5YpyTsIyL7zW57sWJZsKB/3wh/+IJgPrIXDM01difVY4eY6tRysLKMyx1owqJE8c60P6RUr0MahYqhbrR4ssGHLsKGtB2cbsrygoewJTg6JVoiYh4z2ZiFjfyx+Wb7TAc3uxzQgkFczrgKgMwCKaqpMFwAafZW4Ui4PK7lrh3N8glMkf6XM+lD8C7ZC6cEARQFOAZQNZmF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yMrm0FBbG4mB9X6i5sa3N0RgTEDZ/irGtflFGHXlV8SSt/9icmD+q1uVZWK5VHNIhKU23TqZH3QjuosDjD/LMw==
X-OriginatorOrg: juniper.net
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 May 2017 01:39:39.5682 (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: DM5PR05MB2908
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>

[Second attempt. my first attempt got bounced by fraud detection checks
for some unknown reason. -- mdb]

Hi,

Eric Rescorla <ekr@rtfm.com> has brought to my attention that in
https://tools.ietf.org/html/draft-ietf-curdle-ssh-curves-04 it is
currently specifying the SSH encoding of secrets on the wire using the
mpint process as described in section 5 of [RFC4251] while RFC 7748
describes using a little-endian format:

  GF(2^448 - 2^224 - 1) and are encoded as an array of bytes, u,
  in little-endian order such that u[0] + 256*u[1] + 256^2*u[2] + ... +

This seems to be what is being implemeneted for
curve25519-sha256@libssh.org, so I should make
an explicit note of this in the draft.

However, I am unaware of any curve448-sha512 implementations at
present and would like consensus that it should also follow the mpint
method rather than the RFC 7748 method.

Please reply to curdle@ietf.org with your opinions.

        Thank you,
        -- Mark

From bounces-ietf-ssh-owner-secsh-tyoxbijeg7-archive=lists.ietf.org@NetBSD.org  Wed May 10 22:21:21 2017
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 C8908127444 for <ietfarch-secsh-tyoxbijeg7-archive@ietfa.amsl.com>; Wed, 10 May 2017 22:21:21 -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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_MED=-2.3, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, T_DKIM_INVALID=0.01] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=fail (2048-bit key) reason="fail (body has been altered)" header.d=rtfm-com.20150623.gappssmtp.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 Iuuo8LNyITcR for <ietfarch-secsh-tyoxbijeg7-archive@ietfa.amsl.com>; Wed, 10 May 2017 22:21:20 -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 9031E126C2F for <secsh-tyoxbijeg7-archive@lists.ietf.org>; Wed, 10 May 2017 22:21:20 -0700 (PDT)
Received: by mail.netbsd.org (Postfix, from userid 605) id 48320855B0; Thu, 11 May 2017 05:21:20 +0000 (UTC)
Delivered-To: ietf-ssh@netbsd.org
Received: by mail.netbsd.org (Postfix, from userid 1347) id E5636855AA; Thu, 11 May 2017 05:21:19 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 9DCAA84DA8 for <ietf-ssh@netbsd.org>; Wed, 10 May 2017 16:21:19 +0000 (UTC)
X-Virus-Scanned: amavisd-new at netbsd.org
Authentication-Results: mail.netbsd.org (amavisd-new); dkim=pass (2048-bit key) header.d=rtfm-com.20150623.gappssmtp.com
Received: from mail.netbsd.org ([IPv6:::1]) by localhost (mail.netbsd.org [IPv6:::1]) (amavisd-new, port 10025) with ESMTP id fIhzGWLCe3VT for <ietf-ssh@netbsd.org>; Wed, 10 May 2017 16:21:19 +0000 (UTC)
Received: from mail-yb0-x22c.google.com (mail-yb0-x22c.google.com [IPv6:2607:f8b0:4002:c09::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.netbsd.org (Postfix) with ESMTPS id E038B84CDB for <ietf-ssh@netbsd.org>; Wed, 10 May 2017 16:21:18 +0000 (UTC)
Received: by mail-yb0-x22c.google.com with SMTP id j17so198514ybj.0 for <ietf-ssh@netbsd.org>; Wed, 10 May 2017 09:21:18 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rtfm-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=v5q25DHV0VtWSwMMM3z71duY/zhjrRsrpeNjuvpEKHU=; b=hQqf7Ns4qcUDjC+y9g42+obT1yRyTHGMZAM8hmf2UzbxJQvfb/QG6tRf3xJGW55fda u2k6TpQY/N1E5HwUDU7iZnr+nt4jvBCi8OCvsiVMrjJMsZJXaCKWD9csi9i6DNG7o18h iLMkr+haiTDPlXQkNyrdIEpatK6B6Vvxi96K7pEqFIpOK+uWOJL5VjQ+nCfAvUhXP4zX KjwZ7VRihtDzZITHf8UuGFk0G60n17nUckvagfIamCDu9iLRba0GcC03SwWGcd9F+nko JE4Muh3MktRUZsPCI3MyscPA6nuyMxKL30WJSyOO3KFEOOriZ8kjVQjcHDn2+FJRTwWc OTmg==
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=v5q25DHV0VtWSwMMM3z71duY/zhjrRsrpeNjuvpEKHU=; b=n6hYxR4eOINeGvSE4rE/a2UPNBol78Y/+Ph5vNszl9Ae1dO8yz4FsA6lScFhJ5UfJx oSdy/cRbsbw5+OzCtRvpRLaFNH7cRMYtFrk0erAZPYZ6K3W+p1x+fGaNXwA7RDogOw8j FY6S7G5iWZfuZdLoO4AoQg1UUbg5oBan/aiVw/JshEdCtrYLnuGVDd6qOEFZt4pVIqTK MA8GGmhDnPCkeYL/jufbiDYwKGN4p7/zQbE2/Ez6sx9mjnCb4l2EMdR0SxvPCjnxQX07 6gxX6Q+cc8fKDhjMDPy6LgLm8f28/OMarJYY9py1nQEnR13ElVVcdKyRi7jGCds6rlc7 bSfQ==
X-Gm-Message-State: AODbwcCob+LuTsXjQvGdxza+MbnRFhgCkwAEMSQfYZ4wzeyYd6ioPD7Y 1gXKPjEFDSbHHi96jWDHrPtnIHo0uUbM
X-Received: by 10.37.218.145 with SMTP id n139mr5487597ybf.117.1494433277914; Wed, 10 May 2017 09:21:17 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.129.131.150 with HTTP; Wed, 10 May 2017 09:20:37 -0700 (PDT)
In-Reply-To: <76FD0F39-1F3D-4476-A3D8-D4C942C2EFD1@juniper.net>
References: <76FD0F39-1F3D-4476-A3D8-D4C942C2EFD1@juniper.net>
From: Eric Rescorla <ekr@rtfm.com>
Date: Wed, 10 May 2017 09:20:37 -0700
Message-ID: <CABcZeBNYUV=-azoZzZjnNtCEu3K0A-THHN2mt02V65oihbbrXw@mail.gmail.com>
Subject: Re: ssh-ed25519 implementations
To: Mark Baushke <mdb@juniper.net>
Cc: "ietf-ssh@NetBSD.org" <ietf-ssh@netbsd.org>, "curdle@ietf.org" <curdle@ietf.org>
Content-Type: multipart/alternative; boundary=94eb2c07e820abd3f4054f2ddcac
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>

--94eb2c07e820abd3f4054f2ddcac
Content-Type: text/plain; charset=UTF-8

On Wed, May 10, 2017 at 9:18 AM, Mark Baushke <mdb@juniper.net> wrote:

> Hi,
>
> Eric Rescorla <ekr@rtfm.com> has brought to my attention that in
> https://tools.ietf.org/html/draft-ietf-curdle-ssh-curves-04 it is
> currently specifying the SSH encoding of secrets on the wire using the
> mpint process as described in section 5 of [RFC4251] while RFC 7748
> describes using a little-endian format:
>
>   GF(2^448 - 2^224 - 1) and are encoded as an array of bytes, u,
>   in little-endian order such that u[0] + 256*u[1] + 256^2*u[2] + ... +
>
> This seems to be what is being implemeneted for
> curve25519-sha256@libssh.org, so I should make
> an explicit note of this in the draft.
>

Thanks. To be clear, I'm not saying this is the wrong thing in the draft
(though I do think it's kind of an unfortunate outcome). I just think it's
critically important to be clear.


>
> However, I am unaware of any curve448-sha512 implementations at
> present and would like consensus that it should also follow the mpint
> method rather than the RFC 7748 method.
>

I tend to think the 7748 method, but all the options are pretty terrible
here

-Ekr


>
> Please reply to curdle@ietf.org with your opinions.
>
>         Thank you,
>         -- Mark
>
>

--94eb2c07e820abd3f4054f2ddcac
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><div class=3D"gmail_extra"><br><div class=3D"gmail_quo=
te">On Wed, May 10, 2017 at 9:18 AM, Mark Baushke <span dir=3D"ltr">&lt;<a =
href=3D"mailto:mdb@juniper.net" target=3D"_blank">mdb@juniper.net</a>&gt;</=
span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8e=
x;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
Eric Rescorla &lt;<a href=3D"mailto:ekr@rtfm.com">ekr@rtfm.com</a>&gt; has =
brought to my attention that in<br>
<a href=3D"https://tools.ietf.org/html/draft-ietf-curdle-ssh-curves-04" rel=
=3D"noreferrer" target=3D"_blank">https://tools.ietf.org/html/<wbr>draft-ie=
tf-curdle-ssh-curves-<wbr>04</a> it is<br>
currently specifying the SSH encoding of secrets on the wire using the<br>
mpint process as described in section 5 of [RFC4251] while RFC 7748<br>
describes using a little-endian format:<br>
<br>
=C2=A0 GF(2^448 - 2^224 - 1) and are encoded as an array of bytes, u,<br>
=C2=A0 in little-endian order such that u[0] + 256*u[1] + 256^2*u[2] + ... =
+<br>
<br>
This seems to be what is being implemeneted for<br>
<a href=3D"mailto:curve25519-sha256@libssh.org">curve25519-sha256@libssh.or=
g</a>, so I should make<br>
an explicit note of this in the draft.<br></blockquote><div><br></div><div>=
Thanks. To be clear, I&#39;m not saying this is the wrong thing in the draf=
t</div><div>(though I do think it&#39;s kind of an unfortunate outcome). I =
just think it&#39;s</div><div>critically important to be clear.</div><div>=
=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;bo=
rder-left:1px #ccc solid;padding-left:1ex">
<br>
However, I am unaware of any curve448-sha512 implementations at<br>
present and would like consensus that it should also follow the mpint<br>
method rather than the RFC 7748 method.<br></blockquote><div><br></div><div=
>I tend to think the 7748 method, but all the options are pretty terrible h=
ere</div><div><br></div><div>-Ekr</div><div>=C2=A0</div><blockquote class=
=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padd=
ing-left:1ex">
<br>
Please reply to <a href=3D"mailto:curdle@ietf.org">curdle@ietf.org</a> with=
 your opinions.<br>
<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 Thank you,<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 -- Mark<br>
<br>
</blockquote></div><br></div></div>

--94eb2c07e820abd3f4054f2ddcac--

From bounces-ietf-ssh-owner-secsh-tyoxbijeg7-archive=lists.ietf.org@NetBSD.org  Wed May 10 22:22:05 2017
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 68A3C127444 for <ietfarch-secsh-tyoxbijeg7-archive@ietfa.amsl.com>; Wed, 10 May 2017 22:22:05 -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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_MED=-2.3, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, T_DKIM_INVALID=0.01] 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=timeheart.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 MtRGDrlhBY29 for <ietfarch-secsh-tyoxbijeg7-archive@ietfa.amsl.com>; Wed, 10 May 2017 22:22:03 -0700 (PDT)
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200]) (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 AE423126C2F for <secsh-tyoxbijeg7-archive@lists.ietf.org>; Wed, 10 May 2017 22:22:00 -0700 (PDT)
Received: by mail.netbsd.org (Postfix, from userid 605) id 6461B855AA; Thu, 11 May 2017 05:21:59 +0000 (UTC)
Delivered-To: ietf-ssh@netbsd.org
Received: by mail.netbsd.org (Postfix, from userid 1347) id 0B726855A3; Thu, 11 May 2017 05:21:59 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id E0BB884DAA for <ietf-ssh@netbsd.org>; Thu, 11 May 2017 02:49:33 +0000 (UTC)
X-Virus-Scanned: amavisd-new at netbsd.org
Authentication-Results: mail.netbsd.org (amavisd-new); dkim=pass (1024-bit key) header.d=timeheart.net
Received: from mail.netbsd.org ([IPv6:::1]) by localhost (mail.netbsd.org [IPv6:::1]) (amavisd-new, port 10025) with ESMTP id 3ggA1Ej36aU5 for <ietf-ssh@netbsd.org>; Thu, 11 May 2017 02:49:33 +0000 (UTC)
Received: from mail-pf0-x232.google.com (mail-pf0-x232.google.com [IPv6:2607:f8b0:400e:c00::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.netbsd.org (Postfix) with ESMTPS id 0829484CD8 for <ietf-ssh@netbsd.org>; Thu, 11 May 2017 02:49:32 +0000 (UTC)
Received: by mail-pf0-x232.google.com with SMTP id n23so1723051pfb.2 for <ietf-ssh@netbsd.org>; Wed, 10 May 2017 19:49:32 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=timeheart.net; s=mail; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=hPIwb7fpi9Nrv8RUa7DTjE4iC6XJ3cnT3cY0MhWq+80=; b=UsHslBSMnOSAce3knbV/TUFamDyOX5vmEdphL55JKcOQNB4QYKGmd6NwE37N9J9QGe EwRWNdWTP/lpkPpb9g0DP9yWHRqqY8/uHo7LNVja0aoSr65Gw7bjV8useYRrwpmmAWUd SAMGsxoNrr9YYQnyUC72rfeSl9EUmgJnkUOOw=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=hPIwb7fpi9Nrv8RUa7DTjE4iC6XJ3cnT3cY0MhWq+80=; b=OLNMv8/1wqOo1hbm28CXfEeLTiEhH6VZXyu9lR3LnxqdfwtHm1famB9bkHy1mVEwH1 9+kujGBRoSv9KQCIyxEj7dCSjRMc8OiE18jJdDaT7j3j0Vxs7YY7gm010+9jm0RanA/C rJFpZMtKwsV1KxsqC4nZGltreAMQozSxTv4C/oOnnVowkCEvByJlEFNxyNZn82qtUYT9 1XRks/VwucV9eEPTAB6AjFZ0tqnFqCy6TNDJnrqKERT86txPdfhhNu73uT7l97Cu1XZA dqFGD0/zPRJyM0BpQ1zrdvkWjiihps5YZX4VlF1j0US66kgnbddUZC7TFFl92dULtMF2 nc9Q==
X-Gm-Message-State: AODbwcBQBQsHf732Qj+E5b6fI408VGZEvMrTdQpz8AIOeP/hJNEz986y IYm7MGUUPatxgg==
X-Received: by 10.84.130.7 with SMTP id 7mr12474829plc.35.1494470971492; Wed, 10 May 2017 19:49:31 -0700 (PDT)
Received: from ?IPv6:2601:647:4282:2200:cfa:5497:d692:7eeb? ([2601:647:4282:2200:cfa:5497:d692:7eeb]) by smtp.gmail.com with ESMTPSA id z68sm416169pgz.14.2017.05.10.19.49.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 May 2017 19:49:30 -0700 (PDT)
From: Ron Frederick <ronf@timeheart.net>
Message-Id: <0BC6F061-CBFB-4935-9C00-42CB1741543D@timeheart.net>
Content-Type: multipart/alternative; boundary="Apple-Mail=_E671D99B-B3F3-4360-A53E-275EF6CD33BA"
Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\))
Subject: Re: ssh-ed25519 implementations
Date: Wed, 10 May 2017 19:49:29 -0700
In-Reply-To: <76FD0F39-1F3D-4476-A3D8-D4C942C2EFD1@juniper.net>
Cc: "ietf-ssh@NetBSD.org" <ietf-ssh@NetBSD.org>, "curdle@ietf.org" <curdle@ietf.org>
To: Mark Baushke <mdb@juniper.net>
References: <76FD0F39-1F3D-4476-A3D8-D4C942C2EFD1@juniper.net>
X-Mailer: Apple Mail (2.3273)
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>

--Apple-Mail=_E671D99B-B3F3-4360-A53E-275EF6CD33BA
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=utf-8

On May 10, 2017, at 9:18 AM, Mark Baushke <mdb@juniper.net> wrote:
> Eric Rescorla <ekr@rtfm.com> has brought to my attention that in
> https://tools.ietf.org/html/draft-ietf-curdle-ssh-curves-04 it is
> currently specifying the SSH encoding of secrets on the wire using the
> mpint process as described in section 5 of [RFC4251] while RFC 7748
> describes using a little-endian format:
>=20
>  GF(2^448 - 2^224 - 1) and are encoded as an array of bytes, u,
>  in little-endian order such that u[0] + 256*u[1] + 256^2*u[2] + ... +
>=20
> This seems to be what is being implemeneted for
> curve25519-sha256@libssh.org, so I should make
> an explicit note of this in the draft.
>=20
> However, I am unaware of any curve448-sha512 implementations at
> present and would like consensus that it should also follow the mpint
> method rather than the RFC 7748 method.
>=20
> Please reply to curdle@ietf.org with your opinions.


I have implemented for ssh-ed25519 public keys and certificates in =
AsyncSSH, and my implementation currently uses opaque byte strings taken =
from the implementation of curve25519 in libsodium when encoding public =
and private keys. These byte strings are encoded as SSH =E2=80=98string=E2=
=80=99 values (4-byte big-endian string length followed by an array of =
bytes of that length). The public key is a single string value and the =
private key is the concatenation of two string values (public key =
followed by private key, each with its own preceding 4-byte length =
value). This implementation interoperates with OpenSSH.

More details can be found in the Internet Draft at:

https://tools.ietf.org/html/draft-bjh21-ssh-ed25519-00 =
<https://tools.ietf.org/html/draft-bjh21-ssh-ed25519-00>

This refers to:

https://tools.ietf.org/html/draft-josefsson-eddsa-ed25519-03 =
<https://tools.ietf.org/html/draft-josefsson-eddsa-ed25519-03>

I have also implemented curve25519-sha256@libssh.org =
<mailto:curve25519-sha256@libssh.org> key exchange as documented at:

=
https://git.libssh.org/projects/libssh.git/plain/doc/curve25519-sha256@lib=
ssh.org.txt =
<https://git.libssh.org/projects/libssh.git/plain/doc/curve25519-sha256@li=
bssh.org.txt>

OpenSSH also implements this, and makes it available under both this =
name and more recently as just =E2=80=9Ccurve25519-sha256=E2=80=9D.

Here, the public key values exchanged in messages like KEX_ECDH_INIT and =
KEX_ECDH_REPLY are opaque byte strings similar to the above. As =
discussed in https://tools.ietf.org/html/draft-ietf-curdle-ssh-curves-04 =
<https://tools.ietf.org/html/draft-ietf-curdle-ssh-curves-04>, the final =
computed shared secret value is converted to an integer by taking the =
32-byte point obtained by scalar multiplication and treating the bytes =
as a bigendian (network byte order) value, but this value is never =
directly sent on the wire, so I=E2=80=99m not sure the =E2=80=9Cmpint" =
encoding ever applies to it. The only values on the wire are the public =
keys and signature values, all of which are encoded as strings.
--=20
Ron Frederick
ronf@timeheart.net




--Apple-Mail=_E671D99B-B3F3-4360-A53E-275EF6CD33BA
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=utf-8

<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html =
charset=3Dutf-8"></head><body style=3D"word-wrap: break-word; =
-webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" =
class=3D"">On May 10, 2017, at 9:18 AM, Mark Baushke &lt;<a =
href=3D"mailto:mdb@juniper.net" class=3D"">mdb@juniper.net</a>&gt; =
wrote:<br class=3D""><div><blockquote type=3D"cite" class=3D"">Eric =
Rescorla &lt;<a href=3D"mailto:ekr@rtfm.com" =
class=3D"">ekr@rtfm.com</a>&gt; has brought to my attention that in<br =
class=3D""><div class=3D""><div class=3D""><a =
href=3D"https://tools.ietf.org/html/draft-ietf-curdle-ssh-curves-04" =
class=3D"">https://tools.ietf.org/html/draft-ietf-curdle-ssh-curves-04</a>=
 it is<br class=3D"">currently specifying the SSH encoding of secrets on =
the wire using the<br class=3D"">mpint process as described in section 5 =
of [RFC4251] while RFC 7748<br class=3D"">describes using a =
little-endian format:<br class=3D""><br class=3D""> &nbsp;GF(2^448 - =
2^224 - 1) and are encoded as an array of bytes, u,<br class=3D""> =
&nbsp;in little-endian order such that u[0] + 256*u[1] + 256^2*u[2] + =
... +<br class=3D""><br class=3D"">This seems to be what is being =
implemeneted for<br class=3D""><a =
href=3D"mailto:curve25519-sha256@libssh.org" =
class=3D"">curve25519-sha256@libssh.org</a>, so I should make<br =
class=3D"">an explicit note of this in the draft.<br class=3D""><br =
class=3D"">However, I am unaware of any curve448-sha512 implementations =
at<br class=3D"">present and would like consensus that it should also =
follow the mpint<br class=3D"">method rather than the RFC 7748 =
method.<br class=3D""><br class=3D"">Please reply to <a =
href=3D"mailto:curdle@ietf.org" class=3D"">curdle@ietf.org</a> with your =
opinions.<br class=3D""></div></div></blockquote></div><div class=3D""><br=
 class=3D""></div>I have implemented for ssh-ed25519 public keys and =
certificates in AsyncSSH, and my implementation currently uses opaque =
byte strings taken from the implementation of curve25519 in libsodium =
when encoding public and private keys. These byte strings are encoded as =
SSH =E2=80=98string=E2=80=99 values (4-byte big-endian string length =
followed by an array of bytes of that length). The public key is a =
single string value and the private key is the concatenation of two =
string values (public key followed by private key, each with its own =
preceding 4-byte length value). This implementation interoperates with =
OpenSSH.<div class=3D""><br class=3D""></div><div class=3D"">More =
details can be found in the Internet Draft at:</div><div class=3D""><br =
class=3D""></div><div class=3D""><a =
href=3D"https://tools.ietf.org/html/draft-bjh21-ssh-ed25519-00" =
class=3D"">https://tools.ietf.org/html/draft-bjh21-ssh-ed25519-00</a></div=
><div class=3D""><br class=3D""></div><div class=3D"">This refers =
to:</div><div class=3D""><br class=3D""></div><div class=3D""><a =
href=3D"https://tools.ietf.org/html/draft-josefsson-eddsa-ed25519-03" =
class=3D"">https://tools.ietf.org/html/draft-josefsson-eddsa-ed25519-03</a=
></div><div class=3D""><br class=3D""></div><div class=3D"">I have also =
implemented <a href=3D"mailto:curve25519-sha256@libssh.org" =
class=3D"">curve25519-sha256@libssh.org</a>&nbsp;key exchange as =
documented at:</div><div class=3D""><br class=3D""></div><div =
class=3D""><a =
href=3D"https://git.libssh.org/projects/libssh.git/plain/doc/curve25519-sh=
a256@libssh.org.txt" =
class=3D"">https://git.libssh.org/projects/libssh.git/plain/doc/curve25519=
-sha256@libssh.org.txt</a></div><div class=3D""><br class=3D""></div><div =
class=3D"">OpenSSH also implements this, and makes it available under =
both this name and more recently as just =
=E2=80=9Ccurve25519-sha256=E2=80=9D.</div><div class=3D""><br =
class=3D""></div><div class=3D"">Here, the public key values exchanged =
in messages like KEX_ECDH_INIT and KEX_ECDH_REPLY are opaque byte =
strings similar to the above. As discussed in&nbsp;<a =
href=3D"https://tools.ietf.org/html/draft-ietf-curdle-ssh-curves-04" =
class=3D"">https://tools.ietf.org/html/draft-ietf-curdle-ssh-curves-04</a>=
, the final computed shared secret value is converted to an integer by =
taking the 32-byte point obtained by scalar multiplication and treating =
the bytes as a bigendian (network byte order) value, but this value is =
never directly sent on the wire, so I=E2=80=99m not sure the =E2=80=9Cmpin=
t" encoding ever applies to it. The only values on the wire are the =
public keys and signature values, all of which are encoded as =
strings.</div><div class=3D""><div class=3D"">
--&nbsp;<br class=3D"">Ron Frederick<br class=3D""><a =
href=3D"mailto:ronf@timeheart.net" class=3D"">ronf@timeheart.net</a><br =
class=3D""><br class=3D""><br class=3D"">

</div>
<br class=3D""></div></body></html>=

--Apple-Mail=_E671D99B-B3F3-4360-A53E-275EF6CD33BA--

From bounces-ietf-ssh-owner-secsh-tyoxbijeg7-archive=lists.ietf.org@NetBSD.org  Wed May 10 22:22:09 2017
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 295EA128BC8 for <ietfarch-secsh-tyoxbijeg7-archive@ietfa.amsl.com>; Wed, 10 May 2017 22:22:09 -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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_MED=-2.3, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, T_DKIM_INVALID=0.01] autolearn=unavailable autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=fail (1024-bit key) reason="fail (body has been altered)" header.d=timeheart.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 CS_IDpoxzsAE for <ietfarch-secsh-tyoxbijeg7-archive@ietfa.amsl.com>; Wed, 10 May 2017 22:22:07 -0700 (PDT)
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200]) (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 0D481127601 for <secsh-tyoxbijeg7-archive@lists.ietf.org>; Wed, 10 May 2017 22:22:07 -0700 (PDT)
Received: by mail.netbsd.org (Postfix, from userid 605) id 5064884DA9; Thu, 11 May 2017 05:22:03 +0000 (UTC)
Delivered-To: ietf-ssh@netbsd.org
Received: by mail.netbsd.org (Postfix, from userid 1347) id E946E84CEA; Thu, 11 May 2017 05:22:02 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id E0BB884DAA for <ietf-ssh@netbsd.org>; Thu, 11 May 2017 02:49:33 +0000 (UTC)
X-Virus-Scanned: amavisd-new at netbsd.org
Authentication-Results: mail.netbsd.org (amavisd-new); dkim=pass (1024-bit key) header.d=timeheart.net
Received: from mail.netbsd.org ([IPv6:::1]) by localhost (mail.netbsd.org [IPv6:::1]) (amavisd-new, port 10025) with ESMTP id 3ggA1Ej36aU5 for <ietf-ssh@netbsd.org>; Thu, 11 May 2017 02:49:33 +0000 (UTC)
Received: from mail-pf0-x232.google.com (mail-pf0-x232.google.com [IPv6:2607:f8b0:400e:c00::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.netbsd.org (Postfix) with ESMTPS id 0829484CD8 for <ietf-ssh@netbsd.org>; Thu, 11 May 2017 02:49:32 +0000 (UTC)
Received: by mail-pf0-x232.google.com with SMTP id n23so1723051pfb.2 for <ietf-ssh@netbsd.org>; Wed, 10 May 2017 19:49:32 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=timeheart.net; s=mail; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=hPIwb7fpi9Nrv8RUa7DTjE4iC6XJ3cnT3cY0MhWq+80=; b=UsHslBSMnOSAce3knbV/TUFamDyOX5vmEdphL55JKcOQNB4QYKGmd6NwE37N9J9QGe EwRWNdWTP/lpkPpb9g0DP9yWHRqqY8/uHo7LNVja0aoSr65Gw7bjV8useYRrwpmmAWUd SAMGsxoNrr9YYQnyUC72rfeSl9EUmgJnkUOOw=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=hPIwb7fpi9Nrv8RUa7DTjE4iC6XJ3cnT3cY0MhWq+80=; b=OLNMv8/1wqOo1hbm28CXfEeLTiEhH6VZXyu9lR3LnxqdfwtHm1famB9bkHy1mVEwH1 9+kujGBRoSv9KQCIyxEj7dCSjRMc8OiE18jJdDaT7j3j0Vxs7YY7gm010+9jm0RanA/C rJFpZMtKwsV1KxsqC4nZGltreAMQozSxTv4C/oOnnVowkCEvByJlEFNxyNZn82qtUYT9 1XRks/VwucV9eEPTAB6AjFZ0tqnFqCy6TNDJnrqKERT86txPdfhhNu73uT7l97Cu1XZA dqFGD0/zPRJyM0BpQ1zrdvkWjiihps5YZX4VlF1j0US66kgnbddUZC7TFFl92dULtMF2 nc9Q==
X-Gm-Message-State: AODbwcBQBQsHf732Qj+E5b6fI408VGZEvMrTdQpz8AIOeP/hJNEz986y IYm7MGUUPatxgg==
X-Received: by 10.84.130.7 with SMTP id 7mr12474829plc.35.1494470971492; Wed, 10 May 2017 19:49:31 -0700 (PDT)
Received: from ?IPv6:2601:647:4282:2200:cfa:5497:d692:7eeb? ([2601:647:4282:2200:cfa:5497:d692:7eeb]) by smtp.gmail.com with ESMTPSA id z68sm416169pgz.14.2017.05.10.19.49.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 May 2017 19:49:30 -0700 (PDT)
From: Ron Frederick <ronf@timeheart.net>
Message-Id: <0BC6F061-CBFB-4935-9C00-42CB1741543D@timeheart.net>
Content-Type: multipart/alternative; boundary="Apple-Mail=_E671D99B-B3F3-4360-A53E-275EF6CD33BA"
Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\))
Subject: Re: ssh-ed25519 implementations
Date: Wed, 10 May 2017 19:49:29 -0700
In-Reply-To: <76FD0F39-1F3D-4476-A3D8-D4C942C2EFD1@juniper.net>
Cc: "ietf-ssh@NetBSD.org" <ietf-ssh@NetBSD.org>, "curdle@ietf.org" <curdle@ietf.org>
To: Mark Baushke <mdb@juniper.net>
References: <76FD0F39-1F3D-4476-A3D8-D4C942C2EFD1@juniper.net>
X-Mailer: Apple Mail (2.3273)
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>

--Apple-Mail=_E671D99B-B3F3-4360-A53E-275EF6CD33BA
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=utf-8

On May 10, 2017, at 9:18 AM, Mark Baushke <mdb@juniper.net> wrote:
> Eric Rescorla <ekr@rtfm.com> has brought to my attention that in
> https://tools.ietf.org/html/draft-ietf-curdle-ssh-curves-04 it is
> currently specifying the SSH encoding of secrets on the wire using the
> mpint process as described in section 5 of [RFC4251] while RFC 7748
> describes using a little-endian format:
>=20
>  GF(2^448 - 2^224 - 1) and are encoded as an array of bytes, u,
>  in little-endian order such that u[0] + 256*u[1] + 256^2*u[2] + ... +
>=20
> This seems to be what is being implemeneted for
> curve25519-sha256@libssh.org, so I should make
> an explicit note of this in the draft.
>=20
> However, I am unaware of any curve448-sha512 implementations at
> present and would like consensus that it should also follow the mpint
> method rather than the RFC 7748 method.
>=20
> Please reply to curdle@ietf.org with your opinions.


I have implemented for ssh-ed25519 public keys and certificates in =
AsyncSSH, and my implementation currently uses opaque byte strings taken =
from the implementation of curve25519 in libsodium when encoding public =
and private keys. These byte strings are encoded as SSH =E2=80=98string=E2=
=80=99 values (4-byte big-endian string length followed by an array of =
bytes of that length). The public key is a single string value and the =
private key is the concatenation of two string values (public key =
followed by private key, each with its own preceding 4-byte length =
value). This implementation interoperates with OpenSSH.

More details can be found in the Internet Draft at:

https://tools.ietf.org/html/draft-bjh21-ssh-ed25519-00 =
<https://tools.ietf.org/html/draft-bjh21-ssh-ed25519-00>

This refers to:

https://tools.ietf.org/html/draft-josefsson-eddsa-ed25519-03 =
<https://tools.ietf.org/html/draft-josefsson-eddsa-ed25519-03>

I have also implemented curve25519-sha256@libssh.org =
<mailto:curve25519-sha256@libssh.org> key exchange as documented at:

=
https://git.libssh.org/projects/libssh.git/plain/doc/curve25519-sha256@lib=
ssh.org.txt =
<https://git.libssh.org/projects/libssh.git/plain/doc/curve25519-sha256@li=
bssh.org.txt>

OpenSSH also implements this, and makes it available under both this =
name and more recently as just =E2=80=9Ccurve25519-sha256=E2=80=9D.

Here, the public key values exchanged in messages like KEX_ECDH_INIT and =
KEX_ECDH_REPLY are opaque byte strings similar to the above. As =
discussed in https://tools.ietf.org/html/draft-ietf-curdle-ssh-curves-04 =
<https://tools.ietf.org/html/draft-ietf-curdle-ssh-curves-04>, the final =
computed shared secret value is converted to an integer by taking the =
32-byte point obtained by scalar multiplication and treating the bytes =
as a bigendian (network byte order) value, but this value is never =
directly sent on the wire, so I=E2=80=99m not sure the =E2=80=9Cmpint" =
encoding ever applies to it. The only values on the wire are the public =
keys and signature values, all of which are encoded as strings.
--=20
Ron Frederick
ronf@timeheart.net




--Apple-Mail=_E671D99B-B3F3-4360-A53E-275EF6CD33BA
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=utf-8

<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html =
charset=3Dutf-8"></head><body style=3D"word-wrap: break-word; =
-webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" =
class=3D"">On May 10, 2017, at 9:18 AM, Mark Baushke &lt;<a =
href=3D"mailto:mdb@juniper.net" class=3D"">mdb@juniper.net</a>&gt; =
wrote:<br class=3D""><div><blockquote type=3D"cite" class=3D"">Eric =
Rescorla &lt;<a href=3D"mailto:ekr@rtfm.com" =
class=3D"">ekr@rtfm.com</a>&gt; has brought to my attention that in<br =
class=3D""><div class=3D""><div class=3D""><a =
href=3D"https://tools.ietf.org/html/draft-ietf-curdle-ssh-curves-04" =
class=3D"">https://tools.ietf.org/html/draft-ietf-curdle-ssh-curves-04</a>=
 it is<br class=3D"">currently specifying the SSH encoding of secrets on =
the wire using the<br class=3D"">mpint process as described in section 5 =
of [RFC4251] while RFC 7748<br class=3D"">describes using a =
little-endian format:<br class=3D""><br class=3D""> &nbsp;GF(2^448 - =
2^224 - 1) and are encoded as an array of bytes, u,<br class=3D""> =
&nbsp;in little-endian order such that u[0] + 256*u[1] + 256^2*u[2] + =
... +<br class=3D""><br class=3D"">This seems to be what is being =
implemeneted for<br class=3D""><a =
href=3D"mailto:curve25519-sha256@libssh.org" =
class=3D"">curve25519-sha256@libssh.org</a>, so I should make<br =
class=3D"">an explicit note of this in the draft.<br class=3D""><br =
class=3D"">However, I am unaware of any curve448-sha512 implementations =
at<br class=3D"">present and would like consensus that it should also =
follow the mpint<br class=3D"">method rather than the RFC 7748 =
method.<br class=3D""><br class=3D"">Please reply to <a =
href=3D"mailto:curdle@ietf.org" class=3D"">curdle@ietf.org</a> with your =
opinions.<br class=3D""></div></div></blockquote></div><div class=3D""><br=
 class=3D""></div>I have implemented for ssh-ed25519 public keys and =
certificates in AsyncSSH, and my implementation currently uses opaque =
byte strings taken from the implementation of curve25519 in libsodium =
when encoding public and private keys. These byte strings are encoded as =
SSH =E2=80=98string=E2=80=99 values (4-byte big-endian string length =
followed by an array of bytes of that length). The public key is a =
single string value and the private key is the concatenation of two =
string values (public key followed by private key, each with its own =
preceding 4-byte length value). This implementation interoperates with =
OpenSSH.<div class=3D""><br class=3D""></div><div class=3D"">More =
details can be found in the Internet Draft at:</div><div class=3D""><br =
class=3D""></div><div class=3D""><a =
href=3D"https://tools.ietf.org/html/draft-bjh21-ssh-ed25519-00" =
class=3D"">https://tools.ietf.org/html/draft-bjh21-ssh-ed25519-00</a></div=
><div class=3D""><br class=3D""></div><div class=3D"">This refers =
to:</div><div class=3D""><br class=3D""></div><div class=3D""><a =
href=3D"https://tools.ietf.org/html/draft-josefsson-eddsa-ed25519-03" =
class=3D"">https://tools.ietf.org/html/draft-josefsson-eddsa-ed25519-03</a=
></div><div class=3D""><br class=3D""></div><div class=3D"">I have also =
implemented <a href=3D"mailto:curve25519-sha256@libssh.org" =
class=3D"">curve25519-sha256@libssh.org</a>&nbsp;key exchange as =
documented at:</div><div class=3D""><br class=3D""></div><div =
class=3D""><a =
href=3D"https://git.libssh.org/projects/libssh.git/plain/doc/curve25519-sh=
a256@libssh.org.txt" =
class=3D"">https://git.libssh.org/projects/libssh.git/plain/doc/curve25519=
-sha256@libssh.org.txt</a></div><div class=3D""><br class=3D""></div><div =
class=3D"">OpenSSH also implements this, and makes it available under =
both this name and more recently as just =
=E2=80=9Ccurve25519-sha256=E2=80=9D.</div><div class=3D""><br =
class=3D""></div><div class=3D"">Here, the public key values exchanged =
in messages like KEX_ECDH_INIT and KEX_ECDH_REPLY are opaque byte =
strings similar to the above. As discussed in&nbsp;<a =
href=3D"https://tools.ietf.org/html/draft-ietf-curdle-ssh-curves-04" =
class=3D"">https://tools.ietf.org/html/draft-ietf-curdle-ssh-curves-04</a>=
, the final computed shared secret value is converted to an integer by =
taking the 32-byte point obtained by scalar multiplication and treating =
the bytes as a bigendian (network byte order) value, but this value is =
never directly sent on the wire, so I=E2=80=99m not sure the =E2=80=9Cmpin=
t" encoding ever applies to it. The only values on the wire are the =
public keys and signature values, all of which are encoded as =
strings.</div><div class=3D""><div class=3D"">
--&nbsp;<br class=3D"">Ron Frederick<br class=3D""><a =
href=3D"mailto:ronf@timeheart.net" class=3D"">ronf@timeheart.net</a><br =
class=3D""><br class=3D""><br class=3D"">

</div>
<br class=3D""></div></body></html>=

--Apple-Mail=_E671D99B-B3F3-4360-A53E-275EF6CD33BA--

From bounces-ietf-ssh-owner-secsh-tyoxbijeg7-archive=lists.ietf.org@NetBSD.org  Wed May 10 22:22:21 2017
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 04E3C128BC8 for <ietfarch-secsh-tyoxbijeg7-archive@ietfa.amsl.com>; Wed, 10 May 2017 22:22:21 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.39
X-Spam-Level:
X-Spam-Status: No, score=-1.39 tagged_above=-999 required=5 tests=[BAYES_50=0.8, DKIM_SIGNED=0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_MED=-2.3, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, T_DKIM_INVALID=0.01] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=fail (2048-bit key) reason="fail (body has been altered)" header.d=denisbider.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 c1sC6_opZMge for <ietfarch-secsh-tyoxbijeg7-archive@ietfa.amsl.com>; Wed, 10 May 2017 22:22:18 -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 5851C129AF4 for <secsh-tyoxbijeg7-archive@lists.ietf.org>; Wed, 10 May 2017 22:22:12 -0700 (PDT)
Received: by mail.netbsd.org (Postfix, from userid 605) id 26F4F855B2; Thu, 11 May 2017 05:22:10 +0000 (UTC)
Delivered-To: ietf-ssh@netbsd.org
Received: by mail.netbsd.org (Postfix, from userid 1347) id CCEE7855A7; Thu, 11 May 2017 05:22:09 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 4850585599 for <ietf-ssh@NetBSD.org>; Thu, 11 May 2017 03:53:50 +0000 (UTC)
X-Virus-Scanned: amavisd-new at netbsd.org
Authentication-Results: mail.netbsd.org (amavisd-new); dkim=pass (2048-bit key) header.d=denisbider.com
Received: from mail.netbsd.org ([127.0.0.1]) by localhost (mail.netbsd.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id jgZvf-MPzN4C for <ietf-ssh@netbsd.org>; Thu, 11 May 2017 03:53:49 +0000 (UTC)
Received: from skroderider.denisbider.com (skroderider.denisbider.com [50.18.172.175]) (using TLSv1.1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.netbsd.org (Postfix) with ESMTPS id 9CD0C84CE1 for <ietf-ssh@NetBSD.org>; Thu, 11 May 2017 03:53:49 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=denisbider.com; s=mail; h=from:subject:date:message-id:to:mime-version:content-type:in-reply-to: references; bh=IgVov2NUbTGjomFsLNS2rO5UJqS9kkxV4NHqBfjNGE8=; b=QrMZCeBZIZrdzV7dV9YlZpXU1V84nP+Ojf6BFZTvk0aWC2chyXrwNKurmnsHO13jkfb0pHWHnbTW2 KhyHB6ou9dgAuHLLjpm9Z2QY73fDZRUO6wGf4HbqTT3/Uymdb/Bj8h6AaYGI8VYhhy5JYxrMm8nnZI 6dSvVEukuM+yuUJfSImL4EWiOIGOUpWUYwm5/A7SbVJapQz4Zg5U7oUIPUvBPKkYDtVKFZzgarK6VF BBN/vbtNKC0L7dBX+Y6fgomPbBC6M3P2usj0MRalgM2zyrp7dpEb2yaTRQI6km9mxRuvwRBdO8WDHf syjSI5/glQU9yv7zQn81wF4Zj/pk2VQ==
X-Footer: ZGVuaXNiaWRlci5jb20=
Received: from localhost ([127.0.0.1]) by skroderider.denisbider.com with ESMTPSA (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256 bits)); Thu, 11 May 2017 04:53:44 +0100
Message-ID: <B1761C2AE47B4204B4002FDEE14C0218@Khan>
From: "denis bider \(Bitvise\)" <ietf-ssh3@denisbider.com>
To: <ietf-ssh@NetBSD.org>, "Mark D. Baushke" <mdb@juniper.net>
References: <72914.1494466759@eng-mail01.juniper.net>
In-Reply-To: <72914.1494466759@eng-mail01.juniper.net>
Subject: Re: ssh-ed25519 implementations
Date: Wed, 10 May 2017 21:53:01 -0600
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="----=_NextPart_000_0099_01D2C9D7.CB6F8240"
X-Priority: 3
X-MSMail-Priority: Normal
Importance: Normal
X-Mailer: Microsoft Windows Live Mail 16.4.3528.331
X-MimeOLE: Produced By Microsoft MimeOLE V16.4.3528.331
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>

This is a multi-part message in MIME format.

------=_NextPart_000_0099_01D2C9D7.CB6F8240
Content-Type: text/plain;
	charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Hey Mark!

For curve448-sha512, I have no objections for either choice of encoding. =
What=E2=80=99s more important than the choice of encoding is that there =
isn=E2=80=99t doubt about the choice of encoding.

That being said, I agree it may be slightly preferable to use signed =
mpint, given that this would be consistent with all other SSH key =
exchange methods, including Curve25519, and it would be weird for =
Curve448 to depart from this.

denis


From: Mark D. Baushke=20
Sent: Wednesday, May 10, 2017 19:39
To: ietf-ssh@NetBSD.org=20
Subject: ssh-ed25519 implementations


[Second attempt. my first attempt got bounced by fraud detection checks
for some unknown reason. -- mdb]

Hi,

Eric Rescorla <ekr@rtfm.com> has brought to my attention that in
https://tools.ietf.org/html/draft-ietf-curdle-ssh-curves-04 it is
currently specifying the SSH encoding of secrets on the wire using the
mpint process as described in section 5 of [RFC4251] while RFC 7748
describes using a little-endian format:

  GF(2^448 - 2^224 - 1) and are encoded as an array of bytes, u,
  in little-endian order such that u[0] + 256*u[1] + 256^2*u[2] + ... +

This seems to be what is being implemeneted for
curve25519-sha256@libssh.org, so I should make
an explicit note of this in the draft.

However, I am unaware of any curve448-sha512 implementations at
present and would like consensus that it should also follow the mpint
method rather than the RFC 7748 method.

Please reply to curdle@ietf.org with your opinions.

        Thank you,
        -- Mark

------=_NextPart_000_0099_01D2C9D7.CB6F8240
Content-Type: text/html;
	charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<HTML><HEAD></HEAD>
<BODY dir=3Dltr>
<DIV dir=3Dltr>
<DIV style=3D"FONT-SIZE: 10pt; FONT-FAMILY: 'Arial'; COLOR: #000000">
<DIV>Hey Mark!</DIV>
<DIV>&nbsp;</DIV>
<DIV>For curve448-sha512, I have no objections for either choice of =
encoding.=20
What=E2=80=99s more important than the choice of encoding is that there =
isn=E2=80=99t doubt=20
about the choice of encoding.</DIV>
<DIV>&nbsp;</DIV>
<DIV>That being said, I agree it may be slightly preferable to use =
signed mpint,=20
given that this would be consistent with all other SSH key exchange =
methods,=20
including Curve25519, and it would be weird for Curve448 to depart from=20
this.</DIV>
<DIV>&nbsp;</DIV>
<DIV>denis</DIV>
<DIV>&nbsp;</DIV>
<DIV=20
style=3D'FONT-SIZE: small; TEXT-DECORATION: none; FONT-FAMILY: =
"Calibri"; FONT-WEIGHT: normal; COLOR: #000000; FONT-STYLE: normal; =
DISPLAY: inline'>
<DIV style=3D"FONT: 10pt tahoma">
<DIV>&nbsp;</DIV>
<DIV style=3D"BACKGROUND: #f5f5f5">
<DIV style=3D"font-color: black"><B>From:</B> <A title=3Dmdb@juniper.net =

href=3D"mailto:mdb@juniper.net">Mark D. Baushke</A> </DIV>
<DIV><B>Sent:</B> Wednesday, May 10, 2017 19:39</DIV>
<DIV><B>To:</B> <A title=3Dietf-ssh@NetBSD.org=20
href=3D"mailto:ietf-ssh@NetBSD.org">ietf-ssh@NetBSD.org</A> </DIV>
<DIV><B>Subject:</B> ssh-ed25519 implementations</DIV></DIV></DIV>
<DIV>&nbsp;</DIV></DIV>
<DIV=20
style=3D'FONT-SIZE: small; TEXT-DECORATION: none; FONT-FAMILY: =
"Calibri"; FONT-WEIGHT: normal; COLOR: #000000; FONT-STYLE: normal; =
DISPLAY: inline'><BR>[Second=20
attempt. my first attempt got bounced by fraud detection checks<BR>for =
some=20
unknown reason. -- mdb]<BR><BR>Hi,<BR><BR>Eric Rescorla =
&lt;ekr@rtfm.com&gt; has=20
brought to my attention that=20
in<BR>https://tools.ietf.org/html/draft-ietf-curdle-ssh-curves-04 it=20
is<BR>currently specifying the SSH encoding of secrets on the wire using =

the<BR>mpint process as described in section 5 of [RFC4251] while RFC=20
7748<BR>describes using a little-endian format:<BR><BR>&nbsp; GF(2^448 - =
2^224 -=20
1) and are encoded as an array of bytes, u,<BR>&nbsp; in little-endian =
order=20
such that u[0] + 256*u[1] + 256^2*u[2] + ... +<BR><BR>This seems to be =
what is=20
being implemeneted for<BR>curve25519-sha256@libssh.org, so I should =
make<BR>an=20
explicit note of this in the draft.<BR><BR>However, I am unaware of any=20
curve448-sha512 implementations at<BR>present and would like consensus =
that it=20
should also follow the mpint<BR>method rather than the RFC 7748=20
method.<BR><BR>Please reply to curdle@ietf.org with your=20
opinions.<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Thank=20
you,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; --=20
Mark<BR></DIV></DIV></DIV></BODY></HTML>

------=_NextPart_000_0099_01D2C9D7.CB6F8240--


From bounces-ietf-ssh-owner-secsh-tyoxbijeg7-archive=lists.ietf.org@NetBSD.org  Thu May 11 06:37:00 2017
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 2193D12EB99 for <ietfarch-secsh-tyoxbijeg7-archive@ietfa.amsl.com>; Thu, 11 May 2017 06:37:00 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.091
X-Spam-Level:
X-Spam-Status: No, score=-4.091 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] 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 iIN_eYbzTQeN for <ietfarch-secsh-tyoxbijeg7-archive@ietfa.amsl.com>; Thu, 11 May 2017 06:36:53 -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 BCB21129B38 for <secsh-tyoxbijeg7-archive@lists.ietf.org>; Thu, 11 May 2017 06:32:47 -0700 (PDT)
Received: by mail.netbsd.org (Postfix, from userid 605) id 360AF84E01; Thu, 11 May 2017 13:32:46 +0000 (UTC)
Delivered-To: ietf-ssh@NetBSD.org
Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id A6FBC84CF0 for <ietf-ssh@NetBSD.org>; Thu, 11 May 2017 13:32:42 +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 yl9vqagihNu3 for <ietf-ssh@netbsd.org>; Thu, 11 May 2017 13:32:41 +0000 (UTC)
Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on072e.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe40::72e]) by mail.netbsd.org (Postfix) with ESMTP id C72D084CE1 for <ietf-ssh@NetBSD.org>; Thu, 11 May 2017 13:32:39 +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=YsdaRhjQmrIqlMXY0GDgL4JY6kJys4f7RE+xoRuExIM=; b=KcUSuhmiBEB3iCYZv3oM1BKw7b1byP1KUidy7f+1qNwMdvCz/LRuOLzp6Z9jquuOnHt2ro4HR5nvDP+VS0ib29jhrZE2S00nbnoAAjhruFs0w6xda5l/G9Jph0QXVp/cJdMAIiOUm8IwuZjBTWkTNymupYClbEhH/vLhfqQJhRk=
Received: from CY1PR05CA0004.namprd05.prod.outlook.com (10.166.186.142) by CY4PR05MB2902.namprd05.prod.outlook.com (10.169.183.136) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1101.5; Thu, 11 May 2017 13:32:38 +0000
Received: from CO1NAM05FT041.eop-nam05.prod.protection.outlook.com (2a01:111:f400:7e50::205) by CY1PR05CA0004.outlook.office365.com (2a01:111:e400:c5a4::14) 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; Thu, 11 May 2017 13:32:38 +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 CO1NAM05FT041.mail.protection.outlook.com (10.152.96.154) 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; Thu, 11 May 2017 13:32:37 +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 06:32:36 -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 v4BDWYq0027592;	Thu, 11 May 2017 06:32:34 -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 7B18411446;	Thu, 11 May 2017 06:32:32 -0700 (PDT)
To: Eric Rescorla <ekr@rtfm.com>, Ron Frederick <ronf@timeheart.net>, "Brian Smith" <brian@briansmith.org>, denis bider <denisbider.ietf@gmail.com>, Simon Tatham <anakin@pobox.com>
CC: "ietf-ssh@NetBSD.org" <ietf-ssh@NetBSD.org>, "curdle@ietf.org" <curdle@ietf.org>
Subject: Re: ssh-ed25519 implementations 
In-Reply-To: <CABcZeBNYUV=-azoZzZjnNtCEu3K0A-THHN2mt02V65oihbbrXw@mail.gmail.com> 
References: <76FD0F39-1F3D-4476-A3D8-D4C942C2EFD1@juniper.net> <CABcZeBNYUV=-azoZzZjnNtCEu3K0A-THHN2mt02V65oihbbrXw@mail.gmail.com>
Comments: In-reply-to: Eric Rescorla <ekr@rtfm.com> message dated "Wed, 10 May 2017 09:20:37 -0700."
From: "Mark D. Baushke" <mdb@juniper.net>
Date: Thu, 11 May 2017 06:32:32 -0700
Message-ID: <36528.1494509552@eng-mail01.juniper.net>
MIME-Version: 1.0
Content-Type: text/plain
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)(39400400002)(39840400002)(39450400003)(39410400002)(39860400002)(39850400002)(2980300002)(189002)(199003)(51444003)(9170700003)(2950100002)(76506005)(53416004)(47776003)(105596002)(54906002)(50986999)(229853002)(55016002)(6306002)(8656002)(86362001)(53936002)(77096006)(76176999)(7846003)(6392003)(54356999)(478600001)(305945005)(7696004)(2906002)(2810700001)(106466001)(6266002)(48376002)(6246003)(189998001)(38730400002)(4326008)(356003)(117636001)(7126002)(5003940100001)(8936002)(8676002)(5660300001)(81166006)(50466002)(39060400002)(42262002);DIR:OUT;SFP:1102;SCL:1;SRVR:CY4PR05MB2902;H:p-emfe01a-sac.jnpr.net;FPR:;SPF:SoftFail;MLV:ovrnspm;MX:1;A:1;PTR:InfoDomainNonexistent;LANG:en;
X-Microsoft-Exchange-Diagnostics: 1;CO1NAM05FT041;1:FGKJDnZDyhO1hivfO28qCfuGxdQsq52sE1pCKhC/1XWgY5lgu12kjsrX060awP4btp0NeUp8RDKAX2mxoBaAfpG3vRUQOFhGsCFdSEnxZf64WYB5yvUxrwagc8H966Ij6HGdLVwYPxsgnStt0OD+G2EG6wyqLAXoIqGxma9KlMTD9/0H841ka86LC2Rtw1UEVK2eRA0tv7OsbCe8acNWB/R2nF5F0pn3XZdXkmO6QgrZn5sOPX1f964BhwS3d+czfaEXvRAf3m48O1e4I56LHkMSqtxAPG+zkncUYPHvJQD2BknpxXfOCTll+eAZW7aZv0XxXR6pgimTEMBhR6DWhUz1BcfycD+U4ocCc4E620m1dtyqlvekxRNpA84n307Uz98Z7hkIJWoDduATQD3RB04kD66RjH/ci6yriJr9tM8Cyo5P6PMN5LaYV6BZsBX7/vqk46ATperH/OCZBxokZjlG5GEODt3KWx1OTiLNVIiMYVOa6M636lmz1cJJmnkAAR3FDEmeUrfB7ggrZHZXw9ds7iHrFYx4d7NQssqHL+XxXEUsm4box9kV0PhE3bBJXMV4ylXicFkapwX2Q6r98pxkncz40bUpMPlZ9vXHZ99tN/5G3/D4wI+4CZsabHKL
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: CY4PR05MB2902:
X-MS-Office365-Filtering-Correlation-Id: 148a9d25-8ac7-49d7-f682-08d4987230ea
X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(2017030254075)(201703131423075)(201703031133081);SRVR:CY4PR05MB2902;
X-Microsoft-Exchange-Diagnostics: 1;CY4PR05MB2902;3:iEWZlOm3JpaZfv9rZQRMNKEJofLMVr6LoV3x5MP3YzNA3MyzM3c5+o1CW0au+GjE/94xSH2fu1NtjYuJXaA4dpuBPfruEdL5SmtZWcJ0ZHuFdbijkP4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GfrlqBc6WBJw7UdARWWWk7Ov8nyg9H4vZvObi30PVxgdPrMO/n7Qb36IJd/YzAdjcXrYIp5KSJ82lsa1ddwf1+w==
X-Microsoft-Exchange-Diagnostics: 1;CY4PR05MB2902;20:3Paz/HG+0uoOOafyG3sP+2ZZDdmRd1SOg+BtsI2rzldaU0z37hT1NC0W6AD914nYGAKUk1ivY6a3fqNKpZDh3pPwGuIGNw5ArPPEJ+alSAp9oKGPYJQPpof5xRWA4rCy7XlZbQYeDM0MF5CKV+TBSwKrn31r9F2/cqZ4UFyHbOW3D0bfrQldHr1d6GdtSJIVtmUcFF2D/9+TMXJwl0Jttx23bL6HB2HkBkN7T6U/BiRaekJW8kZA4sYVR3iHgi490Rj9M6eHzRUYHbZT/xXSmaSpHZxxER4Xnpi9ngXL4M8qHF90dPlMAJZ2QMqmuqB40S8lnKbJk5my2X+N10pmBL80LR+lUgWKs/T8sVJxxWMiCdt9SlQZHFZIpDKeWHR8c0imgArrgwsAY3tjH7vQJHCBd/lZiKrrmaYjWkLHpgpLHd1erkLH4ObYipateUBYes9Qcobod2Z2Ezum79ost6HAwnqN4xufXbzI//0bdAAYStLNHzzVPNzGnU/Visb3
X-Microsoft-Antispam-PRVS: <CY4PR05MB2902095FF26E7F98B2D7649ABFED0@CY4PR05MB2902.namprd05.prod.outlook.com>
X-Exchange-Antispam-Report-Test: UriScan:;
X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700036)(100105000095)(100000701036)(100105300095)(100000702036)(100105100095)(6040450)(601004)(2401047)(13024025)(13018025)(13023025)(13017025)(13015025)(8121501046)(5005006)(3002001)(10201501046)(100000703036)(100105400095)(93006095)(93003095)(6055026)(6041248)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123555025)(20161123558100)(20161123562025)(6072148)(100000704036)(100105200095)(100000705036)(100105500095);SRVR:CY4PR05MB2902;BCL:0;PCL:0;RULEID:(100000800036)(100110000095)(100000801036)(100110300095)(100000802036)(100110100095)(100000803036)(100110400095)(100000804036)(100110200095)(100000805036)(100110500095);SRVR:CY4PR05MB2902;
X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;CY4PR05MB2902;4:8zsfbIy2kV29uGrLWHiKW4xNYZSlPsg5q5C/a/83WD?= =?us-ascii?Q?nEuRE1iv5NUzywQUQDvCtQWkOCoes5HTYhqtQ73OuUs5cBTn5t3GhepmU2Ur?= =?us-ascii?Q?T+uIPhepVWlapBdnjclvX8s4CguyqxcCyK0t5Y1xfhoKR+zGHQQPW271dcVK?= =?us-ascii?Q?vF3JpFvUC/WjDT8oFqeFfV2He+YostSWzXFGh6fyXXAvyAw9v2jLSVd8Tnyp?= =?us-ascii?Q?B/5hTTIVuygiVWQ/1wOSNIS1JzPwDvaWeNrW6gnaCQtd1c9V6XXqP+HuGIG0?= =?us-ascii?Q?DamaU5LskI5fTg+ukrlG8wt/ySNx6eXr1IRtYTKaVA3THK0/YEHL+KPGDV9L?= =?us-ascii?Q?jP1oJbqEWOuLFBM28kFbjrZaf8N2KEkHey6RC8nxeZ1uIwmEJTpKyb16eeOB?= =?us-ascii?Q?JtfAUkvEkpjedQjbebunARs0x/c4nv8HJ3eShFbYYzZjeAuCJoaINPaNVCLv?= =?us-ascii?Q?BegKQB7HADO6IcRrEreX93IIFU30t6t0Cv9uk9gluEA58LoHoOpuaxcmOS4e?= =?us-ascii?Q?+hveZKeXS74yZCfoYMPMZnBXYR+6lEc/ib3VQOERy16aCrpWAHpIo1VcHIoP?= =?us-ascii?Q?5d6RqEekrLnO5wzYZ+8KUnIDFNd/SLsr3BaLO1JXAjLFYJNC282Tba7jiZvg?= =?us-ascii?Q?T/v34CsigZXO2YXfHRh7De8WHGG5Blk50Qop5/UAUcgvU5YF0dPVJtRJid9e?= =?us-ascii?Q?ddS4EPQ9deJ/4AU4QhVgIUQ9uGYsVQTjt596oUmsieZxjOzyfEfFRH9WSDUB?= =?us-ascii?Q?0RZ7H9Zx2Z4XmT34S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QOAAFYKfCM77Yf/5wyJVPUK5B+qwzTTQTEEAFtk3/hYPeQrti1qAdwQRqDGT7gKhqeOCcB+6mHJOSZHTLli3MO93YxBJVu0r8zOG5a+eh4ZD2jbUY/TudPCgRP+suea1eQWBh2AjhV9IaZkw8b8/KDa9W0+SjGGuI0ffftHq82g38Krq3pWDCmgz6OM3VKfdCdCcigbCloSAMONtBvL8yXNWObiDDazBHdreupRFBAo;24:/s3ZbLTL77k/VwrWzMBh1osWH1qBkUUX/OcPa8AffxtUAOpSG13UME5L3qVI4hGYma8a8XCw+XGequPnNHbxbyXAr803qFDB3BbM5pPKd1g=
SpamDiagnosticOutput: 1:99
SpamDiagnosticMetadata: NSPM
X-Microsoft-Exchange-Diagnostics: 1;CY4PR05MB2902;7:ke5I83yxoOQ0r//GkpktxacsmJDlBS86M/daTp5ZvQKDKvrmPACcprQAI0vL+6ozJKaXT44X6e3ecJ3SS6HXwZ+dPAibhEOzkfgbKm2dLAAA2lfSLJLB1tvMVcKxEQhmoC4YSDD/n68vzGjJkZmFeq7JExMXgxRmWhjxY0MJciUsQBdghDn7xRh3JihQn1+/8pOQBYRjaWsKjtt0lPD1YD2Tg0LVjpEDAsb/cBqpcEwgtmetKn+pL1nUX0S/ermXiAsQPiEhYleF+DMaNrrOUx5L8Y+25Y3K32TKyhcGgkOlUJiWtZLe7LEkTKsqM09uxFAKQWU9/H0vPRl6+6uo7w==
X-OriginatorOrg: juniper.net
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 May 2017 13:32:37.7839 (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: CY4PR05MB2902
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 Eric & Ron & Brian & Simon,

Given input from folks so far, I think it would be better if both
Curve25519 and Curve448 continued to use the "mpint" format for K when
generating a hash even though this is not what RFC7748 suggests.

Would it make sense to include the following text to the end of section
2.1 of https://tools.ietf.org/html/draft-ietf-curdle-ssh-curves-04 ?

    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]. 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.

to help clarify the differences between RFC7748 and what is happening in
SSH?

Much of this text is borrowed from what Ron Frederick has written to me,
any remaining confusion is my fault.

I think that the above text should help clear up the confusion that Eric
noted in this section of code.

If there are no problems with this text, I will release the -05 draft
with it.

	Thank you,
	-- Mark

From bounces-ietf-ssh-owner-secsh-tyoxbijeg7-archive=lists.ietf.org@NetBSD.org  Thu May 11 07:46:15 2017
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 CC9B9130141 for <ietfarch-secsh-tyoxbijeg7-archive@ietfa.amsl.com>; Thu, 11 May 2017 07:46:15 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.091
X-Spam-Level:
X-Spam-Status: No, score=-4.091 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] 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 9i9oTBdJehPg for <ietfarch-secsh-tyoxbijeg7-archive@ietfa.amsl.com>; Thu, 11 May 2017 07:46:14 -0700 (PDT)
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200]) (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 405B113145C for <secsh-tyoxbijeg7-archive@lists.ietf.org>; Thu, 11 May 2017 07:39:29 -0700 (PDT)
Received: by mail.netbsd.org (Postfix, from userid 605) id C953684D95; Thu, 11 May 2017 14:39:27 +0000 (UTC)
Delivered-To: ietf-ssh@NetBSD.org
Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 12BA884D7F for <ietf-ssh@NetBSD.org>; Thu, 11 May 2017 14:39:25 +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 ([127.0.0.1]) by localhost (mail.netbsd.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id w6qB4qeZkK1k for <ietf-ssh@netbsd.org>; Thu, 11 May 2017 14:39:24 +0000 (UTC)
Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on071f.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe49::71f]) by mail.netbsd.org (Postfix) with ESMTP id 5569984CF0 for <ietf-ssh@NetBSD.org>; Thu, 11 May 2017 14:39:22 +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=//2uhS/xEAJNL5YxufE+luly9MaUNcnKjxgcQMD6gmo=; b=jZZPxAz4opSlUmtdFO8IgcU7KCB86Upx8obBDNLBmEYdOLBM9kUnMhvkduOBgjq+QhGOoYlK39eVgBH0cCqvpGhoAPvVipgtmquTYpaAji84FcpKeiQHs7aQil5vxNQLtewB+lPHlNibkfzaNi8VIfpFbD+gXCNfQilLGsX87t0=
Received: from DM5PR05CA0013.namprd05.prod.outlook.com (10.173.226.23) by BLUPR05MB259.namprd05.prod.outlook.com (10.141.22.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1084.7; Thu, 11 May 2017 14:39:20 +0000
Received: from BY2NAM05FT034.eop-nam05.prod.protection.outlook.com (2a01:111:f400:7e52::208) by DM5PR05CA0013.outlook.office365.com (2603:10b6:3:d4::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; Thu, 11 May 2017 14:39:20 +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 BY2NAM05FT034.mail.protection.outlook.com (10.152.100.171) 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; Thu, 11 May 2017 14:39:19 +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 07:39:12 -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 v4BEdBr6007206;	Thu, 11 May 2017 07:39:11 -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 3A22111446;	Thu, 11 May 2017 07:39:11 -0700 (PDT)
To: =?UTF-8?Q?Stefan_B=c3=bchler?= <ietf-curdle@stbuehler.de>
CC: "curdle@ietf.org" <curdle@ietf.org>, "ietf-ssh@NetBSD.org" <ietf-ssh@NetBSD.org>
Subject: Re: [Curdle] ssh-ed25519 implementations 
In-Reply-To: <76604306-d93a-5156-2350-636d3bda2323@stbuehler.de> 
References: <76FD0F39-1F3D-4476-A3D8-D4C942C2EFD1@juniper.net> <76604306-d93a-5156-2350-636d3bda2323@stbuehler.de>
Comments: In-reply-to: =?UTF-8?Q?Stefan_B=c3=bchler?= <ietf-curdle@stbuehler.de> message dated "Thu, 11 May 2017 15:15:31 +0200."
From: "Mark D. Baushke" <mdb@juniper.net>
Date: Thu, 11 May 2017 07:39:11 -0700
Message-ID: <47874.1494513551@eng-mail01.juniper.net>
MIME-Version: 1.0
Content-Type: text/plain
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)(39410400002)(39850400002)(39400400002)(39860400002)(39840400002)(39450400003)(2980300002)(199003)(189002)(9170700003)(54906002)(6392003)(7846003)(8936002)(356003)(2950100002)(6916009)(2906002)(55016002)(38730400002)(189998001)(478600001)(53936002)(305945005)(6266002)(2810700001)(6246003)(7126002)(50466002)(110136004)(47776003)(48376002)(8676002)(86362001)(229853002)(54356999)(5660300001)(81166006)(106466001)(76506005)(105596002)(77096006)(117636001)(7696004)(53416004)(4326008)(5003940100001)(50986999)(76176999)(42262002);DIR:OUT;SFP:1102;SCL:1;SRVR:BLUPR05MB259;H:p-emfe01a-sac.jnpr.net;FPR:;SPF:SoftFail;MLV:sfv;A:1;MX:1;LANG:en;
X-Microsoft-Exchange-Diagnostics: 1;BY2NAM05FT034;1:P4f9gpv4p7xtAAiTWGlOumrMKp65F9Iv6BOqfPvY38Yh9HKNyCDA0KklHoxKnBYh1/xeqc0fq0E+6bC8/DM40epPWdlqjSIYQjMQoDaWp7MfuN71wPjq/5EvFpbzoUIiz3BZOR72bWP7MtFY4rzglWB30twukC/YKJTFZYVOAu0jBYZsA3izde64L+BxSWc3Bx4+6RQnlVQtHCy2EhihEunDK6YkW7Kg/Z3KW8GUqUhW3S3zGpEp0XQKzPBGf+cmC8eGvfLkPo3fTrRuZIxv/5xrTxdyJNDVXCYmIqGQw+XXcDZP7igfQvjLho0zGXJ+b3Kn07VtLbF4UpicTDaqMyBv6PeCAYTOvGEMI/gQgabVvLa78EPnt2ah2MA6NJZu/i2O8NJ43xLt676kC8os6wY1K2H3zzQ9lGSmFnquO8cduTsnhjc1mnZpzcdl9KpHM0EN5Uh1GR24L1Q8qElmKkn3Z+fwUtK3nug/bLpV9iKMpXRBlNPhUjVW52e10PSZO2KQrjTuTLnyIOflz+8Ep9cFweAOa41iDDtQVb4mAGy7ULJOjPlGRBZL42ZRjqH16ZpqPGMzjYZYBAr8Uu+YVu6LS7FuIxs+M+ItEWm9aD0=
X-MS-PublicTrafficType: Email
X-MS-Office365-Filtering-Correlation-Id: 54dced12-f4e8-40dc-626f-08d4987b8219
X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(2017030254075)(201703131423075)(201703031133081);SRVR:BLUPR05MB259;
X-Microsoft-Exchange-Diagnostics: 1;BLUPR05MB259;3:OttlBNbKMGaSwohwJjSSMrSwQdPykTpLSf2Ypd2oXUa/cfRKMeS7hRuWN5TWQ8Ud/xqqcU++uIm9wcdNGeTY+gWhg3JJQgHlt9Yj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qRxvzS4ojfB1e/yWFDxUH7YiKTtZcPlrBUai6zYcU4wLdvVtSxdK8fnC2cdK78J7k7d8hfa9B
X-Microsoft-Exchange-Diagnostics: 1;BLUPR05MB259;20:TYqb/r+9EX7ISkqc5dI3AiF8ML3KTyCO3EaDPXopRZe7RikKsd5ayislizW0aBxUxFbbmULppEpVXPDm56xDYFWJWYB+5uVXg8+u/WI2oxDsWwROfhbIE+Cca4MbAaG1maIWhNjQlu1lQsHV40FydlAYGeiL0bqgDYTGugJiNA4qC/cphm9rS/XWcZ1kALu4IIsaeNnXjnS/jRTilxEF+IVrne5ipdSA2KLbVHE/5Lj7JTWPLSJ00ka24ZgxSAeeG269eg+bh/tEuNEuc/q6PeMPwYmU9U0QdLXqfRrNot/VczirBcxjZcZNmYBrtQvZtc8tnVbP3wF7Nr1tfW2Y/y3ZuVL0Zf8qqogkSNnsTsVsa7flqpCpmhJXz2qMxKNjoRGFcta5vKlhi7ndn6A+9J5BDEeFEBZrOyxGGidvmJMPLaRW1DVWtm9XF5IfzLSLta86wfJoXTiOqPu2stR/s7wnPb+M68f/GvbMbt3FMrF+PqWtr8J2Y01gqzlyBT65
X-Microsoft-Antispam-PRVS: <BLUPR05MB259A108BC497E6A6E79070EBFED0@BLUPR05MB259.namprd05.prod.outlook.com>
X-Exchange-Antispam-Report-Test: UriScan:;
X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040450)(601004)(2401047)(13018025)(5005006)(8121501046)(13015025)(13017025)(13024025)(13023025)(10201501046)(93006095)(93003095)(3002001)(6055026)(6041248)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123562025)(20161123564025)(20161123558100)(6072148);SRVR:BLUPR05MB259;BCL:0;PCL:0;RULEID:;SRVR:BLUPR05MB259;
X-Microsoft-Exchange-Diagnostics: 1;BLUPR05MB259;4:WBBjfVlul+MCBZK4RmaGCtw2IQnjtxP/gz4nlG09WqSsxyD3HgEeZfs0Qo0d32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55HI5lw==;24:1Qgz7qOg43nuUrJRuzMFO4qVflagGp4HQjBE5qj+6y6fHovqVPb8/wQMmyh17dIL9/4tNZgze233fyO8tZ67ddKfXLchaEZXB7h+OPTZsvY=
SpamDiagnosticOutput: 1:99
SpamDiagnosticMetadata: NSPM
X-Microsoft-Exchange-Diagnostics: 1;BLUPR05MB259;7:prX8bieCj0JgPMJdHOYFmsU3te3Gf1IdgYYcpc1G06AFFKYhbkR3aCnSLpujQA4EYtXaz+cr2rO3yns2M7IRDaEgd7RLQqhUan3OuMqDiIZ6icTzORU78zKgQxRJUCRUED5BOiSTOfSzRFdufZInzgxDhrY1ddMAKlHgjBXT4ef5AAV/nKdCy75HMPdKuTI6uJmWRtVPXsvVpCYd7Lm+IODRkz6EJMrm2qzjLgoFCMoT3TTaF1SYPJOgsIhEt761zNMRPfZfzu8nYAitUoq85DTcpC1OguGQtkWjOqRCbma6uNEUUz18hu90Grl8AAnrDY/wA7Y7fnqFKj/HG5GUfQ==
X-OriginatorOrg: juniper.net
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 May 2017 14:39:19.4941 (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: BLUPR05MB259
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 Setphan,

I think I will use this text...

    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:

        Trim all leading zero-bytes of X. If X is all zero-bytes,
	then the key exchange must fail.

        If the high bit of X is set, the mpint format requires
	a zero byte to be prepended.

        The length of the encoded K may not be the same as the
	original length of X due to trimming or prepending a
	zero-byte as needed for "mpint" format.

I will also add your suggested pseudo code.

	Thank you,
	-- Mark

From bounces-ietf-ssh-owner-secsh-tyoxbijeg7-archive=lists.ietf.org@NetBSD.org  Thu May 11 08:56:54 2017
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 D0566131491 for <ietfarch-secsh-tyoxbijeg7-archive@ietfa.amsl.com>; Thu, 11 May 2017 08:56:54 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.201
X-Spam-Level:
X-Spam-Status: No, score=-4.201 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.001, RCVD_IN_DNSWL_MED=-2.3, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
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 0KFRtd82yPqp for <ietfarch-secsh-tyoxbijeg7-archive@ietfa.amsl.com>; Thu, 11 May 2017 08:56:52 -0700 (PDT)
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200]) (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 A03A61314A4 for <secsh-tyoxbijeg7-archive@lists.ietf.org>; Thu, 11 May 2017 08:50:31 -0700 (PDT)
Received: by mail.netbsd.org (Postfix, from userid 605) id 5B5908557D; Thu, 11 May 2017 15:50:30 +0000 (UTC)
Delivered-To: ietf-ssh@NetBSD.org
Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 5786085576 for <ietf-ssh@NetBSD.org>; Thu, 11 May 2017 15:50:27 +0000 (UTC)
X-Virus-Scanned: amavisd-new at netbsd.org
Received: from mail.netbsd.org ([127.0.0.1]) by localhost (mail.netbsd.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id C7LFXKq9YF05 for <ietf-ssh@netbsd.org>; Thu, 11 May 2017 15:50:26 +0000 (UTC)
Received: from usplmg20.ericsson.net (usplmg20.ericsson.net [198.24.6.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.netbsd.org (Postfix) with ESMTPS id 97D2C84CE1 for <ietf-ssh@NetBSD.org>; Thu, 11 May 2017 15:50:26 +0000 (UTC)
X-AuditID: c618062d-481ff70000000cf0-1e-591482dd3f80
Received: from EUSAAHC004.ericsson.se (Unknown_Domain [147.117.188.84]) by usplmg20.ericsson.net (Symantec Mail Security) with SMTP id 1C.D3.03312.DD284195; Thu, 11 May 2017 17:27:28 +0200 (CEST)
Received: from EUSAAMB107.ericsson.se ([147.117.188.124]) by EUSAAHC004.ericsson.se ([147.117.188.84]) with mapi id 14.03.0319.002; Thu, 11 May 2017 10:05:16 -0400
From: Daniel Migault <daniel.migault@ericsson.com>
To: "Mark D. Baushke" <mdb@juniper.net>, Eric Rescorla <ekr@rtfm.com>, "Ron Frederick" <ronf@timeheart.net>, Brian Smith <brian@briansmith.org>, "denis bider" <denisbider.ietf@gmail.com>, Simon Tatham <anakin@pobox.com>
CC: "ietf-ssh@NetBSD.org" <ietf-ssh@NetBSD.org>, "curdle@ietf.org" <curdle@ietf.org>
Subject: RE: ssh-ed25519 implementations 
Thread-Topic: ssh-ed25519 implementations 
Thread-Index: AQHSylsYe0kaNRFXjUKb2lX66nDkWqHvIbRQ
Date: Thu, 11 May 2017 14:05:15 +0000
Message-ID: <2DD56D786E600F45AC6BDE7DA4E8A8C118BDA5B0@eusaamb107.ericsson.se>
References: <76FD0F39-1F3D-4476-A3D8-D4C942C2EFD1@juniper.net> <CABcZeBNYUV=-azoZzZjnNtCEu3K0A-THHN2mt02V65oihbbrXw@mail.gmail.com> <36528.1494509552@eng-mail01.juniper.net>
In-Reply-To: <36528.1494509552@eng-mail01.juniper.net>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [147.117.188.9]
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrFIsWRmVeSWpSXmKPExsUyuXRPiO6DJpFIg2mt1hY/mlazW1yZeojZ YuvCWcwWx8/NZbZY8focu8WHe4/ZLLruXGezWLX5H7sDh8e+hsOsHjtn3WX3WLLkJ5PH9aar 7B4LH/Ywely8pOwx+XEbs8ftdxeZAjiiuGxSUnMyy1KL9O0SuDJm3pvCWHCLr+L7rQ2sDYyP ubsYOTkkBEwk7l3cx9rFyMUhJHCUUWJz0zsmCGc5o8ScrrmsIFVsAkYSbYf62UFsEYH7jBKN XyO7GDk4mAXCJJr36IKEhQU0Je59fcEMEhYR0JKYe8ARohqos/cOWCeLgKrE1IXTWEBsXgFf ie0H9rFDrNrIKPHl2y42kASngJlE74HDYGsZBcQkvp9awwRiMwuIS9x6Mp8J4mgBiSV7zjND 2KISLx//Y4WwFSX29U9nh6jXkViw+xMbhK0tsWzha2aIxYISJ2c+YZnAKDoLydhZSFpmIWmZ haRlASPLKkaO0uKCnNx0I4NNjMAYPCbBpruD8f50z0OMAhyMSjy8D2SEI4VYE8uKK3MPMUpw MCuJ8GplikQK8aYkVlalFuXHF5XmpBYfYpTmYFES551w/kKEkEB6YklqdmpqQWoRTJaJg1Oq gdFDJy1+7td1R5yPvJmw9MOED0zyYmubtD9FNwrtD5t/a6lWTnjJ0sOXVkzKtrsg1nPv2h/n jE1MoglHdVZ/kLv675eS4f4n3MePiN4UrjOV5zmWt+GcukO/7emH14zMNUo6eKpC7KrKLLd+ zWv21I3cJH3kg65K8/Lz9md/fvh7YsL1qN6pf4qUWIozEg21mIuKEwGB1baKvQIAAA==
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>

I believe it is nicer to have Curve25519 and Curve448 should be coherent.  =
The text is clarifying.

-----Original Message-----
From: ietf-ssh-owner@NetBSD.org [mailto:ietf-ssh-owner@NetBSD.org] On Behal=
f Of Mark D. Baushke
Sent: Thursday, May 11, 2017 9:33 AM
To: Eric Rescorla <ekr@rtfm.com>; Ron Frederick <ronf@timeheart.net>; Brian=
 Smith <brian@briansmith.org>; denis bider <denisbider.ietf@gmail.com>; Sim=
on Tatham <anakin@pobox.com>
Cc: ietf-ssh@NetBSD.org; curdle@ietf.org
Subject: Re: ssh-ed25519 implementations=20


Hi Eric & Ron & Brian & Simon,

Given input from folks so far, I think it would be better if both
Curve25519 and Curve448 continued to use the "mpint" format for K when gene=
rating a hash even though this is not what RFC7748 suggests.

Would it make sense to include the following text to the end of section
2.1 of https://tools.ietf.org/html/draft-ietf-curdle-ssh-curves-04 ?

    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]. 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.

to help clarify the differences between RFC7748 and what is happening in SS=
H?

Much of this text is borrowed from what Ron Frederick has written to me, an=
y remaining confusion is my fault.

I think that the above text should help clear up the confusion that Eric no=
ted in this section of code.

If there are no problems with this text, I will release the -05 draft with =
it.

	Thank you,
	-- Mark

From bounces-ietf-ssh-owner-secsh-tyoxbijeg7-archive=lists.ietf.org@NetBSD.org  Thu May 11 23:38:03 2017
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 7A7691294C4 for <ietfarch-secsh-tyoxbijeg7-archive@ietfa.amsl.com>; Thu, 11 May 2017 23:38:03 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.29
X-Spam-Level:
X-Spam-Status: No, score=-3.29 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_ADSP_ALL=0.8, 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=unavailable autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=fail (1024-bit key) reason="fail (body has been altered)" header.d=stbuehler.de
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 9ptADv_cLDOX for <ietfarch-secsh-tyoxbijeg7-archive@ietfa.amsl.com>; Thu, 11 May 2017 23:38:02 -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 BBEBA12EAB8 for <secsh-tyoxbijeg7-archive@lists.ietf.org>; Thu, 11 May 2017 23:33:36 -0700 (PDT)
Received: by mail.netbsd.org (Postfix, from userid 605) id B0F8185595; Fri, 12 May 2017 06:33:35 +0000 (UTC)
Delivered-To: ietf-ssh@netbsd.org
Received: by mail.netbsd.org (Postfix, from userid 1347) id 66E5C85589; Fri, 12 May 2017 06:33:35 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 74CFD84CF0 for <ietf-ssh@NetBSD.org>; Thu, 11 May 2017 13:15:43 +0000 (UTC)
X-Virus-Scanned: amavisd-new at netbsd.org
Authentication-Results: mail.netbsd.org (amavisd-new); dkim=pass (1024-bit key) header.d=stbuehler.de
Received: from mail.netbsd.org ([IPv6:::1]) by localhost (mail.netbsd.org [IPv6:::1]) (amavisd-new, port 10025) with ESMTP id 2qflE7Nueu7I for <ietf-ssh@netbsd.org>; Thu, 11 May 2017 13:15:42 +0000 (UTC)
Received: from mail.stbuehler.de (stbuehler.de [IPv6:2a01:4f8:a0:2276::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.netbsd.org (Postfix) with ESMTPS id 7482484CEE for <ietf-ssh@NetBSD.org>; Thu, 11 May 2017 13:15:42 +0000 (UTC)
Received: from [IPv6:2001:7c0:2049:1d4:14b7:34a8:44f4:149e] (unknown [IPv6:2001:7c0:2049:1d4:14b7:34a8:44f4:149e]) by mail.stbuehler.de (Postfix) with ESMTPSA id 24CBDB80135; Thu, 11 May 2017 13:15:32 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=stbuehler.de; s=stbuehler1; t=1494508532; bh=pV8vDy1x/7V/upmia59nR6e2khWUxXG9C5wAmE7kQLw=; h=Subject:References:From:To:Cc:Date:In-Reply-To:From; b=eFBnPchq59deaL06NLrDr35TjvbzKxjTxULaiQjZggxWDgPvS3VlOEON6T4Ar3UuY xf12X1vQGlgtcuuIsNkId/uLxoumwuxWwRr2Du+uQjoP+M8lvPiW5dv8QpZmt9kiIO bcLJxk5oU/nomgTob9Se5y81PCgPBc/+m4navYDE=
Subject: Re: [Curdle] ssh-ed25519 implementations
References: <76FD0F39-1F3D-4476-A3D8-D4C942C2EFD1@juniper.net>
From: =?UTF-8?Q?Stefan_B=c3=bchler?= <ietf-curdle@stbuehler.de>
To: "curdle@ietf.org" <curdle@ietf.org>
Cc: "ietf-ssh@NetBSD.org" <ietf-ssh@NetBSD.org>
Message-ID: <76604306-d93a-5156-2350-636d3bda2323@stbuehler.de>
Date: Thu, 11 May 2017 15:15:31 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
MIME-Version: 1.0
In-Reply-To: <76FD0F39-1F3D-4476-A3D8-D4C942C2EFD1@juniper.net>
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: 8bit
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,

On 05/10/2017 06:18 PM, Mark Baushke wrote:
> Hi,
> 
> Eric Rescorla <ekr@rtfm.com> has brought to my attention that in
> https://tools.ietf.org/html/draft-ietf-curdle-ssh-curves-04 it is
> currently specifying the SSH encoding of secrets on the wire using the
> mpint process as described in section 5 of [RFC4251] while RFC 7748
> describes using a little-endian format:
> 
>   GF(2^448 - 2^224 - 1) and are encoded as an array of bytes, u,
>   in little-endian order such that u[0] + 256*u[1] + 256^2*u[2] + ... +
> 
> This seems to be what is being implemeneted for
> curve25519-sha256@libssh.org, so I should make
> an explicit note of this in the draft.

While we are on the topic of converting the shared secret bytes X
generated by Curve* to an mpint, I'd like to point out that the
draft-ietf-curdle-ssh-curves-04 is not clear regarding leading zeroes:

>    If X has leading zero bytes, the mpint format requires such bytes
>    to be skipped.  In this case, the length of the encoded K will be
>    smaller.

If X has one leading zero byte, and the highest bit of the second byte
is set, K will be exactly X, not shorter.

Maybe it would be better to describe an algorithm for the conversion, like:

- trim all leading zero bytes
- at least one byte must remain ("Clients and servers MUST fail the key
  exchange if [...], or if the derived shared secret only consists of
  zero bits.")
- if the highest bit of the first byte of the remaining string is set,
  prepend one zero byte

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;

cheers,
Stefan

From bounces-ietf-ssh-owner-secsh-tyoxbijeg7-archive=lists.ietf.org@NetBSD.org  Thu May 11 23:39:02 2017
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 630D7129C06 for <ietfarch-secsh-tyoxbijeg7-archive@ietfa.amsl.com>; Thu, 11 May 2017 23:39:02 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.089
X-Spam-Level:
X-Spam-Status: No, score=-4.089 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=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=timeheart.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 Sbi9gca5kIqd for <ietfarch-secsh-tyoxbijeg7-archive@ietfa.amsl.com>; Thu, 11 May 2017 23:38:58 -0700 (PDT)
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200]) (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 B943B12EB1E for <secsh-tyoxbijeg7-archive@lists.ietf.org>; Thu, 11 May 2017 23:34:26 -0700 (PDT)
Received: by mail.netbsd.org (Postfix, from userid 605) id 417998559E; Fri, 12 May 2017 06:34:26 +0000 (UTC)
Delivered-To: ietf-ssh@netbsd.org
Received: by mail.netbsd.org (Postfix, from userid 1347) id D61F88559D; Fri, 12 May 2017 06:34:25 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 5C09484D9A for <ietf-ssh@netbsd.org>; Fri, 12 May 2017 02:27:36 +0000 (UTC)
X-Virus-Scanned: amavisd-new at netbsd.org
Authentication-Results: mail.netbsd.org (amavisd-new); dkim=pass (1024-bit key) header.d=timeheart.net
Received: from mail.netbsd.org ([127.0.0.1]) by localhost (mail.netbsd.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id zzOGLpc4UpnN for <ietf-ssh@netbsd.org>; Fri, 12 May 2017 02:27:34 +0000 (UTC)
Received: from mail-pf0-x22e.google.com (mail-pf0-x22e.google.com [IPv6:2607:f8b0:400e:c00::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.netbsd.org (Postfix) with ESMTPS id A30BB84DD0 for <ietf-ssh@netbsd.org>; Fri, 12 May 2017 02:27:33 +0000 (UTC)
Received: by mail-pf0-x22e.google.com with SMTP id n23so17721575pfb.2 for <ietf-ssh@netbsd.org>; Thu, 11 May 2017 19:27:33 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=timeheart.net; s=mail; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=ptbK9m7gtynEgdKDlQy+PclvKEzbeRRAQ42uJINpoTU=; b=LBhnnzFTaOw9dVA8R9z0TxkEwhk4gEZAO5/HE7wPY5yYfQz0R0XafBg2JZpoYHiBjG 7MjWFFUfXLfdoQDry4qprgvAwZyYb0A9220SWlNpGQWudgehnhnbKoI2Z9JjQyJpPQH3 uxKKgx4Rr3MyQojvbm1EhO/JsdJUHnVbznKXU=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=ptbK9m7gtynEgdKDlQy+PclvKEzbeRRAQ42uJINpoTU=; b=UUv7/JuThFojMUfL1AZRRlbWjx454DA7mhknb55qXjHti/wcliVbpR3G/1HyAjGF8s XjexeZ4wzGJPq97fB7aKNlFuRoSIiDl8tWQjwRroVLyxo/FWmSlEWkQKQskK6IhxJddh rR6F2DvDw6C3f7WJRM1r1IvE2LAvMviCECG0X3NWx6pumtbj83MkZoIFP/46wepP4f9z aBbaD+ClytmxU2/u4al0OshKyjkYxZUhg7NUQPhLhi46s9j5ny+TJqBCEcEeDceSuxpS zKj8hwyLKnfEQkjZXQR2tbxfP1//MHOKU6MAHvDKdGE0V+PqJglMbE5cmtldBA+XJQCn 9LEA==
X-Gm-Message-State: AODbwcCr8/HzerLiF8hXGokZ793YP039tpJgiLYENGjnvIuTk+g/Gb+w +B5+z8OtYP/8zWA2pA780A==
X-Received: by 10.99.178.11 with SMTP id x11mr1863019pge.68.1494556053230; Thu, 11 May 2017 19:27:33 -0700 (PDT)
Received: from ?IPv6:2601:647:4282:2200:cfa:5497:d692:7eeb? ([2601:647:4282:2200:cfa:5497:d692:7eeb]) by smtp.gmail.com with ESMTPSA id w23sm2155910pfl.133.2017.05.11.19.27.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 May 2017 19:27:32 -0700 (PDT)
From: Ron Frederick <ronf@timeheart.net>
Message-Id: <6047C877-67DE-404F-8FBD-5B2C19D16EA6@timeheart.net>
Content-Type: multipart/alternative; boundary="Apple-Mail=_0C05DEBB-4A4A-4E87-B290-B93427D3E747"
Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\))
Subject: Re: ssh-ed25519 implementations
Date: Thu, 11 May 2017 19:27:30 -0700
In-Reply-To: <36528.1494509552@eng-mail01.juniper.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>
To: "Mark D. Baushke" <mdb@juniper.net>
References: <76FD0F39-1F3D-4476-A3D8-D4C942C2EFD1@juniper.net> <CABcZeBNYUV=-azoZzZjnNtCEu3K0A-THHN2mt02V65oihbbrXw@mail.gmail.com> <36528.1494509552@eng-mail01.juniper.net>
X-Mailer: Apple Mail (2.3273)
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>

--Apple-Mail=_0C05DEBB-4A4A-4E87-B290-B93427D3E747
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=utf-8

Hi Mark,

On May 11, 2017, at 6:32 AM, Mark D. Baushke <mdb@juniper.net> wrote:
> Hi Eric & Ron & Brian & Simon,
>=20
> Given input from folks so far, I think it would be better if both
> Curve25519 and Curve448 continued to use the "mpint" format for K when
> generating a hash even though this is not what RFC7748 suggests.
>=20
> Would it make sense to include the following text to the end of =
section
> 2.1 of https://tools.ietf.org/html/draft-ietf-curdle-ssh-curves-04 ?
>=20
>    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]. 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.
>=20
> to help clarify the differences between RFC7748 and what is happening =
in
> SSH?
>=20
> Much of this text is borrowed from what Ron Frederick has written to =
me,
> any remaining confusion is my fault.
>=20
> I think that the above text should help clear up the confusion that =
Eric
> noted in this section of code.
>=20
> If there are no problems with this text, I will release the -05 draft
> with it.


I just took a look at the updated draft. Here=E2=80=99s a copy of the =
text in section 2.1 and some inline suggestions:

2.1 =
<https://tools.ietf.org/html/draft-ietf-curdle-ssh-curves-05#section-2.1>.=
  Shared Secret Encoding

   The following step differs from [RFC5656 =
<https://tools.ietf.org/html/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 =
<https://tools.ietf.org/html/rfc4253>] as a multiple precision
   integer (mpint).  Curve25519/448 outputs a binary string X, which is

[Ron] RFC 4253 actually says that K is =E2=80=9Cencoded as an mpint=E2=80=9D=
. I=E2=80=99d suggest saying =E2=80=9CThe shared secret, K, is defined =
in [RFC4253] as an integer."

   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 =
<https://tools.ietf.org/html/rfc4251#section-5>
   5 of [RFC4251] <https://tools.ietf.org/html/rfc4251#section-5>.

[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 =E2=80=9Cmpint=E2=80=9D =
conversion, but that=E2=80=99s not the case. 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=E2=80=99s hash function to generate encryption keys. During this =
process, [RFC4253] specifies that K should be encoded as an =E2=80=9Cmpint=
=E2=80=9D 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? I don=E2=80=99t 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.

   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=E2=80=99=
s no mention of this length here.

   Or, as pseudo code:

                 k :=3D x;
                 while (k.length() > 0 && k[0] =3D=3D 0) k =3D k[1:];
                 assert(k.length() > 0);
                 if 0 !=3D (k[0] & 0x80) k =3D '\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=E2=80=99m not sure this =
last paragraph is needed. Alternately, I=E2=80=99d 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. Also, =
=E2=80=9Cfix-length=E2=80=9D here should be =E2=80=9Cfixed-length=E2=80=9D=
. I think it is better to cover this point before diving into the =
details of how the =E2=80=9Cmpint=E2=80=9D conversion is different from =
the original X byte string.
--=20
Ron Frederick
ronf@timeheart.net




--Apple-Mail=_0C05DEBB-4A4A-4E87-B290-B93427D3E747
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=utf-8

<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html =
charset=3Dutf-8"></head><body style=3D"word-wrap: break-word; =
-webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" =
class=3D"">Hi Mark,<div class=3D""><br class=3D""></div><div class=3D"">On=
 May 11, 2017, at 6:32 AM, Mark D. Baushke &lt;<a =
href=3D"mailto:mdb@juniper.net" class=3D"">mdb@juniper.net</a>&gt; =
wrote:<div><blockquote type=3D"cite" class=3D""><div class=3D""><div =
class=3D"">Hi Eric &amp; Ron &amp; Brian &amp; Simon,<br class=3D""><br =
class=3D"">Given input from folks so far, I think it would be better if =
both<br class=3D"">Curve25519 and Curve448 continued to use the "mpint" =
format for K when<br class=3D"">generating a hash even though this is =
not what RFC7748 suggests.<br class=3D""><br class=3D"">Would it make =
sense to include the following text to the end of section<br =
class=3D"">2.1 of <a =
href=3D"https://tools.ietf.org/html/draft-ietf-curdle-ssh-curves-04" =
class=3D"">https://tools.ietf.org/html/draft-ietf-curdle-ssh-curves-04</a>=
 ?<br class=3D""><br class=3D""> &nbsp;&nbsp;&nbsp;When performing the =
X25519 or X448 operations, the integer values<br class=3D""> =
&nbsp;&nbsp;&nbsp;there will be encoded into byte strings by doing a =
fix-length<br class=3D""> &nbsp;&nbsp;&nbsp;unsigned litle-endian =
conversion, per [RFC7748]. It is only later<br class=3D""> =
&nbsp;&nbsp;&nbsp;when these byte strings are then passed to the ECDH =
code in SSH that<br class=3D""> &nbsp;&nbsp;&nbsp;the bytes are =
re-interpreted as a fixed-length unsigned big-endian<br class=3D""> =
&nbsp;&nbsp;&nbsp;integer value K, and then later that K value is =
encoded as a<br class=3D""> &nbsp;&nbsp;&nbsp;variable-length signed =
"mpint" before being fed to the hash<br class=3D""> =
&nbsp;&nbsp;&nbsp;algorithm used for key generation.<br class=3D""><br =
class=3D"">to help clarify the differences between RFC7748 and what is =
happening in<br class=3D"">SSH?<br class=3D""><br class=3D"">Much of =
this text is borrowed from what Ron Frederick has written to me,<br =
class=3D"">any remaining confusion is my fault.<br class=3D""><br =
class=3D"">I think that the above text should help clear up the =
confusion that Eric<br class=3D"">noted in this section of code.<br =
class=3D""><br class=3D"">If there are no problems with this text, I =
will release the -05 draft<br class=3D"">with it.<br =
class=3D""></div></div></blockquote></div><div class=3D""><br =
class=3D""></div>I just took a look at the updated draft. Here=E2=80=99s =
a copy of the text in section 2.1 and some inline suggestions:</div><div =
class=3D""><br class=3D""></div><div class=3D""><pre class=3D"newpage" =
style=3D"font-size: 13.333333015441895px; margin-top: 0px; =
margin-bottom: 0px; break-before: page;"><span class=3D"h3" =
style=3D"line-height: 0pt; display: inline; font-size: 1em; font-weight: =
bold;"><h3 style=3D"line-height: 0pt; display: inline; font-size: 1em;" =
class=3D""><a class=3D"selflink" name=3D"section-2.1" =
href=3D"https://tools.ietf.org/html/draft-ietf-curdle-ssh-curves-05#sectio=
n-2.1" style=3D"color: black; text-decoration: none;">2.1</a>.  Shared =
Secret Encoding</h3></span>

   The following step differs from [<a =
href=3D"https://tools.ietf.org/html/rfc5656" title=3D"&quot;Elliptic =
Curve Algorithm Integration in the Secure Shell Transport Layer&quot;" =
class=3D"">RFC5656</a>], 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 [<a =
href=3D"https://tools.ietf.org/html/rfc4253" title=3D"&quot;The Secure =
Shell (SSH) Transport Layer Protocol&quot;" class=3D"">RFC4253</a>] as a =
multiple precision
   integer (mpint).  Curve25519/448 outputs a binary string X, which is
<br class=3D""></pre><pre class=3D"newpage" style=3D"margin-top: 0px; =
margin-bottom: 0px; break-before: page;"><font face=3D"Helvetica" =
class=3D""><span style=3D"white-space: normal;" class=3D"">[Ron] RFC =
4253 actually says that K is&nbsp;=E2=80=9Cencoded as an&nbsp;mpint=E2=80=9D=
. I=E2=80=99d suggest saying&nbsp;=E2=80=9CThe shared secret, K, is =
defined in [RFC4253] as an integer."</span></font></pre><pre =
class=3D"newpage" style=3D"font-size: 13.333333015441895px; margin-top: =
0px; margin-bottom: 0px; break-before: page;"><br class=3D""></pre><pre =
class=3D"newpage" style=3D"font-size: 13.333333015441895px; margin-top: =
0px; margin-bottom: 0px; break-before: page;">   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 <a =
href=3D"https://tools.ietf.org/html/rfc4251#section-5" =
class=3D"">section</a>
   <a href=3D"https://tools.ietf.org/html/rfc4251#section-5" class=3D"">5 =
of [RFC4251]</a>.</pre><pre class=3D"newpage" style=3D"font-size: =
13.333333015441895px; margin-top: 0px; margin-bottom: 0px; break-before: =
page;"><br class=3D""></pre><pre class=3D"newpage" style=3D"margin-top: =
0px; margin-bottom: 0px; break-before: page;"><pre class=3D"newpage" =
style=3D"margin-top: 0px; margin-bottom: 0px; break-before: page;"><div =
style=3D"font-family: Helvetica; white-space: normal;" class=3D""><pre =
class=3D"newpage" style=3D"margin-top: 0px; margin-bottom: 0px; =
break-before: page;"><pre class=3D"newpage" style=3D"margin-top: 0px; =
margin-bottom: 0px; break-before: page;"><font face=3D"Helvetica" =
class=3D""><span style=3D"white-space: normal;" class=3D"">[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&nbsp;key generation. This text makes it sound like the conversion =
from X to K should follow the&nbsp;=E2=80=9Cmpint=E2=80=9D conversion, =
but that=E2=80=99s not the case. 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&nbsp;integer K back to a byte string for insertion into the hash, =
such as:</span></font></pre><pre class=3D"newpage" style=3D"margin-top: =
0px; margin-bottom: 0px; break-before: page;"><font face=3D"Helvetica" =
class=3D""><span style=3D"white-space: normal;" class=3D""><br =
class=3D""></span></font></pre></pre></div><blockquote =
style=3D"font-family: Helvetica; white-space: normal; margin: 0px 0px =
0px 40px; border: none; padding: 0px;" class=3D""><pre class=3D"newpage" =
style=3D"margin-top: 0px; margin-bottom: 0px; break-before: page;"><font =
face=3D"Helvetica" class=3D""><span style=3D"white-space: normal;" =
class=3D"">The integer K is then fed along with other data to the key =
exchange method=E2=80=99s hash function to generate encryption keys. =
During this process, [RFC4253] specifies that K should be encoded as =
an&nbsp;=E2=80=9Cmpint=E2=80=9D as described in section 5 of [RFC4251]. =
This conversion may result in a value&nbsp;</span></font><span =
style=3D"white-space: normal; font-family: Helvetica;" class=3D"">which =
varies from the&nbsp;fixed-length byte string X as =
follows:</span></pre></blockquote><font face=3D"Helvetica" class=3D""><pre=
 class=3D"newpage" style=3D"white-space: normal; margin-top: 0px; =
margin-bottom: 0px; break-before: page;"><br class=3D""></pre><pre =
class=3D"newpage" style=3D"margin-top: 0px; margin-bottom: 0px; =
break-before: page;"><pre class=3D"newpage" style=3D"margin-top: 0px; =
margin-bottom: 0px; break-before: page;"><font face=3D"Helvetica" =
class=3D""><span style=3D"white-space: normal;" class=3D"">This new =
paragraph can replace the next&nbsp;paragraph =
below.</span></font></pre></pre><pre class=3D"newpage" =
style=3D"white-space: normal; margin-top: 0px; margin-bottom: 0px; =
break-before: page;"><br class=3D""></pre></font></pre><pre =
class=3D"newpage" style=3D"margin-top: 0px; margin-bottom: 0px; =
break-before: page;"><span style=3D"font-size: medium;" class=3D"">   To =
clarify a corner-case in this conversion, when X is encoded as =
an</span></pre></pre></div><div class=3D""><pre class=3D"newpage" =
style=3D"margin-top: 0px; margin-bottom: 0px; break-before: page;"><font =
size=3D"3" class=3D"">   mpint K, in order to calculate the exchange =
hash, it may vary as
   follows:
</font><div style=3D"font-family: Helvetica; white-space: normal;" =
class=3D""><pre class=3D"newpage" style=3D"margin-top: 0px; =
margin-bottom: 0px; break-before: page;"><pre class=3D"newpage" =
style=3D"margin-top: 0px; margin-bottom: 0px; break-before: page;"><br =
class=3D""></pre></pre></div></pre><pre class=3D"newpage" =
style=3D"margin-top: 0px; margin-bottom: 0px; break-before: page;"><font =
size=3D"3" class=3D"">   o  Trim all leading zero-bytes of X.  If X is =
all zero-bytes, then
      the key exchange MUST fail.
<br class=3D""></font></pre><pre class=3D"newpage" style=3D"margin-top: =
0px; margin-bottom: 0px; break-before: page;"><font face=3D"Helvetica" =
class=3D""><span style=3D"white-space: normal;" class=3D"">[Ron] Are you =
sure this is necessary? I don=E2=80=99t see any mention of this =
restriction in RFC 4253. If the integer&nbsp;value of K is 0, it can =
still be encoded as a valid mpInt.</span></font></pre><pre =
class=3D"newpage" style=3D"margin-top: 0px; margin-bottom: 0px; =
break-before: page;"><font size=3D"3" class=3D"">
   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.
<br class=3D""></font></pre><pre class=3D"newpage" style=3D"margin-top: =
0px; margin-bottom: 0px; break-before: page;"><font face=3D"Helvetica" =
class=3D""><span style=3D"white-space: normal;" class=3D"">[Ron] =
Actually, after doing all of this, the mpint conversion also requires =
the that resulting byte string be&nbsp;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=E2=80=99s no =
mention of this length here.</span></font></pre><div class=3D""><font =
face=3D"Helvetica" class=3D""><span style=3D"white-space: normal;" =
class=3D""><br class=3D""></span></font></div><pre class=3D"newpage" =
style=3D"margin-top: 0px; margin-bottom: 0px; break-before: page;"><span =
style=3D"font-size: 13.333333015441895px;" class=3D"">   Or, as pseudo =
code:</span></pre><pre class=3D"newpage" style=3D"font-size: =
13.333333015441895px; margin-top: 0px; margin-bottom: 0px; break-before: =
page;">
                 k :=3D x;
                 while (k.length() &gt; 0 &amp;&amp; k[0] =3D=3D 0) k =3D =
k[1:];
                 assert(k.length() &gt; 0);
                 if 0 !=3D (k[0] &amp; 0x80) k =3D '\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 [<a =
href=3D"https://tools.ietf.org/html/rfc7748" title=3D"&quot;Elliptic =
Curves for Security&quot;" class=3D"">RFC7748</a>].  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.
</pre></div><div class=3D""><br class=3D""></div><div class=3D""><div =
class=3D"">[Ron] With the changes I have proposed above, I=E2=80=99m not =
sure this last paragraph is needed. Alternately, I=E2=80=99d 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. Also, =
=E2=80=9Cfix-length=E2=80=9D here should be =E2=80=9Cfixed-length=E2=80=9D=
. I think it is better to cover this point before diving into the =
details of how the =E2=80=9Cmpint=E2=80=9D conversion is different from =
the original X byte string.</div><div class=3D"">
--&nbsp;<br class=3D"">Ron Frederick<br class=3D""><a =
href=3D"mailto:ronf@timeheart.net" class=3D"">ronf@timeheart.net</a><br =
class=3D""><br class=3D""><br class=3D"">

</div>
<br class=3D""></div></body></html>=

--Apple-Mail=_0C05DEBB-4A4A-4E87-B290-B93427D3E747--

From bounces-ietf-ssh-owner-secsh-tyoxbijeg7-archive=lists.ietf.org@NetBSD.org  Thu May 11 23:39:26 2017
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+Ngu7cWJvGAEn4UKHzNYVwRINzC86Jn7a2FKQNGw+xpZ3XKul6oqMlLZsg68MNNjppLkXdUvmZVipGrdyfB4tlGmqw6dgqq5iFRhFjcHSqc6PBl7DDprjv0d0g15nLYkZVVUujz2q05XayS6MskgcPRbWXpj716bKP
X-Microsoft-Exchange-Diagnostics: 1;BN1PR05MB261;25:tUAKRghI84m1xhFeiApbcgwWrogI0g1hi0AO4P2ou+RnW5un1HMMg6Tmm/0c+sxEfKHz3pPwe5lAh6Oa3UyoQstXNGsWmautg1SnJIE1M/wtcMk6mZbo6V9HPmjMMJPsfleDl5YZkTTbna7wfkv2QszjNArZtLbmnYkHw4j03YrPP9kiDWMny6/zMPggBwVJIP8JS22jvOlp6E5EqhDU06wrgJher0CgVKsMOrddurzoZHel5/t2vDW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EPjelRubSD9q
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: =?utf-8?B?MTtCTjFQUjA1TUIyNjE7NDovbGVreTVsV3JpZ0lacWtXSHV3WWJaMUFENkQr?= =?utf-8?B?QUxkdmIxOUFMcUpZQjFtSjlBS1hkQVdpd0pjbHkvSkNiOUd1WkdhdllSTzBq?= =?utf-8?B?N3ArUFByVWhPZEhuOGp5YW9uTHZYbERTSFdTZ2U2RUdPWkVSR0JENjg2b2h2?= =?utf-8?B?a2hIaHJXalFHOWRERFk2TE1EeS9EV2xOd244bkhuTWl2NzJkM3VzdE5PM1NS?= =?utf-8?B?L2Q5ekQwcnNIOFhjNVA4WkltOHpJWHowNmRYWVpXSldFV1JVb29WMkx4ZEta?= =?utf-8?B?d3p4c3FYWlkzSVZBa1NCbFMybHlLbWNsOFovbVA2d0pjaVVBSGExVDNreVlX?= =?utf-8?B?aXRWT3pwMWlIcDdLQ09renBjS0NWQytieFZrYzN0OU5CWUtsR0VRV2JVdWVP?= =?utf-8?B?NExyMXdaSThYbjNuRGYzeitXM3Z3U29LVlE0MXEvbjhoVFVNSFFzam5kK3BG?= =?utf-8?B?MXhTTXhiMWlxMEtqR2M3ZXhtMEl5UVNqWVJyblhsQkdhRmVMbk5SZ2J2Y08z?= =?utf-8?B?UDFtc1R5ODhDUFhCNFo2dSs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a0NJYU9rL3h5?= =?utf-8?Q?8tmFgsZqZZwuAZvsFrY2KhK9RisdSw9?=
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,
>=20
> On May 11, 2017, at 6:32 AM, Mark D. Baushke <mdb@juniper.net> wrote:
>=20
> I just took a look at the updated draft. Here=E2=80=99s a copy of the tex=
t in
> section 2.1 and some inline suggestions:

I am always interested in making the text better.

> 2.1 Shared Secret Encoding
>=20
>    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.
>=20
>    The shared secret, K, is defined in [RFC4253] as a multiple precision
>    integer (mpint).  Curve25519/448 outputs a binary string X, which is
>=20
> [Ron] RFC 4253 actually says that K is =E2=80=9Cencoded as an mpint=E2=80=
=9D. I=E2=80=99d
> suggest saying =E2=80=9CThe shared secret, K, is defined in [RFC4253] as =
an
> integer."

Section 8 of RFC 5253 actually says "It computes K =3D 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].
>=20
> [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 =E2=80=9Cmpint=E2=80=9D conversi=
on, but
> that=E2=80=99s not the case.=20

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:
>=20
>   The integer K is then fed along with other data to the key exchange
>   method=E2=80=99s hash function to generate encryption keys. During this
>   process, [RFC4253] specifies that K should be encoded as an =E2=80=9Cmp=
int=E2=80=9D
>   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.
>=20
>    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:
>=20
>    o  Trim all leading zero-bytes of X.  If X is all zero-bytes, then
>       the key exchange MUST fail.
>=20
> [Ron] Are you sure this is necessary?=20

Yes.

> I don=E2=80=99t 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 =3D X25519(a, X25519(b, 9)) =3D 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 :=3D x
        zbcheck :=3D 0
	for byte in k: zbcheck |=3D k[byte];
        assert(zbcheck > 0);
        while (k.length() > 0 &amp;&amp; k[0] =3D=3D 0) k :=3D k[1:];
        if 0 !=3D (k[0] &amp; 0x80) k :=3D '\0' .. k;=20=20=20=20

which is kind of ugly...

>    o  If the high bit of X is set, the mpint format requires a zero byte
>       to be prepended.
>=20
>    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.
>=20
> [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=E2=80=99s 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:
>=20
>                  k :=3D x;
>                  while (k.length() > 0 && k[0] =3D=3D 0) k =3D k[1:];
>                  assert(k.length() > 0);
>                  if 0 !=3D (k[0] & 0x80) k =3D '\0' .. k;

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

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

>=20
>                                  Figure 1
>=20
>    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.
>=20
> [Ron] With the changes I have proposed above, I=E2=80=99m not sure this l=
ast
> paragraph is needed. Alternately, I=E2=80=99d 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.=20

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, =E2=80=9Cfix-length=E2=80=9D here should be =E2=80=9Cfixed-length=
=E2=80=9D.

Sure, I can make that change.

> I think it is better to cover this point before diving into the
> details of how the =E2=80=9Cmpint=E2=80=9D conversion is different from t=
he 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=3D"RFC4251"/>.
+          described in section 5 of <xref target=3D"RFC4251"/> which
+          requires that unnecessary leading bytes with the value 0
+          MUST NOT be included.
         </t>
=20
         <t>
@@ -181,32 +188,36 @@
           <list style=3D"symbols">
=20
             <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=3D"RFC4251"/>. If X is all
+              zero-bytes, then the key exchange MUST fail as required
+              in section 6 of <xref target=3D"RFC7748"/>.
             </t>
=20
             <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>
=20
             <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>
=20
           </list>
=20
           <figure anchor=3D"pseudo.code">
             <preamble>
-              Or, as pseudo code:
+              Or, as pseudo code (without dealing with side-channel
+              issues):
             </preamble>
             <artwork>
               k :=3D x;
-              while (k.length() > 0 &amp;&amp; k[0] =3D=3D 0) k =3D k[1:];
+              while (k.length() > 0 &amp;&amp; k[0] =3D=3D 0) k :=3D k[1:];
               assert(k.length() > 0);
-              if 0 !=3D (k[0] &amp; 0x80) k =3D '\0' .. k;
+              if 0 !=3D (k[0] &amp; 0x80) k :=3D '\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=3D"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

From bounces-ietf-ssh-owner-secsh-tyoxbijeg7-archive=lists.ietf.org@NetBSD.org  Fri May 12 22:32:44 2017
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 80627129B77 for <ietfarch-secsh-tyoxbijeg7-archive@ietfa.amsl.com>; Fri, 12 May 2017 22:32:44 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.091
X-Spam-Level:
X-Spam-Status: No, score=-4.091 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] 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=timeheart.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 wscAcHUFVHVI for <ietfarch-secsh-tyoxbijeg7-archive@ietfa.amsl.com>; Fri, 12 May 2017 22:32:42 -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 131BF129B34 for <secsh-tyoxbijeg7-archive@lists.ietf.org>; Fri, 12 May 2017 22:30:24 -0700 (PDT)
Received: by mail.netbsd.org (Postfix, from userid 605) id E694C84DF5; Sat, 13 May 2017 05:30:22 +0000 (UTC)
Delivered-To: ietf-ssh@netbsd.org
Received: by mail.netbsd.org (Postfix, from userid 1347) id 8C17884DCF; Sat, 13 May 2017 05:30:22 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 403DB84DCF for <ietf-ssh@netbsd.org>; Sat, 13 May 2017 05:24:15 +0000 (UTC)
X-Virus-Scanned: amavisd-new at netbsd.org
Authentication-Results: mail.netbsd.org (amavisd-new); dkim=pass (1024-bit key) header.d=timeheart.net
Received: from mail.netbsd.org ([127.0.0.1]) by localhost (mail.netbsd.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id pwXFHDm7Pxra for <ietf-ssh@netbsd.org>; Sat, 13 May 2017 05:24:14 +0000 (UTC)
Received: from mail-pf0-x230.google.com (mail-pf0-x230.google.com [IPv6:2607:f8b0:400e:c00::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.netbsd.org (Postfix) with ESMTPS id 3062584CD8 for <ietf-ssh@netbsd.org>; Sat, 13 May 2017 05:24:13 +0000 (UTC)
Received: by mail-pf0-x230.google.com with SMTP id m17so39103145pfg.3 for <ietf-ssh@netbsd.org>; Fri, 12 May 2017 22:24:13 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=timeheart.net; s=mail; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=cKN9oSPunz8b3EgvhWMDmgSWwDGv9uUxTewKPMi0DGg=; b=Ht5C//D6babAF7UPo9OkVU8JxmO8pKofZ8oeLhkwisw8DwP/ycKg1+9HrmJ/0+eMVp p4lO3y17fcM/UkNn33QxqqAQfcCOKr3jF/muZU/9ToTy74BIXiA+I1lf+pqGIfde5Zuj IwbpLb+H1XZsf8g0o8UzuvGnpQ1sZFfIOwKN0=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=cKN9oSPunz8b3EgvhWMDmgSWwDGv9uUxTewKPMi0DGg=; b=ODLnqGnUStDmJ1PUpZ+jijLPfiTlb6OYMsMSvFwCUoAvVERQzNNG4Ia1PEm1pQ+C2v No9Sg82ukMR4CeWegeXaEB74Y3OUIB06uxQMxmj+D9IG4pOGlR4DX6fxc9wX4WgAsd3j 8sJE15pmMdlpfLkGveiVI1Aql+G+Ip2MZ+/iZ1mIs1Yx92kN+pASt2o5Fl661uwFrV6r 7pBLYMOJTmwQz5c2gffDakAlLOmNeCRuyNynVFanl3qtKv0oUAmIm5La8iKeWN6aaSrn QKFGAlMu5IOOAUE9Dkd02eQDtD8a9ZUeqGcQo3cJ9028BiUqFRRL/eZ0Mj3pdmmrtp21 h0PQ==
X-Gm-Message-State: AODbwcCgJOZiS5AuK4z4czd/jPyoQdZbIjrpsy6htro9fkfs4LJfH/f3 GtYvQDiVec8kZQ==
X-Received: by 10.84.142.129 with SMTP id 1mr9474087plx.3.1494653052856; Fri, 12 May 2017 22:24:12 -0700 (PDT)
Received: from ?IPv6:2601:647:4282:2200:cfa:5497:d692:7eeb? ([2601:647:4282:2200:cfa:5497:d692:7eeb]) by smtp.gmail.com with ESMTPSA id y63sm8909487pfa.107.2017.05.12.22.24.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 May 2017 22:24:11 -0700 (PDT)
Content-Type: text/plain; charset=utf-8
Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\))
Subject: Re: ssh-ed25519 implementations
From: Ron Frederick <ronf@timeheart.net>
In-Reply-To: <1139.1494566512@eng-mail01.juniper.net>
Date: Fri, 12 May 2017 22:24:09 -0700
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>
Content-Transfer-Encoding: quoted-printable
Message-Id: <336063E0-135F-4A75-94E4-71540669E21A@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> <1139.1494566512@eng-mail01.juniper.net>
To: "Mark D. Baushke" <mdb@juniper.net>
X-Mailer: Apple Mail (2.3273)
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 Mark,

On May 11, 2017, at 10:21 PM, Mark D. Baushke <mdb@juniper.net> wrote:
> Ron Frederick <ronf@timeheart.net> writes:
>> 2.1 Shared Secret Encoding
>>=20
>>   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.
>>=20
>>   The shared secret, K, is defined in [RFC4253] as a multiple =
precision
>>   integer (mpint).  Curve25519/448 outputs a binary string X, which =
is
>>=20
>> [Ron] RFC 4253 actually says that K is =E2=80=9Cencoded as an =
mpint=E2=80=9D. I=E2=80=99d
>> suggest saying =E2=80=9CThe shared secret, K, is defined in [RFC4253] =
as an
>> integer."
>=20
> Section 8 of RFC 5253 actually says "It computes K =3D e^y mod p" =
which
> means that K is a multiple precision integer.

Section 8 is specific to the original Diffie Hellman key exchange. The =
computation is different for ECDH (described in section 4 of RFC 5656), =
but that states "The SSH framework requires that the shared key be an =
integer.=E2=80=9D and then goes on to describe how to do the conversion =
from an EC field element. For X25519, I think it makes sense to state =
something similar.


> 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.

I agree that in all of these cases the integer K is likely to be very =
large (much larger than something which would fit in a traditional =
integer value in a language like C). However, =E2=80=9Cmpint=E2=80=9D =
here really is just an encoding. In Python, for example, K can be =
represented as a plain Python =E2=80=9Cint=E2=80=9D type, since that =
natively supports arbitrarily large integers (limited only by available =
memory, I think). The =E2=80=9Cmpint=E2=80=9D conversion here actually =
changes the type from an =E2=80=9Cint=E2=80=9D to a byte array, which is =
needed to be able to feed the bytes to the hash function. Even in other =
languages where large integers are represented as some form of an array =
already, it=E2=80=99s important that the exact representation of this =
integer as a byte array is specified, so that all parties compute the =
hash in a consistent manner.


>>   o  Trim all leading zero-bytes of X.  If X is all zero-bytes, then
>>      the key exchange MUST fail.
>>=20
>> [Ron] Are you sure this is necessary?=20
>=20
> Yes.
>=20
>> I don=E2=80=99t 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.
>=20
> It is not in RFC4253, it is in RFC4251 where it says:
>=20
>   mpint
>=20
>      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.

That does not say that 0 is an invalid value. It simply says that when =
converting to an =E2=80=9Cmpint" byte array, 0 is represented by a =
zero-byte array.


> The check for X is all zero-bytes needs to be done per RFC7748:
>=20
>   Both now share K =3D X25519(a, X25519(b, 9)) =3D 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.

Ok.

I still have some doubts about whether this belongs in this =
specification, though, as it seems like the abort operation should be =
performed by the code implementing the X25519 multiplication. Before =
returning the byte array X, I would expect that code to check for an =
all-zeroes result and return an error, so the code handling this value =
in SSH would never even see the case where the converted value K ends up =
being 0.

As one data point, I checked the libsodium implementation, and it was =
changed back in November of 2015 (release 1.0.7) to perform this check =
and return an error if the result of the scalar multiplication ends up =
being all-zeroes. I don=E2=80=99t see a specific test vector which I can =
use to actually confirm that this works, though =E2=80=94 does anyone =
happen to have one?


>> [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=E2=80=99s no mention of this length here.
>=20
> True, because the prepended length is not a part of the hash to the =
best
> of my recollection. Am I mistaken?

Yes - the fixed-size 4-byte length is always included as part of the =
bytes fed to the hash.


>> [Ron] With the changes I have proposed above, I=E2=80=99m not sure =
this last
>> paragraph is needed. Alternately, I=E2=80=99d 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.=20
>=20
> 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.

This definitely looks better. It still needs additional text to cover =
the insertion of the fixed length bytes in front of the encoded =
=E2=80=9Cmpint=E2=80=9D value, though.
--=20
Ron Frederick
ronf@timeheart.net



From bounces-ietf-ssh-owner-secsh-tyoxbijeg7-archive=lists.ietf.org@NetBSD.org  Sat May 13 07:53:25 2017
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 D9511129AE9 for <ietfarch-secsh-tyoxbijeg7-archive@ietfa.amsl.com>; Sat, 13 May 2017 07:53:25 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.091
X-Spam-Level:
X-Spam-Status: No, score=-4.091 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] 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 RQbs7Csd1c3G for <ietfarch-secsh-tyoxbijeg7-archive@ietfa.amsl.com>; Sat, 13 May 2017 07:53:19 -0700 (PDT)
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200]) (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 5E7BE129B98 for <secsh-tyoxbijeg7-archive@lists.ietf.org>; Sat, 13 May 2017 07:51:21 -0700 (PDT)
Received: by mail.netbsd.org (Postfix, from userid 605) id B8A70855BD; Sat, 13 May 2017 14:51:18 +0000 (UTC)
Delivered-To: ietf-ssh@NetBSD.org
Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 1B5C084DE2 for <ietf-ssh@NetBSD.org>; Sat, 13 May 2017 14:51:13 +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 T29s9i8mTRAX for <ietf-ssh@netbsd.org>; Sat, 13 May 2017 14:51:12 +0000 (UTC)
Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0706.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe40::706]) by mail.netbsd.org (Postfix) with ESMTP id 15DC084CFB for <ietf-ssh@NetBSD.org>; Sat, 13 May 2017 14:51:09 +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=9Nt4s5OKzzwQ71fR8G+9+q2tRSH9P0ZPmcF3bBDgeAg=; b=I27Yhj5XxadSpJPzTBLY+ARRpsc+PvocwK4JvtCEgEIt7I5ayLdSI+urhiYfRLEKd9h3kH/9xmblRgtFJj5a39Fq/uKZ+1mCapY0pPzQxY9iG6J1yQDIsIqhJOZDu86flrG3Oa1hvpBcRQG/GOubJioUQcMpIPdmW8Wbaz1Y/4s=
Received: from CO2PR05CA026.namprd05.prod.outlook.com (10.141.241.154) by BY1PR0501MB1303.namprd05.prod.outlook.com (10.160.200.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1084.7; Sat, 13 May 2017 14:51:07 +0000
Received: from DM3NAM05FT063.eop-nam05.prod.protection.outlook.com (2a01:111:f400:7e51::201) by CO2PR05CA026.outlook.office365.com (2a01:111:e400:1429::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1101.5 via Frontend Transport; Sat, 13 May 2017 14:51:06 +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 DM3NAM05FT063.mail.protection.outlook.com (10.152.98.182) 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; Sat, 13 May 2017 14:51:06 +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; Sat, 13 May 2017 07:51:05 -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 v4DEp3rP013222;	Sat, 13 May 2017 07:51:03 -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 CFEA51145A;	Sat, 13 May 2017 07:51:02 -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: <336063E0-135F-4A75-94E4-71540669E21A@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> <1139.1494566512@eng-mail01.juniper.net> <336063E0-135F-4A75-94E4-71540669E21A@timeheart.net>
Comments: In-reply-to: Ron Frederick <ronf@timeheart.net> message dated "Fri, 12 May 2017 22:24:09 -0700."
From: "Mark D. Baushke" <mdb@juniper.net>
Date: Sat, 13 May 2017 07:51:02 -0700
Message-ID: <74670.1494687062@eng-mail01.juniper.net>
MIME-Version: 1.0
Content-Type: text/plain
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)(39410400002)(39860400002)(39450400003)(39850400002)(39400400002)(39840400002)(2980300002)(377424004)(189002)(199003)(9170700003)(54906002)(86362001)(48376002)(39060400002)(8676002)(6266002)(5003940100001)(305945005)(106466001)(55016002)(76176999)(356003)(189998001)(7126002)(5660300001)(8656002)(81166006)(50466002)(76506005)(2810700001)(7846003)(50986999)(6392003)(53416004)(105596002)(4326008)(93886004)(2950100002)(6246003)(117636001)(54356999)(47776003)(77096006)(478600001)(6916009)(97736004)(110136004)(7696004)(2906002)(53936002)(38730400002)(229853002)(8936002)(42262002);DIR:OUT;SFP:1102;SCL:1;SRVR:BY1PR0501MB1303;H:p-emfe01a-sac.jnpr.net;FPR:;SPF:SoftFail;MLV:ovrnspm;MX:1;A:1;PTR:InfoDomainNonexistent;LANG:en;
X-Microsoft-Exchange-Diagnostics: 1;DM3NAM05FT063;1:kK19z7hpP2CdR7cyrLI/gaS/Fqq1IBoedKLbbQJdgdu5VYSFMigv439MaKfuY8WL6HCVoN1FM7qXYoU9lTS5trwcXvrX8c3uqT21qoJC6a0NH7gGSsxtL2Xrx2lQDG5JDDy26k4syPpGdICEHzTDBfhMds7fnzyKiOsFx9pogR9KwbKFCfXLn+SyS6FIuO5/TeQdTrqwxmJLhCBmrxEOAqmO8euYgpXERSL24iiV01YZzNAGQgZx4bCyCkT8ukLkjUG8qdZvK6DvImx/V9C7Bs96ZFDPcTZtC9bJP1yLCzjl5qfECJFOi6yJCHCXA6WzkdIJwJB/1F/t1KF0CsBEs8Z1A/vfe/fZOWSw5TO3gC1KYCBcL3REbG06083N1Zppx5J7VpeXWOqcbUp974wQXWs1B+QJWpMAAUod0t8/z68bK3cyRTYwlj28bJVT/lO1FlyTN6QQ3V4UbPvXGAG2oxWNB7iNF/1JETJHIkAWoHbxQRs+oVibq/0OG988g7CJe1E0psF3Mg6QsBgNTrSrLBZRbOQFOf2VOt6wqZuNsS1F8RKOPrDUNeMEDH7H+hA7p1esW5DRVA9BZwoolc7uFIQCTLrjPah2v+hQ14S4E8uuh38in2pUW7yJqfj7yCOH
X-MS-PublicTrafficType: Email
X-MS-Office365-Filtering-Correlation-Id: 0d5f404b-5b89-41b1-84c3-08d49a0f7c45
X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(2017030254075)(201703131423075)(201703031133081);SRVR:BY1PR0501MB1303;
X-Microsoft-Exchange-Diagnostics: 1;BY1PR0501MB1303;3:JlhY8ih6LLGTxXx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bkhUz6S4m+MaCKSuZ3R+JujlvpWZ2LfEduoNvwsfpmIhMdMwHM51QQqaEqaipwgEypK9mTiuliJyqYi+xwwEUhC95kkP1jsOlrwg7jFt9B0zSYmBwPgLklm3uFWnW/dhbn9klluIkFoquXuhCwKlJJGqLNabkdqQqnN9X7zsZt2tnJi/Ky+Z5Te+DW0Q==
X-Microsoft-Exchange-Diagnostics: 1;BY1PR0501MB1303;20:eL8ls26IRlrJCMtS1dGdNZZU+bmw8/4eD012PMq8Q9rLUVDWNXIsEBgciClsvr6aihPHrPsNoiq8NVWzY5YnByOIkxqDrqnzr6zRHryYM9btWfc50ckPEgqH7YxryRdTky83yVKgRE1xDUFyFAIa+hEgTMIDdWDzZasW7J/Hxf02qufA7wKtdEaYymc99ESVt2S1ERRwo0M2DUIz/SEe4jE9LPhoQpPqkQCfC9D9vR7WB0/U1YpTtFrJYz3mYmqWQH9ox9Z5sKrQXBKJUFpp2TgOP/up0694zlvaPHyUG1BM5myGWBrf3ar6rIBaCg/TGyrnIpykcj6qEMq4S4uuzJknuT5HaGg3nVIrznyqCPnwUI9Wg+hh9x8nS6b2B02qD5Swozkyd4hDplgzVnkiw+3ekgn0JAt0OE4RlU2wF9tvWHtJt7+9T7CzGMpQnz9K29IMiE1mCDMMCJKJ/owcMjmUSisI6WxKjUk5fmCh3Aiq2Z2pmA5Ht5qTY1ovlR3x
X-Microsoft-Antispam-PRVS: <BY1PR0501MB13030020C13A40CD71E9CF9ABFE30@BY1PR0501MB1303.namprd05.prod.outlook.com>
X-Exchange-Antispam-Report-Test: UriScan:;
X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700036)(100105000095)(100000701036)(100105300095)(100000702036)(100105100095)(6040450)(601004)(2401047)(13023025)(13024025)(13018025)(5005006)(13017025)(8121501046)(13015025)(10201501046)(100000703036)(100105400095)(93006095)(93003095)(3002001)(6055026)(6041248)(20161123564025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123558100)(20161123562025)(6072148)(100000704036)(100105200095)(100000705036)(100105500095);SRVR:BY1PR0501MB1303;BCL:0;PCL:0;RULEID:(100000800036)(100110000095)(100000801036)(100110300095)(100000802036)(100110100095)(100000803036)(100110400095)(100000804036)(100110200095)(100000805036)(100110500095);SRVR:BY1PR0501MB1303;
X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BY1PR0501MB1303;4:I1gJWjc0uGm8iDtG6ehfxB82QmJ1wpU4vaJRKV7u?= =?us-ascii?Q?4WFbUZHvyDoFB/ha4JlUZ9FA7m4qNm/NdrqLkhmliMuyadonhXRwVIO3HE5J?= =?us-ascii?Q?JmWNZQY10NbwuqHGf7+Wio9dJy/g9m5eBX7sOnOZ8qVKl2BrfteuKYU+VpzE?= =?us-ascii?Q?f4aNga+DmcCKeZRxOc7F1Vk2PR4FS6HN235zbfPTpwWQYKAYtO4wawlI9zNv?= =?us-ascii?Q?z54gEpLXeSGSgVsHuSxLtwCyA4ZjO8yMxynF6bEA6pBEQJP1gmb1jTnxgw3C?= =?us-ascii?Q?tBHWBq2ZfNJCwpWf8vORyOwSpMscGiLnw0sgJQrYICdjUUzcORDyrCmCxdMB?= =?us-ascii?Q?vSYv0k940Ofwn4l1E57QIILgY4hoU8lDdbYPclBoVe2AHtTMSpbHPucmbVnX?= =?us-ascii?Q?UX7NslpZhSz1r+wnbqeOFTcJIhdzV716FpdFiPGf7r+5De6if5JMb8IF4X2n?= =?us-ascii?Q?5C0PCGpzBvjSCpHEQOd9OKtNeN6l4BcuTbjBDTiBZnmVp5M5xp/BQK+wM9Nl?= =?us-ascii?Q?sth9YysjApRt1luJ9AeIwyX4qxkNtS3W1pds1hCinQTJmQFOoNg8C/n8/2DB?= =?us-ascii?Q?axKLYFzPWLAQNMk9zxDzN2ybjB84bfCO1gBfDw9nRsVcj6mpYDttabVmLWFH?= =?us-ascii?Q?ArAGh98CDZyKpYjM6vO7nGLvAldaFXZXBIujvNNu3u55qYuHTPlXHLd78beo?= =?us-ascii?Q?Wf+6CFoa5QhD6NSQwcVp6whpPZNKneR8cCmoeaRWzcgA/3tOfydVfBzerDvG?= =?us-ascii?Q?wTGaPwOZkxqBEN480DO8moZAMp5oVc6yCm9abG6T3zM8c5lEplxWjJIxftw0?= =?us-ascii?Q?2KOiRCRjhKn9wHPs9SxCdKv12l8Rd9MpB9vSajyPIe3gN9+PzL6Uant3dEhU?= =?us-ascii?Q?ONVhChz4M6HqjSUwHDQn95deqX81Noa6wSZyFWIukM13meE0AfrFVp1rvIVz?= =?us-ascii?Q?NNxuv8cUP34kjiR2PfDrSES895UDoaPDZOA/mXhHlAOMs47V+B2f/NlspDit?= =?us-ascii?Q?fSjOAgUpyP+jy6LhdOimF7V7jIPG4lwh0DYJkFPtwlMzPILt0s7DOIUFto5p?= =?us-ascii?Q?ysFPOPGprn5YhQwtHHJllGIiDvi+KRlAY/R/xlaHPD53nJdJKSNhvGiCbW4G?= =?us-ascii?Q?r9WAKNLhS0CWjPfXBcdhOCTSso3yj8E9xWvVwGHvabJm8j7qloL97fKLl2OA?= =?us-ascii?Q?5z4pCDKp0usoKgJxFzNKRTJx+RZFR1r39B/0kb3/jcVb6LzYBSkwQ+rrDICn?= =?us-ascii?Q?aE0fUd+Oejo02tUXkWg=3D?=
X-Forefront-PRVS: 0306EE2ED4
X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BY1PR0501MB1303;23:rxPzcEyyZX08EgfqHgbpyOXHAhmN1pJV9KeTyCz?= =?us-ascii?Q?p9ANKMTgFzgx13+NPO5HMFzkyTQAg11+COS13qvtYKjalzs9VcBMP1LTsflo?= =?us-ascii?Q?LQ+a8VtfjPxDErND8sCUgUnZoIZP48MtK0iy9UcSItDAQIzyvXu8P443cGY2?= =?us-ascii?Q?uPAU8K1Zpy4HvxCpEJMN7VMtKh40stFtymH+7C8nAalNDGh749KMHtlhEeoe?= =?us-ascii?Q?x33zO+FlR/QbUTr4C6IKFFvt6QT36B0flWigrlfyGYcoN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nFkEAJqU3BJ8w4I5vjIYyra7wr+eu1WWya15ujNmhuESLmD0FiECSeJRWbP7wFnCCLqPwvgNCQIaLFnjYwATXVX5oGTEhGIp3TDdV7CAyRifoqIhXdpBPCuHJodcatS3sjLZCQlqf33Eh87FRqciozctpscbp2TCjxMQKPdqZh/HRzJTKSfyKJzUL0kPqgPw8w/h/X+04+4MXLzd/k9gwiE1NFcJQSsZ/yWrxTsY75CZ32k8M74jk89SMNCBF2E9ZRdaQUeRZUVR6dMPxqRD6h8ehBoTvt0ucb6/D9Wtf5T8/beUUD2lwyy5gt/e4uBqr0xvYhJgS4/9jJ+NlIHR0wlmzmR3I36V+iEAghTRBmETM0PhGMb0mBHRFKy4J3OZuTPc;24:rcjb7i8ZX2aAbFR9fyW+ndD0OpCjv6RY3Xp+InR21U1slec7X12q+pAM0hAhZeEBbu1RKIpc1hvv4dtbmh6dG4CCTOI/Ibzs5IRTGOGN2bM=
SpamDiagnosticOutput: 1:99
SpamDiagnosticMetadata: NSPM
X-Microsoft-Exchange-Diagnostics: 1;BY1PR0501MB1303;7:QG43vi8ArBJ/xZsSzCLDs7OjtsgboqMi78RBvfTlTslGWZZCs1NuzhDA47EsvhQ8FzaU2/I+Hm3kF0Wn71IwG9IsAD3WpFT8waOBx76UrBH4TPp6kgq4JAuAJB7qycosY4ARAHdY6Q1wwwZMHteemeJ/x67jMxUWrYniwy6qG4hx7Q96CKmHGRiNZXNX7e52j/g3+bkFGYKcMz3RS81ZiYfO5P+bRuy8VKogtbcPqmRNzI7p57NK0S0VgNHCfzvWx8Kb49Uzk7kYEDoMk75si+kFRK9ZamWrYKjvdis8DsM1+z4gbTZxkXD2Q/RXF3Oum3Pnajpg4u4RWa2lNMkAyg==
X-OriginatorOrg: juniper.net
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 May 2017 14:51:06.2757 (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: BY1PR0501MB1303
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,

I have made some adjustments. Here is a unified diff of the relevant
changes to the .txt form of the draft. If the pseudo-code looks bad,
let me know if I should just remove it or not.

--- draft-ietf-curdle-ssh-curves-05.txt	2017-05-11 11:58:23.000000000 -0700
+++ draft-ietf-curdle-ssh-curves-06.txt	2017-05-13 07:46:54.000000000 -0700
@@ -140,47 +140,64 @@
    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
-   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].
+   The shared secret, K, is defined in [RFC4253] and [RFC5656] as an
+   integer encoded as a multiple precision integer (mpint).
+   Curve25519/448 outputs a binary string X, which is 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 octets as an unsigned fixed-
+   length integer encoded in network byte order.
+
+   The fixed-length integer is then minimized into the minimum number of
+   octets to represent a positve mpint.  This conversion follows the
+   normal "mpint" process as described in section 5 of [RFC4251] which
+   requires that unnecessary leading bytes with the value 0 MUST NOT be
+   included.  The length of the integer is then prepended with a 4 octet
+   big-endian integer which is the length in octets of the minimized K.
+
+   The mpint K is then fed along with other data to the key exchange
+   method's hash function to generate encryption keys.
 
    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.
-
-   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.

-   Or, as pseudo code:
+   o  Trim all leading zero-bytes of X, as required in section 5 of
+      [RFC4251].  If X is all zero-bytes, then the key exchange MUST
+      fail as required in section 6 of [RFC7748].
+
+   o  Given X is a positive, if the MSB of X is set, then the "mpint"
+      format requires a zero-byte to be prepended.
+
+   o  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. prepend K with the big-endian
+      number of octets for the length of K.
+
+   Or, as pseudo code (without dealing with side-channel issues):
 
                  k := x;
-                 while (k.length() > 0 && k[0] == 0) k = k[1:];
+                 while (k.length() > 0 && k[0] == 0) k := k[1:];
                  assert(k.length() > 0);
-                 if 0 != (k[0] & 0x80) k = '\0' .. k;
+                 if 0 != (k[0] & 0x80) k := '\0' .. k;
+                 l[0] := k.lengh() >> 24;
+                 l[1] := (k.lengh() >> 16) & 0xff;
+                 l[2] := (k.lengh() >> 8) & 0xff;
+                 l[3] := k.lengh() & 0xff;
+                 k := l .. 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
+   there will be encoded into byte strings by doing a fixed-length
    unsigned litle-endian conversion, per [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

From bounces-ietf-ssh-owner-secsh-tyoxbijeg7-archive=lists.ietf.org@NetBSD.org  Mon May 15 01:47:20 2017
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 46675129C1E for <ietfarch-secsh-tyoxbijeg7-archive@ietfa.amsl.com>; Mon, 15 May 2017 01:47:20 -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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_MED=-2.3, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, T_DKIM_INVALID=0.01] 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=timeheart.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 mA0DZeu8GX8B for <ietfarch-secsh-tyoxbijeg7-archive@ietfa.amsl.com>; Mon, 15 May 2017 01:47:17 -0700 (PDT)
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200]) (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 EF038126BF7 for <secsh-tyoxbijeg7-archive@lists.ietf.org>; Mon, 15 May 2017 01:43:42 -0700 (PDT)
Received: by mail.netbsd.org (Postfix, from userid 605) id 818AF85691; Mon, 15 May 2017 08:43:40 +0000 (UTC)
Delivered-To: ietf-ssh@netbsd.org
Received: by mail.netbsd.org (Postfix, from userid 1347) id 1DFB884DED; Mon, 15 May 2017 08:43:40 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id B5ACF84DC2 for <ietf-ssh@netbsd.org>; Sun, 14 May 2017 15:27:20 +0000 (UTC)
X-Virus-Scanned: amavisd-new at netbsd.org
Authentication-Results: mail.netbsd.org (amavisd-new); dkim=pass (1024-bit key) header.d=timeheart.net
Received: from mail.netbsd.org ([127.0.0.1]) by localhost (mail.netbsd.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id KcqHdIhZnXLv for <ietf-ssh@netbsd.org>; Sun, 14 May 2017 15:27:19 +0000 (UTC)
Received: from mail-pg0-x235.google.com (mail-pg0-x235.google.com [IPv6:2607:f8b0:400e:c05::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.netbsd.org (Postfix) with ESMTPS id 35C9984CFB for <ietf-ssh@netbsd.org>; Sun, 14 May 2017 15:27:17 +0000 (UTC)
Received: by mail-pg0-x235.google.com with SMTP id q125so29656448pgq.2 for <ietf-ssh@netbsd.org>; Sun, 14 May 2017 08:27:17 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=timeheart.net; s=mail; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=m6rRm15QzwLidRjMCvmY4pK8hiF+yBPYStqSQfgQDK8=; b=Ckmi3gmcXWEaWzpGiH8cKr0BvqR9plR2unjwtoEX07pXx0HgSsoo2UWin3A6M+lHw3 CXXHpwWaB8SukeqdDn4RiLJsRfT5lSprLEEJ1QPRqnn+Wu4/9C1I6qGm4mdkOnugO5Lo L1bDfQgafPJkEDdxM/YL6CSxkJjB576P/9o7U=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=m6rRm15QzwLidRjMCvmY4pK8hiF+yBPYStqSQfgQDK8=; b=T0IhbNjNphPp9Hb9JzfKf3ZlByls963WT2k5VWYwuhmcBYAxBe2fex+17z4gAfJKOz fZ/GYY5jShyQqGWrAH7smggYpCDQAP2nfxgHkruS6nzUN7FN4DTt76/5s6h58wmj8BLr sBjNgcTLX6MSFVO4xcnuTpjE+lYG/5+ilcURr75yp4b7eUkn6qo8OwPmqgmoxjSKNSQ8 4NGJsd9lO98sm6VnbExb2l3M+P+0SG7Bktk2sxkg0j8CPDQSPVOg21UTx+7xPYK1RNnQ ltWdGJu0nU+AFJ/3ly5B+UJKFMezqoauWZTumGEM7vx4E5qhmFYChC37/vkr+ARu6H0t FAIQ==
X-Gm-Message-State: AODbwcBdkTYvEUEgLe6TIZdCvjAdsUv2HZf4BABytaRehHRPFX2qFWiu vciXEEwhbhFwOw==
X-Received: by 10.98.245.155 with SMTP id b27mr1807355pfm.181.1494775637137; Sun, 14 May 2017 08:27:17 -0700 (PDT)
Received: from ?IPv6:2601:647:4282:2200:cfa:5497:d692:7eeb? ([2601:647:4282:2200:cfa:5497:d692:7eeb]) by smtp.gmail.com with ESMTPSA id i68sm14236597pfi.72.2017.05.14.08.27.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 14 May 2017 08:27:16 -0700 (PDT)
From: Ron Frederick <ronf@timeheart.net>
Message-Id: <BE48CE40-3E26-4F7D-9101-A3D0CC453C17@timeheart.net>
Content-Type: multipart/alternative; boundary="Apple-Mail=_C0F4140A-D4BE-4544-A79C-AAB8E8EEC1A8"
Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\))
Subject: Re: ssh-ed25519 implementations
Date: Sun, 14 May 2017 08:27:14 -0700
In-Reply-To: <74670.1494687062@eng-mail01.juniper.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>
To: "Mark D. Baushke" <mdb@juniper.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> <1139.1494566512@eng-mail01.juniper.net> <336063E0-135F-4A75-94E4-71540669E21A@timeheart.net> <74670.1494687062@eng-mail01.juniper.net>
X-Mailer: Apple Mail (2.3273)
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>

--Apple-Mail=_C0F4140A-D4BE-4544-A79C-AAB8E8EEC1A8
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=utf-8

Hi Mark,

On May 13, 2017, at 7:51 AM, Mark D. Baushke <mdb@juniper.net> wrote:
> I have made some adjustments. Here is a unified diff of the relevant
> changes to the .txt form of the draft. If the pseudo-code looks bad,
> let me know if I should just remove it or not.

I would lean toward removing the pseudo-code, and just letting RFC 4251 =
and the examples provided in section 5 there speak for themselves. If =
you do that, you probably don=E2=80=99t even need to describe the =
details of how to encode the length. All I was really looking for here =
is a mention that the length is present after the conversion, since you =
had so much detail about the conversion of the integer itself. However, =
if you just reference this encoding mechanism you may be fine without =
it. You could replace the second and third paragraphs below with:

The integer K is then encoded as an mpint using the process described in =
section 5 of [RFC451] and the resulting bytes are fed as described in =
[RFC4253] to the key exchange method=E2=80=99s hash function to generate =
encryption keys.


> --- draft-ietf-curdle-ssh-curves-05.txt	2017-05-11 =
11:58:23.000000000 -0700
> +++ draft-ietf-curdle-ssh-curves-06.txt	2017-05-13 =
07:46:54.000000000 -0700
> @@ -140,47 +140,64 @@
>    only to be applicable to the scope of the mechanism described in =
this
>    document.
>=20
> -   The shared secret, K, is defined in [RFC4253] as a multiple =
precision
> -   integer (mpint).  Curve25519/448 outputs a binary string X, which =
is
> -   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].
> +   The shared secret, K, is defined in [RFC4253] and [RFC5656] as an
> +   integer encoded as a multiple precision integer (mpint).
> +   Curve25519/448 outputs a binary string X, which is 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 octets as an unsigned fixed-
> +   length integer encoded in network byte order.
> +
> +   The fixed-length integer is then minimized into the minimum number =
of
> +   octets to represent a positve mpint.  This conversion follows the
> +   normal "mpint" process as described in section 5 of [RFC4251] =
which
> +   requires that unnecessary leading bytes with the value 0 MUST NOT =
be
> +   included.  The length of the integer is then prepended with a 4 =
octet
> +   big-endian integer which is the length in octets of the minimized =
K.
> +
> +   The mpint K is then fed along with other data to the key exchange
> +   method's hash function to generate encryption keys.
>=20
>    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:
>=20
> -   o  Trim all leading zero-bytes of X.  If X is all zero-bytes, then
> -      the key exchange MUST fail.
> -
> -   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.
>=20
> -   Or, as pseudo code:
> +   o  Trim all leading zero-bytes of X, as required in section 5 of
> +      [RFC4251].  If X is all zero-bytes, then the key exchange MUST
> +      fail as required in section 6 of [RFC7748].
> +
> +   o  Given X is a positive, if the MSB of X is set, then the "mpint"
> +      format requires a zero-byte to be prepended.
> +
> +   o  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. prepend K with the =
big-endian
> +      number of octets for the length of K.
> +
> +   Or, as pseudo code (without dealing with side-channel issues):
>=20
>                  k :=3D x;
> -                 while (k.length() > 0 && k[0] =3D=3D 0) k =3D k[1:];
> +                 while (k.length() > 0 && k[0] =3D=3D 0) k :=3D =
k[1:];
>                  assert(k.length() > 0);
> -                 if 0 !=3D (k[0] & 0x80) k =3D '\0' .. k;
> +                 if 0 !=3D (k[0] & 0x80) k :=3D '\0' .. k;
> +                 l[0] :=3D k.lengh() >> 24;
> +                 l[1] :=3D (k.lengh() >> 16) & 0xff;
> +                 l[2] :=3D (k.lengh() >> 8) & 0xff;
> +                 l[3] :=3D k.lengh() & 0xff;
> +                 k :=3D l .. k;
>=20
>                                  Figure 1
>=20
>    When performing the X25519 or X448 operations, the integer values
> -   there will be encoded into byte strings by doing a fix-length
> +   there will be encoded into byte strings by doing a fixed-length
>    unsigned litle-endian conversion, per [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

--=20
Ron Frederick
ronf@timeheart.net




--Apple-Mail=_C0F4140A-D4BE-4544-A79C-AAB8E8EEC1A8
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=utf-8

<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html =
charset=3Dutf-8"></head><body style=3D"word-wrap: break-word; =
-webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" =
class=3D"">Hi Mark,<div class=3D""><br class=3D""></div><div class=3D"">On=
 May 13, 2017, at 7:51 AM, Mark D. Baushke &lt;<a =
href=3D"mailto:mdb@juniper.net" class=3D"">mdb@juniper.net</a>&gt; =
wrote:<br class=3D""><div><blockquote type=3D"cite" class=3D"">I have =
made some adjustments. Here is a unified diff of the relevant<br =
class=3D""><div class=3D""><div class=3D"">changes to the .txt form of =
the draft. If the pseudo-code looks bad,<br class=3D"">let me know if I =
should just remove it or not.<br =
class=3D""></div></div></blockquote><div><br class=3D""></div><div>I =
would lean toward removing the pseudo-code, and just letting RFC 4251 =
and the examples provided in section 5 there speak for themselves. If =
you do that, you probably don=E2=80=99t even need to describe the =
details of how to encode the length. All I was really looking for here =
is a mention that the length is present after the conversion, since you =
had so much detail about the conversion of the integer itself. However, =
if you just reference this encoding mechanism you may be fine without =
it. You could replace the second and third paragraphs below =
with:</div><div><br class=3D""></div></div></div><blockquote =
style=3D"margin: 0 0 0 40px; border: none; padding: 0px;" class=3D""><div =
class=3D""><div><div>The integer K is then encoded as an mpint using the =
process described in section 5 of [RFC451] and the resulting bytes are =
fed as described in [RFC4253] to the key exchange method=E2=80=99s hash =
function to generate encryption keys.</div></div></div></blockquote><div =
class=3D""><div><div><br class=3D""></div><br class=3D""><blockquote =
type=3D"cite" class=3D""><div class=3D""><div class=3D"">--- =
draft-ietf-curdle-ssh-curves-05.txt<span class=3D"Apple-tab-span" =
style=3D"white-space:pre">	</span>2017-05-11 11:58:23.000000000 =
-0700<br class=3D"">+++ draft-ietf-curdle-ssh-curves-06.txt<span =
class=3D"Apple-tab-span" style=3D"white-space:pre">	=
</span>2017-05-13 07:46:54.000000000 -0700<br class=3D"">@@ -140,47 =
+140,64 @@<br class=3D""> &nbsp;&nbsp;&nbsp;only to be applicable to the =
scope of the mechanism described in this<br class=3D""> =
&nbsp;&nbsp;&nbsp;document.<br class=3D""><br class=3D"">- =
&nbsp;&nbsp;The shared secret, K, is defined in [RFC4253] as a multiple =
precision<br class=3D"">- &nbsp;&nbsp;integer (mpint). =
&nbsp;Curve25519/448 outputs a binary string X, which is<br class=3D"">- =
&nbsp;&nbsp;the 32 or 56 byte point obtained by scalar multiplication of =
the<br class=3D"">- &nbsp;&nbsp;other side's public key and the local =
private key scalar. &nbsp;The 32 or<br class=3D"">- &nbsp;&nbsp;56 bytes =
of X are converted into K by interpreting the bytes as an<br class=3D"">- =
&nbsp;&nbsp;unsigned fixed-length integer encoded in network byte order. =
&nbsp;This<br class=3D"">- &nbsp;&nbsp;conversion follows the normal =
"mpint" process as described in section<br class=3D"">- &nbsp;&nbsp;5 of =
[RFC4251].<br class=3D"">+ &nbsp;&nbsp;The shared secret, K, is defined =
in [RFC4253] and [RFC5656] as an<br class=3D"">+ &nbsp;&nbsp;integer =
encoded as a multiple precision integer (mpint).<br class=3D"">+ =
&nbsp;&nbsp;Curve25519/448 outputs a binary string X, which is the 32 or =
56 byte<br class=3D"">+ &nbsp;&nbsp;point obtained by scalar =
multiplication of the other side's public<br class=3D"">+ =
&nbsp;&nbsp;key and the local private key scalar. &nbsp;The 32 or 56 =
bytes of X are<br class=3D"">+ &nbsp;&nbsp;converted into K by =
interpreting the octets as an unsigned fixed-<br class=3D"">+ =
&nbsp;&nbsp;length integer encoded in network byte order.<br =
class=3D"">+<br class=3D"">+ &nbsp;&nbsp;The fixed-length integer is =
then minimized into the minimum number of<br class=3D"">+ =
&nbsp;&nbsp;octets to represent a positve mpint. &nbsp;This conversion =
follows the<br class=3D"">+ &nbsp;&nbsp;normal "mpint" process as =
described in section 5 of [RFC4251] which<br class=3D"">+ =
&nbsp;&nbsp;requires that unnecessary leading bytes with the value 0 =
MUST NOT be<br class=3D"">+ &nbsp;&nbsp;included. &nbsp;The length of =
the integer is then prepended with a 4 octet<br class=3D"">+ =
&nbsp;&nbsp;big-endian integer which is the length in octets of the =
minimized K.<br class=3D"">+<br class=3D"">+ &nbsp;&nbsp;The mpint K is =
then fed along with other data to the key exchange<br class=3D"">+ =
&nbsp;&nbsp;method's hash function to generate encryption keys.<br =
class=3D""><br class=3D""> &nbsp;&nbsp;&nbsp;To clarify a corner-case in =
this conversion, when X is encoded as an<br class=3D""> =
&nbsp;&nbsp;&nbsp;mpint K, in order to calculate the exchange hash, it =
may vary as<br class=3D""> &nbsp;&nbsp;&nbsp;follows:<br class=3D""><br =
class=3D"">- &nbsp;&nbsp;o &nbsp;Trim all leading zero-bytes of X. =
&nbsp;If X is all zero-bytes, then<br class=3D"">- =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;the key exchange MUST fail.<br =
class=3D"">-<br class=3D"">- &nbsp;&nbsp;o &nbsp;If the high bit of X is =
set, the mpint format requires a zero byte<br class=3D"">- =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;to be prepended.<br class=3D"">-<br =
class=3D"">- &nbsp;&nbsp;o &nbsp;The length of the encoded K may not be =
the same as the original<br class=3D"">- =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;length of X due to trimming or prepending =
zero-bytes as needed for<br class=3D"">- =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"mpint" format.<br class=3D""><br =
class=3D"">- &nbsp;&nbsp;Or, as pseudo code:<br class=3D"">+ =
&nbsp;&nbsp;o &nbsp;Trim all leading zero-bytes of X, as required in =
section 5 of<br class=3D"">+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[RFC4251]. =
&nbsp;If X is all zero-bytes, then the key exchange MUST<br class=3D"">+ =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fail as required in section 6 of =
[RFC7748].<br class=3D"">+<br class=3D"">+ &nbsp;&nbsp;o &nbsp;Given X =
is a positive, if the MSB of X is set, then the "mpint"<br class=3D"">+ =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;format requires a zero-byte to be =
prepended.<br class=3D"">+<br class=3D"">+ &nbsp;&nbsp;o &nbsp;The =
length of the "mpint" form of K may not be the same as the<br class=3D"">+=
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;original length of X due to trimming or =
prepending zero-byte<br class=3D"">+ =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;values as needed for "mpint" format. =
prepend K with the big-endian<br class=3D"">+ =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;number of octets for the length of K.<br =
class=3D"">+<br class=3D"">+ &nbsp;&nbsp;Or, as pseudo code (without =
dealing with side-channel issues):<br class=3D""><br class=3D""> =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;k :=3D x;<br class=3D"">- =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;while (k.length() &gt; 0 &amp;&amp; k[0] =3D=3D 0) =
k =3D k[1:];<br class=3D"">+ =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;while (k.length() &gt; 0 &amp;&amp; k[0] =3D=3D 0) =
k :=3D k[1:];<br class=3D""> =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;assert(k.length() &gt; 0);<br class=3D"">- =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;if 0 !=3D (k[0] &amp; 0x80) k =3D '\0' .. k;<br =
class=3D"">+ =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;if 0 !=3D (k[0] &amp; 0x80) k :=3D '\0' .. k;<br =
class=3D"">+ =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;l[0] :=3D k.lengh() &gt;&gt; 24;<br class=3D"">+ =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;l[1] :=3D (k.lengh() &gt;&gt; 16) &amp; 0xff;<br =
class=3D"">+ =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;l[2] :=3D (k.lengh() &gt;&gt; 8) &amp; 0xff;<br =
class=3D"">+ =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;l[3] :=3D k.lengh() &amp; 0xff;<br class=3D"">+ =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;k :=3D l .. k;<br class=3D""><br class=3D""> =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Figure 1<br =
class=3D""><br class=3D""> &nbsp;&nbsp;&nbsp;When performing the X25519 =
or X448 operations, the integer values<br class=3D"">- &nbsp;&nbsp;there =
will be encoded into byte strings by doing a fix-length<br class=3D"">+ =
&nbsp;&nbsp;there will be encoded into byte strings by doing a =
fixed-length<br class=3D""> &nbsp;&nbsp;&nbsp;unsigned litle-endian =
conversion, per [RFC7748]. &nbsp;It is only later<br class=3D""> =
&nbsp;&nbsp;&nbsp;when these byte strings are then passed to the ECDH =
code in SSH that<br class=3D""> &nbsp;&nbsp;&nbsp;the bytes are =
re-interpreted as a fixed-length unsigned =
big-endian</div></div></blockquote></div><div class=3D"">
--&nbsp;<br class=3D"">Ron Frederick<br class=3D""><a =
href=3D"mailto:ronf@timeheart.net" class=3D"">ronf@timeheart.net</a><br =
class=3D""><br class=3D""><br class=3D"">

</div>
<br class=3D""></div></body></html>=

--Apple-Mail=_C0F4140A-D4BE-4544-A79C-AAB8E8EEC1A8--

From bounces-ietf-ssh-owner-secsh-tyoxbijeg7-archive=lists.ietf.org@NetBSD.org  Mon May 15 22:08:39 2017
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 420CD129B3A for <ietfarch-secsh-tyoxbijeg7-archive@ietfa.amsl.com>; Mon, 15 May 2017 22:08:39 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.39
X-Spam-Level:
X-Spam-Status: No, score=-1.39 tagged_above=-999 required=5 tests=[BAYES_50=0.8, DKIM_SIGNED=0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_MED=-2.3, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, T_DKIM_INVALID=0.01] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=fail (2048-bit key) reason="fail (body has been altered)" header.d=denisbider.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 wowhKjCuuGnb for <ietfarch-secsh-tyoxbijeg7-archive@ietfa.amsl.com>; Mon, 15 May 2017 22:08:37 -0700 (PDT)
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200]) (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 45E7512EAAF for <secsh-tyoxbijeg7-archive@lists.ietf.org>; Mon, 15 May 2017 22:06:01 -0700 (PDT)
Received: by mail.netbsd.org (Postfix, from userid 605) id 4C46F8557F; Tue, 16 May 2017 05:05:59 +0000 (UTC)
Delivered-To: ietf-ssh@netbsd.org
Received: by mail.netbsd.org (Postfix, from userid 1347) id F162F84D75; Tue, 16 May 2017 05:05:58 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id EDC9E85692 for <ietf-ssh@netbsd.org>; Mon, 15 May 2017 11:34:57 +0000 (UTC)
X-Virus-Scanned: amavisd-new at netbsd.org
Authentication-Results: mail.netbsd.org (amavisd-new); dkim=pass (2048-bit key) header.d=denisbider.com
Received: from mail.netbsd.org ([127.0.0.1]) by localhost (mail.netbsd.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id 8wyDr5NO0GhQ for <ietf-ssh@netbsd.org>; Mon, 15 May 2017 11:34:57 +0000 (UTC)
Received: from skroderider.denisbider.com (skroderider.denisbider.com [50.18.172.175]) (using TLSv1.1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.netbsd.org (Postfix) with ESMTPS id 486AE84CFB for <ietf-ssh@netbsd.org>; Mon, 15 May 2017 11:34:57 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=denisbider.com; s=mail; h=from:subject:date:message-id:to:mime-version:content-type; bh=BoelfvKNtpzwmdRSkvk1zg9SJUANHYlpbetbAToscOg=; b=h3XzAoaFjFnu+2Up2is9Y/s7gMDnXYQENtKqDefhPDYCuR0rkoL7lawJcg6YDtDHv3IBPemQsJxSd EwhlUo2u3+nS4aXZVeaIZjlOsvJB3Alo3ZqqjgMha1vEB09iSebsHaEJ1OHhAbuIhkq4Tpr7XY9mgc PW3E4AJWXPJIzuRx/AEJn1axfCA39bwoaB4RWTojmhoBCZXRaCREAWUVCDmPUquyFisPb/VrdsAqNt xJqPsEkVYXCJUCdg7ao4JTbqdL/VUDXlyH1Od6w1vusL+byCeDYUQEmva+Uj1ausLo8WAfhH9sKuM0 WhYgvbMgZptysB49EZ6njWsV2i34Rtg==
X-Footer: ZGVuaXNiaWRlci5jb20=
Received: from localhost ([127.0.0.1]) by skroderider.denisbider.com with ESMTPSA (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256 bits)) for ietf-ssh@netbsd.org; Mon, 15 May 2017 12:34:51 +0100
Message-ID: <37769EE919F4477A8CF86F6CF05F7128@Khan>
From: "denis bider \(Bitvise\)" <ietf-ssh3@denisbider.com>
To: <ietf-ssh@netbsd.org>
Subject: RomSShell 5.40 client - any experience with key exchange issue?
Date: Mon, 15 May 2017 05:34:03 -0600
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="----=_NextPart_000_007C_01D2CD3C.DD0D64A0"
X-Priority: 3
X-MSMail-Priority: Normal
Importance: Normal
X-Mailer: Microsoft Windows Live Mail 16.4.3528.331
X-MimeOLE: Produced By Microsoft MimeOLE V16.4.3528.331
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>

This is a multi-part message in MIME format.

------=_NextPart_000_007C_01D2CD3C.DD0D64A0
Content-Type: text/plain;
	charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Hey everyone!

I=E2=80=99ve reached out to AllegroSoft, the developers of RomSShell, to =
see if they can help with this issue, but I can=E2=80=99t expect they =
will help. Sometimes people do, sometimes not.

So I=E2=80=99m wondering if any other SSH server developer has =
experienced this issue with the RomSShell client.

This is an SSH implementation that runs on resource constrained =
hardware, and to which I don=E2=80=99t have source code access. In our =
case, a user has provided us with information that suggests the =
following is happening:

- The RomSShell client connects to our server. SSH version strings are =
exchanged.

- KEXINIT packets are exchanged and diffie-hellman-group1-sha1 is =
negotiated. (That=E2=80=99s the only key exchange algorithm the client =
sends. Not sure if this version supports anything else. Perhaps not.)

- diffie-hellman-group1-sha1 key exchange occurs, and from the =
server=E2=80=99s perspective, is completed successfully. The server =
sends SSH_MSG_NEWKEYS and waits for the client.

- The client takes a good 25 seconds to think about what the server just =
sent. Then it replies with SSH_MSG_DISCONNECT, stating reason code =
SSH_DISCONNECT_PROTOCOL_ERROR, and description: =E2=80=9CNot expecting =
new keys message=E2=80=9D.

For comparison =E2=80=93 the client is able to connect to other SSH =
servers, such as OpenSSH; in which case it neither incurs a 25 second =
delay (the SSH handshake completes promptly) nor sends this protocol =
error message.

At this point, my first instinct is to try delaying SSH_MSG_NEWKEYS by a =
second or more, in case the client is not ready to receive NEWKEYS at =
the same time it=E2=80=99s processing the last DH key exchange message. =
However, I=E2=80=99m not sure how that would cause a 25 second delay =
before it sends DISCONNECT.

Does anyone else have experience with this client, and has resolved this =
issue?

denis


------=_NextPart_000_007C_01D2CD3C.DD0D64A0
Content-Type: text/html;
	charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<HTML><HEAD></HEAD>
<BODY dir=3Dltr>
<DIV dir=3Dltr>
<DIV style=3D"FONT-SIZE: 10pt; FONT-FAMILY: 'Arial'; COLOR: #000000">
<DIV>Hey everyone!</DIV>
<DIV>&nbsp;</DIV>
<DIV>I=E2=80=99ve reached out to AllegroSoft, the developers of =
RomSShell, to see if=20
they can help with this issue, but I can=E2=80=99t expect they will =
help. Sometimes=20
people do, sometimes not.</DIV>
<DIV>&nbsp;</DIV>
<DIV>So I=E2=80=99m wondering if any other SSH server developer has =
experienced this=20
issue with the RomSShell client.</DIV>
<DIV>&nbsp;</DIV>
<DIV>This is an SSH implementation that runs on resource constrained =
hardware,=20
and to which I don=E2=80=99t have source code access. In our case, a =
user has provided=20
us with information that suggests the following is happening:</DIV>
<DIV>&nbsp;</DIV>
<DIV>- The RomSShell client connects to our server. SSH version strings =
are=20
exchanged.</DIV>
<DIV>&nbsp;</DIV>
<DIV>- KEXINIT packets are exchanged and diffie-hellman-group1-sha1 is=20
negotiated. (That=E2=80=99s the only key exchange algorithm the client =
sends. Not sure=20
if this version supports anything else. Perhaps not.)</DIV>
<DIV>&nbsp;</DIV>
<DIV>- diffie-hellman-group1-sha1 key exchange occurs, and from the =
server=E2=80=99s=20
perspective, is completed successfully. The server sends SSH_MSG_NEWKEYS =
and=20
waits for the client.</DIV>
<DIV>&nbsp;</DIV>
<DIV>- The client takes a good 25 seconds to think about what the server =
just=20
sent. Then it replies with SSH_MSG_DISCONNECT, stating reason code=20
SSH_DISCONNECT_PROTOCOL_ERROR, and description: =E2=80=9CNot expecting =
new keys=20
message=E2=80=9D.</DIV>
<DIV>&nbsp;</DIV>
<DIV>For comparison =E2=80=93 the client is able to connect to other SSH =
servers, such=20
as OpenSSH; in which case it neither incurs a 25 second delay (the SSH =
handshake=20
completes promptly) nor sends this protocol error message.</DIV>
<DIV>&nbsp;</DIV>
<DIV>At this point, my first instinct is to try delaying SSH_MSG_NEWKEYS =
by a=20
second or more, in case the client is not ready to receive NEWKEYS at =
the same=20
time it=E2=80=99s processing the last DH key exchange message. However, =
I=E2=80=99m not sure how=20
that would cause a 25 second delay before it sends DISCONNECT.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Does anyone else have experience with this client, and has resolved =
this=20
issue?</DIV>
<DIV>&nbsp;</DIV>
<DIV>denis</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV></DIV></DIV></BODY></HTML>

------=_NextPart_000_007C_01D2CD3C.DD0D64A0--

