Re: [TLS] Connection ID Draft

Eric Rescorla <ekr@rtfm.com> Fri, 13 October 2017 14:30 UTC

Return-Path: <ekr@rtfm.com>
X-Original-To: tls@ietfa.amsl.com
Delivered-To: tls@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id E046A132F2E for <tls@ietfa.amsl.com>; Fri, 13 Oct 2017 07:30:00 -0700 (PDT)
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=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 zmU4Wt8KNWC9 for <tls@ietfa.amsl.com>; Fri, 13 Oct 2017 07:29:59 -0700 (PDT)
Received: from mail-qt0-x231.google.com (mail-qt0-x231.google.com [IPv6:2607:f8b0:400d:c0d::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 EAEF5120720 for <tls@ietf.org>; Fri, 13 Oct 2017 07:29:58 -0700 (PDT)
Received: by mail-qt0-x231.google.com with SMTP id z19so19893381qtg.11 for <tls@ietf.org>; Fri, 13 Oct 2017 07:29:58 -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=OK/UQSpUWCMQL3SKvlHuc8OjjYZJURU3OfmO5l8M9Es=; b=CemsPhOTu0XNMv1RnedSvWqYgUj7nldS8dJCaDrwQOH07CrSfTGxbqipdcGZPZwdzM 9Q/5BZWimaLnJS/SxYo4TlM6IDjYNrLO0U+LnQ8sIvBXEnsn72jaTG8LLH68hUj9jAHM WVKgwbqqIiaa+2RAF1wmPQf5NZ6i8NIchMuwbFJ87cTudIRHYHTD1uEf93iNhR+c7sVW 16zN/7NWpXfxbwmUEl7IvA8GJyi3h1oTasgf+OdZ3y7xlhT0F6V1oTodxk90Ag9bobp3 JR4wPxa8FJh4FK3ertLTN1RtjdZD5x1CJ8n7I64rQiG0wd2CnX6zLbTMHlf6VmEOMUHB SnhA==
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=OK/UQSpUWCMQL3SKvlHuc8OjjYZJURU3OfmO5l8M9Es=; b=cI13ItcVia9ifvtj09uFn5JX2Eluf7knO0piAYzhYNyg4J1/SyhW3vo5DYlncIx23T Q8YhenAU8qwCc/HGw7Aicc/EZLGy+7zzdFDCLlEEVGQj2zo9t2KSdKGys2kxnJLIiHbx QW3d6498yzgTMDHiTzsZ7oEli4uAxsWs/dJunyDsYFhqMofuaz7ZMATj86u1iEmoqLBi yjRpAnpXtryYdodOLnIxMAdY/ia4XkvadCT0XwWs3VhvVbrZnUsU2f23XIZM0S6m8dvS 575A+cTKg4o3fO8TZBHTMGnnk2uaatOVSIqJhvqYhF9vNkMCzww8vtv3tStlSqldS45Y LKLg==
X-Gm-Message-State: AMCzsaUS2o4yIucVcAoAA0Hja0v0VYiX2dTTuXz9TXqx5ok68uN/sXYN SvbTV1L2Vd5TsHNouWWzhzpcKLPpI9ZczBcERkSpqQ==
X-Google-Smtp-Source: ABhQp+SMar09gxrytahNVX8Ulun2/NMXm06p2F5AqcLiG8sClnBDrevOix2pQ8CYX8g8GRDYkF3OSR4qls5zqIq9B+U=
X-Received: by 10.37.51.68 with SMTP id z65mr1095535ybz.353.1507904998028; Fri, 13 Oct 2017 07:29:58 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.129.75.194 with HTTP; Fri, 13 Oct 2017 07:29:17 -0700 (PDT)
In-Reply-To: <765bb5b0-2129-9ea8-2c51-b6b4163748e8@cs.tcd.ie>
References: <CABcZeBPXB6cOSztzDHtKSWUCJrgET+9cF_rAiiE8CYCUSY_uLA@mail.gmail.com> <574d133f-0531-2206-c7d3-825ebaffacdd@cs.tcd.ie> <CABcZeBM_xUadFDnAK-FLGjqciDOLGoePv8xhSFkmBYS5nooXxQ@mail.gmail.com> <765bb5b0-2129-9ea8-2c51-b6b4163748e8@cs.tcd.ie>
From: Eric Rescorla <ekr@rtfm.com>
Date: Fri, 13 Oct 2017 07:29:17 -0700
Message-ID: <CABcZeBNbt-ZB=8jsp=pKkDfS9qKOogfmjeAieN6KC9KBNkWnrg@mail.gmail.com>
To: Stephen Farrell <stephen.farrell@cs.tcd.ie>
Cc: "tls@ietf.org" <tls@ietf.org>
Content-Type: multipart/alternative; boundary="001a1148aa62c379b3055b6e7dfb"
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/S3uBE2CTXnZqo5ybt2OnNzI0QJc>
Subject: Re: [TLS] Connection ID Draft
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: "This is the mailing list for the Transport Layer Security working group of the IETF." <tls.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/tls>, <mailto:tls-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/tls/>
List-Post: <mailto:tls@ietf.org>
List-Help: <mailto:tls-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tls>, <mailto:tls-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 13 Oct 2017 14:30:01 -0000

On Fri, Oct 13, 2017 at 7:16 AM, Stephen Farrell <stephen.farrell@cs.tcd.ie>
wrote:

>
> Hiya,
>
> On 13/10/17 14:56, Eric Rescorla wrote:
> > I've seen a number of designs like these, but in general they
> > have quite poor scaling properties. Can you describe the precise
> > design you have in mind so that we can analyze it.
>
> Sure, I can try...
>
> What I'm suggesting is that we define a way that a TLS
> node can change the connection ID to a new value that
> is hard to link to the old, as a function that can be
> used when the implementation chooses to use it.
>
> I'm not currently arguing that the ids should be changed
> for each packet. E.g. if a node is able to detect that the
> 5-tuple has just changed, it could use this then. If a
> node sends one packet per day over say an nb-IoT network
> where it might have a different IP address each time (not
> that we know how nb-IoT will operate, so I'm guessing:-)
> then it might make sense to do this for every packet.
>
> I assume ids are initialised in some reasonable way.
>
> To change an id, pick a value foo that depends on the TLS
> session, e.g. like an extractor, and that is not visible
> to the network. Then set next-id to H(foo||prev-id) or
> some similar construct.
>
> Receivers can store a set of ids calculated when the
> session is established. I'd guess storing two (current
> and next) might be a sensible thing to do.
>
> The inefficiently compared to simply incrementing the
> id value is to add another column to the lookup table I
> guess. I don't know if that's a big scaling deal or not.
>

There are a number of cases where this is actually much harder to implement
than a design where one side dictates the connection ID. For instance,
consider a design where you have a pool of servers P1, P2, ... P_n with a
load balancer in front.
Each server i generates connection IDs of the form i || Random. The load
balancer then just looks at the first byte and routes to the appropriate
load balancer [0]. In this design, the LB can be totally stateless, whereas
in the design you propose, it has to (a) have a back-channel to the server
to get the initial conn-id (b), do crypto (c) store state for all the live
connections.

In addition, consider what happens when you get a CID you don't recognize.
It might be nonsense but it might be that there was a cryptic CID change
(e.g., the client did two changes but you missed a packet). You need to
decide the number of changes you're willing to tolerate and then the table
has to be that big times the number of connections (or you need to fill it
in whenever you get an unknown CID, which the attacker can send you at any
time).

-Ekr

[0] This has non-ideal topology-hiding properties, but there are obvious
extensions with better properties.