Re: [Hipsec] Adam Roach's Abstain on draft-ietf-hip-native-nat-traversal-28: (with COMMENT)

Miika Komu <> Fri, 04 October 2019 12:15 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 1D9DB12086F; Fri, 4 Oct 2019 05:15:18 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -2.002
X-Spam-Status: No, score=-2.002 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: (amavisd-new); dkim=pass (1024-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id iLYDRvFtPKZt; Fri, 4 Oct 2019 05:15:14 -0700 (PDT)
Received: from ( [IPv6:2a01:111:f400:fe0a::61a]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 9AF3B120819; Fri, 4 Oct 2019 05:15:10 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901;; cv=none; b=RiH6qSzOi1NEBTmf8pXzIpgTkb/wzINGki7sOgJg7xRnpjsTeYb2Rsa8SwqI3HkU4mKwe2HzBC9y7igBK/CHjrF0xNwnf2FfP/RXi6QQqOkl399C1vWbrCN1UBHLqc8bSKf5CuOJqhL08m+PGnQThVB5wuRanyg3Si88zpZMouLiON/hqyXVUw/GHdWpyTb6ege7du9dEOqx7HGftjBC5XK4RMQRpCgkTYGTjxF8w50geUsgiYTsV+YyuCxK8wcngGTmP0rYJ1XzXaE2RopJjU9jNJ41cKYeQXvOQLrwCl4KWjKUZkGdX/ams7GB7vOQtgABN+VAfN0+0xWepdvIjw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed;; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2fjDGKU6wCNgh4GL9lXORZ29lZkg5bEVL51focoOk4Y=; b=aCw2UdVU5JDPq9PGWyA+9J7oguQbBQ7EYrHJp6A/rLgEpvFVbLTKYZmVjt7PlTy3S8lsIUFcwStbaUfV6gyC01SjhiS3KZtaONF1RWAIR4fiBQ4F5xzzFKo8rHA8W0dsPGXB9gV+A0sEvlg3mc/kOACZXO4SiBBAIXRMpnPeANgee5GxzJyBOX3b2pt5fAJxGgz1wBx0GHu4sJ9I8bcoOUFhJE/H0hy/jym2WcLTwCqCNBOTLXp1acAVT68s07pcb+PwpmlKtYjAyfo0Zdp5tnNjoJhEyuIaAZgakca4ep3y5n6WCPXtc4EC3SyVJzzeH1IoJN9jLKJFq2zgE47DZw==
ARC-Authentication-Results: i=1; 1; spf=pass; dmarc=pass action=none; dkim=pass; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2fjDGKU6wCNgh4GL9lXORZ29lZkg5bEVL51focoOk4Y=; b=TXhn4waFivhAAiQJRrhi9I326kK2KU4mnomEp1KPoF5WKy4Dw7kTqjZbwbnwtmg9X0zkAmt93NVQOSTTD6HxWARN3UcO+AkotbjXo8p+BGw9R6dGTwkpFLcs8PNCXLYyg6F8QQ4sbBee9wtBOn/gFrRH+aPQ4ImcSOItgZDH5Ew=
Received: from ( by ( with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2347.11; Fri, 4 Oct 2019 12:15:06 +0000
Received: from ([fe80::39ef:7c80:2d89:7109]) by ([fe80::39ef:7c80:2d89:7109%7]) with mapi id 15.20.2305.023; Fri, 4 Oct 2019 12:15:06 +0000
From: Miika Komu <>
To: "" <>, "" <>
CC: "" <>, "" <>, Gonzalo Camarillo <>, "" <>
Thread-Topic: Adam Roach's Abstain on draft-ietf-hip-native-nat-traversal-28: (with COMMENT)
Thread-Index: AQHT6CHKxJGk6D4vYUWGYDWUcPde1qdNinKA
Date: Fri, 4 Oct 2019 12:15:06 +0000
Message-ID: <>
References: <>
In-Reply-To: <>
Accept-Language: fi-FI, en-US
Content-Language: en-US
x-mailer: Evolution 3.28.5-0ubuntu0.18.04.1
authentication-results: spf=none (sender IP is );
x-originating-ip: []
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 821db5d8-32cb-4438-c291-08d748c47e5a
x-ms-traffictypediagnostic: HE1PR0702MB3803:
x-ms-exchange-purlcount: 2
x-ms-exchange-transport-forked: True
x-microsoft-antispam-prvs: <>
x-ms-oob-tlc-oobclassifiers: OLM:10000;
x-forefront-prvs: 018093A9B5
x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(346002)(396003)(136003)(366004)(39860400002)(376002)(199004)(189003)(316002)(66574012)(66066001)(81156014)(81166006)(110136005)(54906003)(6512007)(6306002)(50226002)(3846002)(8936002)(6116002)(4326008)(76116006)(6246003)(256004)(66556008)(71200400001)(64756008)(71190400001)(66446008)(66476007)(66946007)(14444005)(118296001)(8676002)(2906002)(86362001)(478600001)(2501003)(7736002)(305945005)(966005)(25786009)(5660300002)(30864003)(229853002)(14454004)(446003)(26005)(11346002)(6506007)(186003)(476003)(2616005)(102836004)(6486002)(99286004)(36756003)(76176011)(486006)(6436002)(44832011)(99106002); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR0702MB3803;; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1;
received-spf: None ( does not designate permitted sender hosts)
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: 1+FLA/WDww/rg3p9+Mb9C6VFA8eS3DRAeYf4Fu0zYH8Uet+2OavO2Bh74rlZh7011a9frLXwRGaI9cYj3UZN5yuzg6lySvF9Dy+Q0r1jK2YY2reRh7lVnxaVFrp2CxMuS0r5nsmA5hVWC7J6ghqlE83N1cCq1DmQcJLpquiAiXVkJKuYZ/0mPrVnP5m0iziS4k9QeSk7qz5+NDZftOKURQB4bNFyJISTIZuhGnIyZdh1Uw0H71jzHhZyZ7yLqDP0mQLAvq48oWZuE0PBSPRdngz+x5ZN1h8GV/xu4lKZ2/wiVj4+owuljQqd8ZEMq2lwTgE8cPKkbe85EE3TEjNa+5e5jHzoGSzQjvPJw9eRIL7NDzvK/1UnPdPlFDJZIQOVejusWz4ZNxDorb5GnGXi4VNBeNrSLL/+O7nRlUWKXUUz2QzYAh+athxUISY7IIhmKG39rw1HcZ/uZqJaQTWxJw==
Content-Type: text/plain; charset="utf-8"
Content-ID: <>
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-MS-Exchange-CrossTenant-Network-Message-Id: 821db5d8-32cb-4438-c291-08d748c47e5a
X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Oct 2019 12:15:06.4692 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 92e84ceb-fbfd-47ab-be52-080c6b87953f
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: T+ZkMOAqczsoFYAqvDlIM8nn9++auDCgThRyulLsSFfMNKLVju0/UFdZn+jrrf/ZtM2ImRrVBkA8sLnlRYvfVw==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0702MB3803
Archived-At: <>
Subject: Re: [Hipsec] Adam Roach's Abstain on draft-ietf-hip-native-nat-traversal-28: (with COMMENT)
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "This is the official IETF Mailing List for the HIP Working Group." <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Fri, 04 Oct 2019 12:15:18 -0000

Hi Adam,

ke, 2018-05-09 kello 22:43 -0700, Adam Roach kirjoitti:
> Adam Roach has entered the following ballot position for
> draft-ietf-hip-native-nat-traversal-28: Abstain
> When responding, please keep the subject line intact and reply to all
> email addresses included in the To and CC lines. (Feel free to cut
> this
> introductory paragraph, however.)
> Please refer to 
> for more information about IESG DISCUSS and COMMENT positions.
> The document, along with other ballot positions, can be found here:
> -------------------------------------------------------------------
> ---
> -------------------------------------------------------------------
> ---
> I share Ben's concerns about the disjointedness of this document's
> specification, and am likewise abstaining. My reasons for abstaining
> are
> deeper than Ben's, however.
> I recognize that the effort put into this document is substantial,
> and that
> the recommendations I make are unlikely to be taken at this point in
> time,
> but I believe that the HIP ecosystem would be far better served by an
> "RFC
> 5570 bis" approach rather than a modified form of ICE recast using
> messages. Among other reasons: several companies already offer
> geographically-distributed hosted TURN solutions, largely due to the
> relative
> popularity of WebRTC. HIP will have to reach a similar level of
> popularity
> before HIP-specific relay nodes are similarly commercially
> available.  Using
> ICE as-is would allow HIP to use those services that are available
> today.

nothing prevents from using TURN relays with the native NAT traversal
mode as only the host using TURN relay needs to implement TURN.

> As a further concern, I worry that this pattern may end up replicated
> in other
> protocols. For example, although ICE was initially developed with
> mind, it was not implemented as a series of extensions to RTP or
> instead, it is its own protocol, intended to be re-used in other
> contexts. I
> would not like to see, e.g., ICE-like extensions to the QUIC protocol
> to enable
> its use in peer-to-peer situations; I would certainly hope that such
> an effort
> would use ICE as currently defined.

I think the justification is only related to IPsec keying daemons,
please see below.

> Given that the headline rationale offered in this document is that
> "Implementing a full ICE/STUN/TURN protocol stack as specified in
> Legacy
> ICE-HIP results in a considerable amount of effort and code which
> could be
> avoided by re-using and extending HIP messages and state machines for
> the same
> purpose," this document puts forth an implication that all protocols
> could
> benefit from similar not-quite-ICE-but-almost-ICE extensions. I
> believe
> this implication is harmful. I also believe this analysis overlooks
> the
> availability of multiple existing, open-source, already-debugged, and
> "compatible with commercial use" ICE implementations.

the protocol that we specify in the document implements only a subset
of ICE and there I belive it should be relatively straighforward to
interop it.

ICE has not been designed with IPsec in mind (see my comments below),
so something else is needed.

> It is not clear that the four additional reasons offered in Appendix
> B are
> sufficient to justify the design. Taken in turn:
> >  For example, ICE is meant for application-layer protocols, whereas
> > HIP
> >  operates at layer 3.5 between transport and network layers.
> This doesn't have practical effect: ICE is designed to work with
> generic UDP
> packet flows, subject only to the ability to demultiplex STUN from
> such
> packets.
> >  This is particularly problematic because the implementations
> > employ IPsec
> >  ESP as their data plane: demultiplexing of incoming ESP, HIP and
> > TURN
> >  messages required capturing of all UDP packets destined to port
> > 10500 to
> >  the userspace, thus causing additional software complexity and an
> >  unnecessary latency/throughput bottleneck for the dataplane
> > performance.
> This doesn't seem like a foregone consequence. If you're using user-
> space HIP
> implementations, this user-space diversion is already necessary. If
> you're
> using kernel-space HIP implementations, it seems a modest step to add
> minimal
> STUN demultiplexing to the kernel implementation that is already
> performing
> ESP/HIP demultiplexing.  It's possible that I'm misunderstanding some
> subtle
> aspect of the way these protocols interact with each other, but isn't
> this
> described performance impact simply the result of specific
> implementation
> design decisions rather than inherent to the design of RFC 5570's
> mechanism?

the userspace diversion is completely unnecessary in the native NAT
traversal draft. HIP control packets have a special encoding following
RFC7401 conventions that allows the IPsec kernel module to pass the
non-ESP packets to userspace (i.e. to HIP userspace dameon). ESP
packets do *not* need any diversion.

In the legacy HIP NAT traversal (RFC5770), we have third protocol
(STUN) on the same port and it does not follow RFC7401 conventions
because it was not designed with IPsec in mind. As a result, *all*
packets need to be diverted to an userland daemon in order to separate
the STUN packets from HIP/ESP. All packets means also the data
plane,i.e., ESP data packets...

I spent half a day to find legacy HIP ICE measurements from around 20
master theses and publications. Unfortunately, I did not find exact
match but I would argue that the so called LSI translation has a
similar overhead as parsing the STUN packets. Based on the peer reviwed
publication below, dealing with STUN (or LSI) with userspace daemon and
iptables-queue target has roughly 40 % performance penalty on latency
and 12 % penalty on throughput (with TCP traffic). So the impact on
latency is IMHO unacceptable.

Lirim Osmani, Salman Toor, Miika Komu, Matti J. Kortelainen, Tomas
Lindén, John White,
Rasib Khan, Paula Eerola, Sasu Tarkoma, "Secure Cloud Connectivity for
Scientific Applications",
special issue on Cloud Services Meet Big Data of the IEEE Transactions
on Services Computing, 2015

> >  Also, relaying of ESP packets via TURN relays was not
> >  considered that simple because TURN relays require adding and
> >  removing extra TURN framing for the relayed packets.
> While it's been a while since I've looked at network kernel code, my
> recollection is that implementation of the POSIX "sendmsg()" system
> call
> generally maintains scatter/gather buffers all the way down the stack
> until
> such bytes are copied from system memory to the network hardware.
> Stripping
> such headers on receipt can be accomplished with simple pointer
> arithmetic.
> It's not clear what aspect of the system "simple" is intended to
> refer to, but
> both implementation and performance impacts should be immeasurably
> small when
> implemented in this way, unless I'm missing something.

The extra TURN framing means that there will be extra context switching
at the endpoints because it needs to be handled in the userspace
(=additional latency, lower bandwidth, smaller MTU).

With an ESP relay (as specified in native NAT traversal) you don't need
any framing at all and all the ESP processing can be done as if no
relay was used.

> >  Finally, the developers of the two Legacy ICE-HIP implementations
> > concluded
> >  that "effort needed for integrating an ICE library into a HIP
> >  implementation turned out to be quite a bit higher that initially
> >  estimated.  Also, the amount of extra code (some 10 kLoC) needed
> > for all
> >  the new parsers, state machines, etc., is quite high and by re-
> > using the
> >  HIP code one should be able to do with much less.  This should
> > result in
> >  smaller binary size, less bugs, and easier debugging.".
> Such size is not inherent in the implementation of ICE: for example,
> the ICE
> stack used by Firefox is 2.2 kLoC in size (if you ignore the ~1.2
> kLoC of
> boilerplate copyright notice). Having seen the debugging of an ICE
> stack
> up-close-and-personal, I'm pretty comfortable saying that the effort
> to
> integrate a working stack has to be orders of magnitude less than
> implementing
> even the simplified ICE procedures defined in this document
> correctly. There
> are a lot of surprising corner cases that don't really turn up until
> you get
> into production.

surely, the corner cases are documented in the ICE specification for
new ICE implementations.

> For the foregoing reasons, it is my conclusion that publication of
> this
> document is harmful for HIP and is harmful as a precedent that other
> protocols
> may mistakenly emulate. I believe that a restructuring of the
> document to more
> clearly explain why HIP chose this path while other protocols should
> not would
> limit some of these concerns. However, I do not believe that the
> fundamental
> flaw -- a partial respecification of ICE for the cited reasons
> --  can be
> fixed. I do not support publication of a document describing this
> mechanism,
> and encourage the working group to withdraw the document from
> consideration
> for publication.

The technical points are:
1. Using ICE-as-is reduces performance considerably for IPsec keying
2. TURN infra can still be reused

> To be clear: despite the length and detail of my preceding
> objections, I
> recognize that I may be off in the weeds. I am happy to be corrected
> about
> any of the assertions I make above, up to and including corrections
> that make my
> conclusion incorrect. I will further note that this is not a blocking
> ballot
> position, and that, procedurally, the document can be published
> despite my
> misgivings.

Thanks and looking forward for further comments for you. Please accept
my since apologies for the long delays because I am working on other
things nowadays, and HIP is more of a hobby :)

> =====================================================================
> ======
> I have included some additional comments below.
> -------------------------------------------------------------------
> --------
> §1:
> >  As one solution, the HIP experiment report [RFC6538] mentions that
> >  Teredo based NAT traversal for HIP and related ESP traffic (with
> >  double tunneling overhead).
> This isn't a sentence. Perhaps remove "that"?
> Also: "Teredo-based"

thanks, fixed.

> -------------------------------------------------------------------
> --------
> §4.6:
> >  The connectivity checks follow the ICE methodology [MMUSIC-ICE],
> > but
> >  UDP encapsulated HIP control messages are used instead of ICE
> >  messages.  Only normal nomination MUST be used for the
> > connectivity
> >  checks, i.e., aggressive nomination MUST NOT be employed.
> The cited document does not describe aggressive nomination, and
> deprecates its
> use. Consider removing the mention of aggressive nomination in this
> document.


> -------------------------------------------------------------------
> --------
> §5.4:
> >    The following NAT traversal mode IDs are defined:
> > 
> >        ID name            Value
> >        RESERVED             0
> >        UDP-ENCAPSULATION    1
> >        ICE-STUN-UDP         2
> >        ICE-HIP-UDP          3
> This should probably point to the IANA table rather than replicating
> a snapshot
> of its contents.

I believe it's convenient to define the values here for developers.

> -------------------------------------------------------------------
> --------
> Appendix B:
> >  o  Unlike in ICE, the addresses are not XOR-ed in Native ICE-HIP
> >     protocol in order to avoid middlebox tampering.
> This bullet should explain why such obfuscation is unnecessary.

This was already changed during the IESG reviews and now it states:

Unlike in ICE, the addresses are not XOR-ed in Native ICE-HIP protocol
but rather encrypted to avoid middlebox tampering.