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

Eric Rescorla <ekr@rtfm.com> Sat, 18 November 2017 23:33 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 7267D126C2F for <tcpinc@ietfa.amsl.com>; Sat, 18 Nov 2017 15:33:31 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, 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 8VjlA9FBcyB3 for <tcpinc@ietfa.amsl.com>; Sat, 18 Nov 2017 15:33:28 -0800 (PST)
Received: from mail-yb0-x231.google.com (mail-yb0-x231.google.com [IPv6:2607:f8b0:4002:c09::231]) (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 631061242F7 for <tcpinc@ietf.org>; Sat, 18 Nov 2017 15:33:28 -0800 (PST)
Received: by mail-yb0-x231.google.com with SMTP id y14so1763529ybi.0 for <tcpinc@ietf.org>; Sat, 18 Nov 2017 15:33:28 -0800 (PST)
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=xSI97JZL93/LzDmzb4emC3H3oE2uXQywPRyPg8QUaT4=; b=g57PbViF7SqUJs9Wo8kDqWXYRQ/CctYcHExG3ia4zTSojWBHjG0j+LBmLhA5vxErQI kfqs3CGelP9oPK0l9Gg4en5CfG+k5/0b13QhGwgMIyhNTFZ3UX+6v99iWAfIOpLTlWnW 1GiFE9jE+rOvpKBs1TzraMbTSfjyeqfwGfvpuqSzS4xMfNr8nLToREFZlqcTrlptcBLL CF8u3SdMtzbNgcXU/x4o+DnMIub6bBRLUaBP1uVB1Pxcy/iClPx68RBYEn/qWvOoLCSU aOTl09dOGw7L+w+3dx325DlyX8po/an6eTOhycSTMVsjspjlnz8Mj6GG0qTdlTZTlJtf VZUA==
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=xSI97JZL93/LzDmzb4emC3H3oE2uXQywPRyPg8QUaT4=; b=FDBk3gAQOtdk6TO/1wSMSkkJIzjjvHcpz9vUcfCW2LtFy2Fd8oMbGkognTTWThbsUQ nWkSjTU84n4eo5RcXtd1+IoqKc1LLU4XXmK4e0IPQdJP+QTRtZl3KNhcz3BvLoLUwG3a LiWMXOcyfA47ACa3L2XdLIg4VBG/5/KH0F05BurVr4p/Mc4jbEqlkwmEIyzQV1zmMv4A rfSbfk8xCd/JT2RH8SAKFs77Iu58lOPZ7SK198B/m2GhDHMYYSKnSmTQkBYkByCRIRZV 4DzeA7W+RJ/PeZ8Zh9XPZFQVtg54xnctoH+a9xwdt+Y88OFqh8xOSgXI5NGK0vnoOg2y 4+Iw==
X-Gm-Message-State: AJaThX4xga7Vm15f8GRzOwjNu8UI/zydwsiYsMxDejjqxjpYtPUkcyvP hEGTiglkHfgEJBtvGkEwD96c2uKJkxUS9vKZwSrsNw==
X-Google-Smtp-Source: AGs4zMYE9mmmX+NDqkGiFGMc1+WB9z6cJFDlDr7y6uEnTC7jg0tAn5gusMwxiwza9BH6Hv0/mmHjkjdxo3hn1MXs/gg=
X-Received: by 10.37.13.4 with SMTP id 4mr6071929ybn.416.1511048007398; Sat, 18 Nov 2017 15:33:27 -0800 (PST)
MIME-Version: 1.0
Received: by 10.129.123.132 with HTTP; Sat, 18 Nov 2017 15:32:46 -0800 (PST)
In-Reply-To: <20171117121703.GE57159@scs.stanford.edu>
References: <151036992713.398.18032326140786383584.idtracker@ietfa.amsl.com> <20171117121703.GE57159@scs.stanford.edu>
From: Eric Rescorla <ekr@rtfm.com>
Date: Sun, 19 Nov 2017 07:32:46 +0800
Message-ID: <CABcZeBOas6FqCC0rwgvBvMZTJRhX4adfK1TytPY2W4TKL6PyUw@mail.gmail.com>
To: Daniel B Giffin <dbg@scs.stanford.edu>
Cc: The IESG <iesg@ietf.org>, draft-ietf-tcpinc-tcpcrypt@ietf.org, Kyle Rose <krose@krose.org>, tcpinc-chairs@ietf.org, tcpinc <tcpinc@ietf.org>
Content-Type: multipart/alternative; boundary="001a11c04faeb84c17055e4a4709"
Archived-At: <https://mailarchive.ietf.org/arch/msg/tcpinc/2RXJi1haUY__-JwrOYsRwL--UjQ>
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.22
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: Sat, 18 Nov 2017 23:33:31 -0000

As it happens, I was able to take a look. Several notes from my review:

- Not all algorithms take a 12 byte nonce, so you probably want to allow
some generality
here.
- I'm not sure you still need the NONCE_MAGIC value.
- Do you want to cover SACK in the section about how you handle
deprotection failures.

On Fri, Nov 17, 2017 at 8:17 PM, Daniel B Giffin <dbg@scs.stanford.edu>
wrote
>
> > Given that you are allowing P-256 and point reuse, you
> > should be requiring point validation. See:
> > https://tlswg.github.io/tls13-spec/draft-ietf-tls-tls13.
> html#rfc.section.4.2.8.2
> > https://tlswg.github.io/tls13-spec/draft-ietf-tls-tls13.
> html#elliptic-curve-diffie-hellman
>
> Yes, thank you.  For the NIST curves, I have added:
>
>         Implementations MUST validate these "pubkey" values according to
> the
>   algorithm in [ieee1363] Section A.16.10.
>
> But I see that TLS refers to ANSI X9.62 for validation, even
> though it refers to IEEE1363 for DH computation.  Is there a
> good reason not to stick with the one source?
>

TBH, not sure. Filed an issue on TLS for that.


> Also, I guess there's no need to check on-the-curve if we
> allow only compressed format, and it's not perfectly clear
> to me whether we need to check group membership, but I'd
> really rather not have all these details in this document if
> there's a good way to cite it out.
>

I think your text is fine.


> You should probably also be requiring Curve25519 output validation.
>
> I think you're saying we should check that the DH result is
> not zero?
>
> No harm, I suppose, but I'm going to try to get guidance on
> whether it's necessary.
>

It's the way we're going in the security area. Is there some reason not to.



> > ----------------------------------------------------------------------
> > COMMENT:
> > ----------------------------------------------------------------------
> >
> >
> > The design of session resumption here essentially precludes doing
> > tcpcrypt resumption across servers (as one does with TLS) because you
> > need extremely tight control of ss[i] or you have catastrophic
> > results. Was this a deliberate choice by the WG?
>
> I think it's a choice to keep key material in the kernel and
> to have control over forward secrecy.
>

See my separate note on this topoic.



>
> >    suboption containing the TEP identifier and "v = 0".  In order to
> >    propose session resumption (described further below) with a
> >    particular TEP, a host sends a variable-length suboption containing
> >
> > It would be clearer if you explained resumption here.
> >
> >           PRK = Extract(N_A, eno-transcript | Init1 | Init2 | ES)
> > What is the rationale for providing N_A as the salt to HKDF-Extract,
> given that
> > you also supply N_A in the Init1 message?
>
> I'm not qualified to say.  I agree it seems "redundant", but
> it appears to achieve what it needs to.  Perhaps we can find
> a more satisfying answer for you ...
>

I agree it's harmless, but I'd be interested.


-Ekr