Re: [IPsec] Comments on draft-ietf-ipsecme-tcp-encaps

Eric Rescorla <ekr@rtfm.com> Sun, 19 March 2017 18:40 UTC

Return-Path: <ekr@rtfm.com>
X-Original-To: ipsec@ietfa.amsl.com
Delivered-To: ipsec@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 7FDE1129516 for <ipsec@ietfa.amsl.com>; Sun, 19 Mar 2017 11:40:49 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.598
X-Spam-Level:
X-Spam-Status: No, score=-2.598 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_LOW=-0.7, URIBL_BLOCKED=0.001] autolearn=ham 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 1HXCWJBKbEbU for <ipsec@ietfa.amsl.com>; Sun, 19 Mar 2017 11:40:46 -0700 (PDT)
Received: from mail-yw0-x22a.google.com (mail-yw0-x22a.google.com [IPv6:2607:f8b0:4002:c05::22a]) (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 A2085129511 for <ipsec@ietf.org>; Sun, 19 Mar 2017 11:40:46 -0700 (PDT)
Received: by mail-yw0-x22a.google.com with SMTP id o4so78686932ywd.3 for <ipsec@ietf.org>; Sun, 19 Mar 2017 11:40:46 -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=DjuYaKJkj3K55K//gMemqxBC7AjRsBSsfEsE3CoLoyA=; b=KfZIJO2i2hTz+8JGNq4I7PEOn9umjBMZa+3Gc1J5yFfMVfA4ARjsUZgA+3rgvybEDS 0BNsAR9rIfzaKHkgozFkFpEaJH3Z8tnywNnniOm62/+iZlkUxdNVy+aPjDrwH3viGJC3 XHIPU0CYJ1ndFd0z68Kc2/bM10rPy5y9HgPyjVtXtNkXaov92dPAOA8nwn7ZkoY5siLc bA0g/Gv5gGfT98TfLJ8j6J/SOwSV7NfAoK4Gph3Dh0sTL5y3A/h/rtsK32+KjhIboq3t zGi/CRR9aS8/zx3mxDQN/s9sC+eNjHbuBNqi/UedfQSdjDLRaiQbcJHxOXGwFmuJzjPQ fbkg==
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=DjuYaKJkj3K55K//gMemqxBC7AjRsBSsfEsE3CoLoyA=; b=B0jCZaUX+IPFgEU6h8EGegIykd2VNGX9NCc2Dk2mfCpm2o49G5u6+kQ5eIdCJCXDwt Q0dfnoR12yfIsWYXaf+a9G6IOGmfNo6iktZxMsaTf/AbWMOmpjbl3cuvEhBJjLo208iW /yvZxKYRWbAXC/6fzlZTONahvnNlPCiWhIB3UMh+38sEzbXULSSYF4ipPv2FxGSdFUnb VVk/Rv1Wr57wiuXFSoE+OSuik+vxcukF+xjjiLdZl79zm2T6A3hp5TrCokaiHQUZnrkI 8BaqFbKi4rq/18T1v9iaG0L6ePouohFQHtlxbElh2hiTS5TimfXmHJgkHb45TqRorrnq CxMA==
X-Gm-Message-State: AFeK/H2Ht4Kkoa/qCVHJcYnbLgwPkqapiG8qaLLdYDsNEr7psy585VUM304P/wG/MD4zRrOzlHR4JSgPr/j1jg==
X-Received: by 10.129.152.22 with SMTP id p22mr12471749ywg.276.1489948845893; Sun, 19 Mar 2017 11:40:45 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.129.154.210 with HTTP; Sun, 19 Mar 2017 11:40:05 -0700 (PDT)
In-Reply-To: <08CAB6F1-EA5C-4FA6-A9E9-1D7A87997470@apple.com>
References: <CABcZeBPMR9m8zPdhG4Bc3DHWj9UmVq22Z7G4ApYjBGJeC7MU=A@mail.gmail.com> <A5D592C8-AEE0-4675-88AE-0064FD52B49B@gmail.com> <CABcZeBPiZmWBJEW5PYFDafS_v3dumEkS285MAifme85-ziu=ig@mail.gmail.com> <08CAB6F1-EA5C-4FA6-A9E9-1D7A87997470@apple.com>
From: Eric Rescorla <ekr@rtfm.com>
Date: Sun, 19 Mar 2017 11:40:05 -0700
Message-ID: <CABcZeBM-83Q-j=VEQahJPer4w=Cve1h2seJRquZsrdhnXj1JqQ@mail.gmail.com>
To: Tommy Pauly <tpauly@apple.com>
Cc: Yoav Nir <ynir.ietf@gmail.com>, ipsec@ietf.org, draft-ietf-ipsecme-tcp-encaps@ietf.org
Content-Type: multipart/alternative; boundary="94eb2c0b8fb4b17ee1054b19bf29"
Archived-At: <https://mailarchive.ietf.org/arch/msg/ipsec/DxcHVl80xf4bMkfmv_SZN4InY_c>
Subject: Re: [IPsec] Comments on draft-ietf-ipsecme-tcp-encaps
X-BeenThere: ipsec@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: Discussion of IPsec protocols <ipsec.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ipsec>, <mailto:ipsec-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/ipsec/>
List-Post: <mailto:ipsec@ietf.org>
List-Help: <mailto:ipsec-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ipsec>, <mailto:ipsec-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sun, 19 Mar 2017 18:40:49 -0000

I haven't fully thought this through, but if yu can switch-hit between TCP
and UDP,
why can't you just race the setup between TCP and UDP and then if you start
getting packets on UDP, cut over to that.

Maybe I'm just too influenced by ICE :)

-Ekr


On Sun, Mar 19, 2017 at 11:25 AM, Tommy Pauly <tpauly@apple.com> wrote:

>
> On Mar 19, 2017, at 6:47 AM, Eric Rescorla <ekr@rtfm.com> wrote:
>
>
>
> On Sat, Mar 18, 2017 at 11:29 PM, Yoav Nir <ynir.ietf@gmail.com> wrote:
>
>> Hi, Eric.
>>
>> On 19 Mar 2017, at 4:04, Eric Rescorla <ekr@rtfm.com> wrote:
>>
>> [Now with the right address]
>>
>> I just finished reading this document. Some comments below.
>>
>>
>> - You have a uniform 16 bit length field followed by a 4 byte all-zeros
>>    sentinel value to indicate that a packet is IKE rather than ESP.
>>    Given that in S 3 graf 2 you have a SHOULD-level requirement
>>    to use typical UDP payload lengths, why not instead explicitly
>>    limit lengths to 15 bits and use the top bit to indicate IKE versus
>>    ESP. This would be slightly more efficient and seems simpler.
>>    I suppose that the counterargument is that IKE over UDP behaves
>>    differently, but in terms of implementation, that doesn't seem like
>>   much of an argument.
>>
>>
>> Another counter-argument is that we sometimes need the entire theoretical
>> length of a UDP packet. The IKE_AUTH messages typically carry a certificate
>> chain and sometimes even a CRL. And there is no way to split a certificate
>> chain over several messages. With remote access VPN you also get a CFG
>> payload with configuration information that can also encode an unbounded
>> amount of data. So I would not want to constrain the certificate chains
>> that we are able to send any more than the IP packet length already does.
>>
>
> OK.
>
>
>
> Early on there was a proposal to increase the length field to 4 bytes to
>> do away with these IKE limitations, but that was rejected.
>>
>> - If you're going to have a framing disambiguator, why not choose
>>   one that has higher entropy. If there is a protocol with a random
>>   start, then you are going to get some collisions with 2^48 bits.
>>
>>
>> I don’t think anyone plans to implement this on any port other than 443.
>> And on that port we’re worrying about exactly one protocol and it doesn’t
>> start with “IKETCP"
>>
>
> Fair enough.
>
>
>> - It seems like IKE associations can span TCP connections (S 6)
>>   so why not instead of doing UDP first then TCP, do happy eyeballs.
>>
>>
>> I don’t think it’s necessary to prescribe for or against this, but that
>> is what we do, and I think that is what Apple intends to do.
>>
>
> Right, but the text here actively discourages this.
> https://tools.ietf.org/html/draft-ietf-ipsecme-tcp-encaps-09#section-5.1
>
> "   to reduce connection setup delays. It is recommended that theinitial
> message over UDP is retransmitted at least once before falling back to TCP,
> unless the Initiator knows beforehand that the   network is likely to block
> UDP."
>
>
> There's a tradeoff here between the Happy Eyeballs approach and the
> long-term benefits of choosing one option. I'm definitely a big proponent
> of Happy Eyeballs between address families, interfaces, and protocol
> options in general. However, these IKE connections will often be long-lived
> and tunnel a large amount of traffic used for many different applications.
> Since we view tunneling over UDP as so much preferable to tunneling over
> TCP, we want to weight the race more heavily in UDP's favor. The draft does
> not specifically say that attempts over UDP are ceased once the TCP attempt
> has begun, so there is room to keep 'racing' at this point. The main point
> we wanted to get across is that UDP should be given a fair shot, since it
> should be the preference.
>
> Note that a Happy Eyeballs approach should always have one option be
> attempted first anyhow, since simultaneous racing just adds extra load to
> the network and servers.
>
> Thanks,
> Tommy
>
>
> " when TLS is used on the TCP connection, both the TCP Originator and TCP
>> Responder SHOULD allow the NULL cipher to be selected for performance
>> reasons."
>>
>> This seems like you are going to have some problems with TLS 1.3
>>
>> - If you are going to use TLS, shouldn't you be using ALPN?
>>
>>
>> The idea of using TLS (rather than just IKE on port 443) is to get past
>> firewalls and IDP that examine the TCP traffic to determine that it “really
>> looks like HTTPS”. There was some discussion about whether this was a good
>> idea or whether we should in such a case either give up or standardize some
>> kind of SSL-VPN. There was no consensus to go with SSL-VPN in either this
>> group or any other (there was a bar bof a few IETFs ago)
>>
>
> OK. You're still going to have a problem with 1.3...
>
> -Ekr
> _______________________________________________
> IPsec mailing list
> IPsec@ietf.org
> https://www.ietf.org/mailman/listinfo/ipsec
>
>
>