Re: [Curdle] Second AD Review: draft-ietf-curdle-ssh-curves.

Benjamin Kaduk <kaduk@mit.edu> Mon, 12 August 2019 22:52 UTC

Return-Path: <kaduk@mit.edu>
X-Original-To: curdle@ietfa.amsl.com
Delivered-To: curdle@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 63A18120C5C for <curdle@ietfa.amsl.com>; Mon, 12 Aug 2019 15:52:08 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.199
X-Spam-Level:
X-Spam-Status: No, score=-4.199 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=unavailable 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 7H9VNve1Fxaa for <curdle@ietfa.amsl.com>; Mon, 12 Aug 2019 15:52:06 -0700 (PDT)
Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) (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 7C238121331 for <curdle@ietf.org>; Mon, 12 Aug 2019 15:28:01 -0700 (PDT)
Received: from kduck.mit.edu ([24.16.140.251]) (authenticated bits=56) (User authenticated as kaduk@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id x7CMRtmo013478 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 12 Aug 2019 18:27:58 -0400
Date: Mon, 12 Aug 2019 17:27:55 -0500
From: Benjamin Kaduk <kaduk@mit.edu>
To: Ron Frederick <ronf=40timeheart.net@dmarc.ietf.org>
Cc: Mark Baushke <mdb=40juniper.net@dmarc.ietf.org>, curdle <curdle@ietf.org>
Message-ID: <20190812222754.GE88236@kduck.mit.edu>
References: <CABcZeBM1xaLR2RqYo8_VmO1ue2qr3rn_52MhSDHagKhNF-AYQA@mail.gmail.com> <20190730214702.GS47715@kduck.mit.edu> <31257.1564525402@contrail-ubm16-mdb.svec1.juniper.net> <20190730231321.GU47715@kduck.mit.edu> <CADZyTk=9-pJ8mkwKSDMcZtN2DfD=C2OBDSm6v2pcvp-J2hekqg@mail.gmail.com> <0D4BB5A9-5E34-4038-BD5B-1EE63A67447D@juniper.net> <7859169F-D86B-4027-B060-6BAA6FD6CA6A@timeheart.net>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <7859169F-D86B-4027-B060-6BAA6FD6CA6A@timeheart.net>
User-Agent: Mutt/1.10.1 (2018-07-13)
Archived-At: <https://mailarchive.ietf.org/arch/msg/curdle/FK6n3LtpwHPctrYauNpv4aN7iVM>
Subject: Re: [Curdle] Second AD Review: draft-ietf-curdle-ssh-curves.
X-BeenThere: curdle@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "List for discussion of potential new security area wg." <curdle.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/curdle>, <mailto:curdle-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/curdle/>
List-Post: <mailto:curdle@ietf.org>
List-Help: <mailto:curdle-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/curdle>, <mailto:curdle-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 12 Aug 2019 22:52:09 -0000

On Sun, Aug 04, 2019 at 09:51:51AM -0700, Ron Frederick wrote:
> Hi Mark,
> 
> On Aug 3, 2019, at 2:52 PM, Mark Baushke <mdb=40juniper.net@dmarc.ietf.org> wrote:
> > I have updated and uploaded the draft. Please let me know of any issues.
> 
> 
> Here are a few thoughts on version 9 of the draft:
> 
> In section 3, you say “Key-agreement schemes Curve25519 and Curve448”, but these algorithms are not key-agreement schemes by themselves. I’d recommend going with the proposed SSH names here if you are discussing the full key agreement scheme and not the underlying elliptic curve algorithms. In other words, I’d suggest “Key-agreement schemes curve25519-sha256 and curve448-sha512” (possibly with quotes around each), as done earlier in this section.

That seems like a good suggestion, thanks.

> When detecting the all-zeroes value, the new text says it should “abort if so, as described in Section 6” of RFC 7748. However, the original RFC doesn’t actually define what “abort” means. It says “abort if so (see below)”, but I don’t know what that is referring to. The only mention of “abort” is in sections 6.1 and 6.2, and nothing in section 7 seems to really expand on what should be done if the all-zeroes check matches. This is more a fault of RFC 7748 than it is of this doc, but since you are now recommending to “abort” in this doc, it would be good to be more specific about what that means for an SSH client/server.

My read of 7748 is that the "(see below)" refers to the following
paragraph, and is intended to expound on the all-zero check, not the act of
aborting.  Note that the second usage of "abort" does not have a "see
below" note, which leads one to suspect that the referenced content is
between the two mentions.  It's probably okay for 7748 to be fairly generic
about what "abort" means, since it's just defining the curves and not a
protocol using them; for our usage in ssh it may suffice to make a brief
reference to normal SSH error handling procedures.

> I’m also not sure the sentence about “Alternative implementations” of these functions. There isn’t a lot of clarity on how one would determine in an alternate implementation when “either input forces the shared secret to one of a small set of values”. Since this point is covered already in RFC 7748 and this doc says “No further validation is required beyond what is discusses in RFC 7748”, though, I think it might be better to just leave this out.

This is a recurring point of mild contention, whether to insist on a
specific algorithm for performing group operations or just describing the
group operations needed and the security considerations of using
implementation algorithms other than the one specified.  The mathematician
in me is fine with specifying the curves using just the abstract
mathematical description and noting that small-subgroup attacks exist, but
I recognize that there are protocol-design considerations in nailing the
procedure down tightly (at the cost of reducing implementation
flexibility).  While I'm pretty sure we have precedent in the IETF for both
general approaches, I'm inclined to accept the "proven language from
tcpcrypt" for now; there's always a chance the IETF LC and/or IESG will
want to chime in, too.


Given all that, I think it's okay to start the IETF LC, and we can wrap any
changes in response to these comments up along with any other IETF LC
comments.

-Ben