Re: [tcpinc] Eric Rescorla's Discuss on draft-ietf-tcpinc-tcpcrypt-09: (with DISCUSS and COMMENT)

Eric Rescorla <ekr@rtfm.com> Wed, 21 November 2018 21:59 UTC

Return-Path: <ekr@rtfm.com>
X-Original-To: tcpinc@ietfa.amsl.com
Delivered-To: tcpinc@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 20BC1130DC6 for <tcpinc@ietfa.amsl.com>; Wed, 21 Nov 2018 13:59:46 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.358
X-Spam-Level:
X-Spam-Status: No, score=-3.358 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_MED=-1.459, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=unavailable autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) 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 nM5O1c_FOBau for <tcpinc@ietfa.amsl.com>; Wed, 21 Nov 2018 13:59:44 -0800 (PST)
Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id D86D612F295 for <tcpinc@ietf.org>; Wed, 21 Nov 2018 13:59:42 -0800 (PST)
Received: by mail-lf1-x12e.google.com with SMTP id p17so5111288lfh.4 for <tcpinc@ietf.org>; Wed, 21 Nov 2018 13:59:42 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rtfm-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=T2SbONXAB20j/gX74LGer8T33OpejPKKRcd6Y9KLe6E=; b=0bLOdx1DMjSeIj/qsLvhDrqf77KTOzkH2jOG0R1t+5sBF+qbHmVgr55AZ3YNRMAO+0 B8ukuXU/KYNYrh4ATAyPdTwHKtpn3RhWH0QpaG/cAztm9MvJ9+0XixkDyZdHkyxwRod5 VoABoSJeuiCnV6h8kzfpz13rwnSKk25RBuqyeQO9X88tgSZuP5mrI+3LH35ZDjF36CoW jAohDAALeBG2Lz5udRmAD1l6vTYEuZ2JAQCuV8ss1bW5L+AQoEHl1VC7F8v/bamdAs5D BHsOpdNqNQctyTkUcJNY/C2KjmyBIAWI8MMSKRWdIIgYIjA6wJPNbQ1rG7l9JAGoYqxN Bacg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=T2SbONXAB20j/gX74LGer8T33OpejPKKRcd6Y9KLe6E=; b=kwxbPQ6BbNCB5yW/M+yp5sM8g1SZhjHz48xVTkYjFe2xRPGxfFJf6JtXuMRw2dSwhw vZ8kU5LcDcPxpOKkWrwKYoisVQ0qD6+/jrENqJiWkrKhYxD9p24Ae0bL1LZ61ESlV+1C BtZ/g5tSETdqEVc32Scdhaf6+UOsAkQpVBTiPB6YZsQGsGwU8E1Y3Lo+4CH04ArhGrha 92UA/EpaM3bO7PMHwtEqMfDUDzg9Pl2i3oMuheaUZI2kL3I0e5DT+pgcLnzFrrWgPktr vd6FF9A/3iXA8ig0hFCG5hdDvNsSqXYl4VChWQqYSNW11XjyUTZ5z4R6+639ANbjGnIm 29yg==
X-Gm-Message-State: AGRZ1gJCV6jo1jOWFihjJQxGMSrJ7II1yExjMHQTnduVYsj14j+//olc h08oLKYA07GHvL78T8IwJnYsJvsh6wD/Okh8QQ3Lbg==
X-Google-Smtp-Source: AJdET5dXSP7rWTeK3NVn3bK84icw7HiJsftYCuKf6Pty4ebLkBIJV0oisyiuyUzVbpCHO2/2el78jLHiu5hI1fB4tRw=
X-Received: by 2002:a19:54d7:: with SMTP id b84mr4643485lfl.131.1542837581063; Wed, 21 Nov 2018 13:59:41 -0800 (PST)
MIME-Version: 1.0
References: <CE03DB3D7B45C245BCA0D243277949362FD89888@MX307CL04.corp.emc.com> <20171128041124.GA42654@scs.stanford.edu> <CAJU8_nUx=k-nKLcrY0iVeSL7THCVARanZymWbTHaNbR+FKavPw@mail.gmail.com> <20171128223855.GE42654@scs.stanford.edu> <CAJU8_nUeTj2fwr4PAJ1T34uACHK=OnX1_OC3+UB9DomcvvcPMw@mail.gmail.com> <CABcZeBPe5_UhhmhiSBMGqYTfT7pyVhaeWXBOkw7CHRumghN57Q@mail.gmail.com> <8736skgjot.fsf@ta.scs.stanford.edu> <CABcZeBO6HRTCfkcNivnagjpxOhEvEvC5WeKFXOhdcHAnCc1tFw@mail.gmail.com> <87a7mp9din.fsf@ta.scs.stanford.edu> <CABcZeBNHxqU0k+jK61zTKoUmuY2V9tcgEZM9Y=R5RkciZjnXtQ@mail.gmail.com> <20181108211936.GA38291@scs.stanford.edu>
In-Reply-To: <20181108211936.GA38291@scs.stanford.edu>
From: Eric Rescorla <ekr@rtfm.com>
Date: Wed, 21 Nov 2018 13:59:04 -0800
Message-ID: <CABcZeBP_x91zXJv-F07ptxSduwWq-7va=_hpwW8J1sgDKMh5pA@mail.gmail.com>
To: Daniel B Giffin <dbg@scs.stanford.edu>
Cc: mazieres-nj788xtv7k4q4yq2nedg4eupms@temporary-address.scs.stanford.edu, tcpinc <tcpinc@ietf.org>, Kyle Rose <krose@krose.org>, tcpinc-chairs@ietf.org, "Black, David" <David.Black@dell.com>, IESG <iesg@ietf.org>, draft-ietf-tcpinc-tcpcrypt@ietf.org
Content-Type: multipart/alternative; boundary="000000000000f739f5057b33dd5d"
Archived-At: <https://mailarchive.ietf.org/arch/msg/tcpinc/A8AYXXpXH-wbpb0xu_1sAF7qzQo>
Subject: Re: [tcpinc] Eric Rescorla's Discuss on draft-ietf-tcpinc-tcpcrypt-09: (with DISCUSS and COMMENT)
X-BeenThere: tcpinc@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Working group mailing list for TCP Increased Security \(tcpinc\)" <tcpinc.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/tcpinc>, <mailto:tcpinc-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/tcpinc/>
List-Post: <mailto:tcpinc@ietf.org>
List-Help: <mailto:tcpinc-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tcpinc>, <mailto:tcpinc-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 21 Nov 2018 21:59:46 -0000

On Thu, Nov 8, 2018 at 1:19 PM Daniel B Giffin <dbg@scs.stanford.edu> wrote:

> Eric Rescorla wrote:
> [..]
> > I am not an EC expert, but my impression based on the discussion in TLS
> was
> > that checking for the zero value for X25519 was not sufficient defense
> > against malicious peers if you didn't use the 7748 computations, hence
> the
> > language in 8446. Do you believe otherwise?
>
> The draft currently says:
>
>    Key-agreement schemes ECDHE-Curve25519 and ECDHE-Curve448 use the
>    functions X25519 and X448, respectively, to perform the Diffie-Helman
>    protocol as described in [RFC7748].  Implementations MUST check
>    whether the computed Diffie-Hellman shared secret is the all-zero
>    value and abort if so, as described in Section 6 of [RFC7748].  [...]
>
> This requires, perhaps too gently, the (Montgomery ladder)
> algorithm in RFC 7748.
>

OK, I did not read it that way. It would be fine with me if you made this
sharper. I.e., "Implementations MUST use the Montgomery ladder as specified
in [RFC7748] and MUST check whether..."



> But it is not clear exactly what "additional checks" are
> required (reject all invalid keys?),


Yeah, I agree that this isn't maximally clear.


and for what purpose
> (ensure some "contributory behavior" property?)
>

Yes.


It seems the only observable difference would be that other
> algorithms might abort on some invalid DH inputs that the
> RFC 7748 algorithm accepts.
>
> So there are two orthogonal questions here:
>
> - Should tcpcrypt allow implementations that behave
>   differently from RFC 7748?
>
> - Given that tcpcrypt does not depend on any "contributory
>   behavior" property, is there any use in requiring DH input
>   validation?
>

See my response to David. Elsewhere we have been opting for belt and
suspenders.

-Ekr


> If other algorithms are allowed *and* input validation is
> required, it seems we will have to explain more clearly what
> validation entails.
>
> d
>
>