Re: [TLS] Connection ID Draft

Martin Thomson <martin.thomson@gmail.com> Wed, 18 October 2017 08:08 UTC

Return-Path: <martin.thomson@gmail.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 416451321AC for <tls@ietfa.amsl.com>; Wed, 18 Oct 2017 01:08:32 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.699
X-Spam-Level:
X-Spam-Status: No, score=-2.699 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.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 0Qkg9qA0zp5W for <tls@ietfa.amsl.com>; Wed, 18 Oct 2017 01:08:26 -0700 (PDT)
Received: from mail-oi0-x230.google.com (mail-oi0-x230.google.com [IPv6:2607:f8b0:4003:c06::230]) (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 49BEE13292F for <tls@ietf.org>; Wed, 18 Oct 2017 01:08:26 -0700 (PDT)
Received: by mail-oi0-x230.google.com with SMTP id g125so7483196oib.12 for <tls@ietf.org>; Wed, 18 Oct 2017 01:08:26 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=3ZUCPkWUL6pjk9euhQeUzteQwxTqmy3ucSe2ofnhvfU=; b=W3CL/mCn0IapUL4gjQQgWycTiVsgcvAOmrDJZ+KnQKppJnF+ihdjXQ6wqyBtngiLhC XtCRREwbTjUSsGe1n6osAvjkrmkwZzA1DJlkVmPqHawnlhhHos7HCMG6HWwGsXPUmFt5 5RvMK+YoONZpY4J4dcmW0JAAaQW9RPNs2WVRdHHx6V89XW9Vq4owhngqo/UAGyUJhWwX hSPUU1CtKnUn3tUhEnV4CAlzluai4goQ1b2i6uJQ5CnZnyd1qDC/Ve0x6NKeuMPmzQ3S QiGG3vPGOKuN3+fvK9NUZJt0wavygMka37guqbBPL38k0OdsPXS4uhMwuXcVLdHIfNKh zxhA==
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=3ZUCPkWUL6pjk9euhQeUzteQwxTqmy3ucSe2ofnhvfU=; b=PcbgTcpvUnWHfFACd9UK+xpDcTUaQLhpdSa5h720KtYpY1GVrgxdLYRqiUTHPMshD/ t/Qaq2NcnqNu6N3MVpWvu+OPFnOSmczuoIui/raq5ReUhQ7mQhO9bg48KwKoVsX3iAal Lv9ChAoj+qZaOuW07VjvG27ec5V9OZgEaoFKEVH825kBT9eXUieQpjBlbsPrZQYCsMKT YUxHlQOXddBs4+hVhnKNPnw/PucpDQwokSOVukiLahEi0OK4ylZwvFqyeQ5UeP3VFON5 bQYCZI/qoszu3mtoPJJ4tQg0ngaQNmXuNvTP/5laHBwcQ4vjn01NniBFq/OtwQ29DN3Y 7hTg==
X-Gm-Message-State: AMCzsaU8TjQoU5vnIAxyYy8FvJbrKHyUqLHEW/TD3I5SGS8lRQJsMh0N V6j3a499vxmqwWz1qO2JDs4S1tvKejDbtSaRQYA=
X-Google-Smtp-Source: ABhQp+QiWnZ8piKs+atGlHDSHoqqLzpP8AY9LvHZH//pz2IR13b57Gy7YR119gQ7cG7TxsogHrxsilX9yjRgeJm0H1U=
X-Received: by 10.202.67.135 with SMTP id q129mr7740148oia.390.1508314105438; Wed, 18 Oct 2017 01:08:25 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.157.72.178 with HTTP; Wed, 18 Oct 2017 01:08:24 -0700 (PDT)
In-Reply-To: <6F9A34A1-7F33-462D-96F6-92081256E83B@nokia.com>
References: <CABcZeBPXB6cOSztzDHtKSWUCJrgET+9cF_rAiiE8CYCUSY_uLA@mail.gmail.com> <CABkgnnXT7nv9aNQh12deeitF1CurENpxgUicn9GHjMbojcEvJg@mail.gmail.com> <D0524862-083C-4576-98B8-6D8A4825D458@nokia.com> <CABkgnnW4d=H5RZ0E+Hwo4jQptDpshVVuFtD-xQudJzxLXyReAQ@mail.gmail.com> <6F9A34A1-7F33-462D-96F6-92081256E83B@nokia.com>
From: Martin Thomson <martin.thomson@gmail.com>
Date: Wed, 18 Oct 2017 19:08:24 +1100
Message-ID: <CABkgnnWzenxPrVUcGha5=rWU5wN4GCaKy=jRKA96JspPJ5zr7Q@mail.gmail.com>
To: "Fossati, Thomas (Nokia - GB/Cambridge, UK)" <thomas.fossati@nokia.com>
Cc: Eric Rescorla <ekr@rtfm.com>, "tls@ietf.org" <tls@ietf.org>
Content-Type: text/plain; charset="UTF-8"
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/lSIsoqzXr188TZVUZ0hO1_n4fdo>
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: Wed, 18 Oct 2017 08:08:32 -0000

On Wed, Oct 18, 2017 at 5:44 PM, Fossati, Thomas (Nokia -
GB/Cambridge, UK) <thomas.fossati@nokia.com> wrote:
> This is quite similar to the trial and error / heuristic that I was
> mentioning in [1].

You didn't mention 5-tuples.  And it isn't trial and error: you use
5-tuple as your primary key and use connection ID to latch.

> Note that if A.1 and A.2's 5-tuples are swapped, the algorithm fails to
> recognise A.1 as CID-enabled and sends it forward to the crypto handler
> when it shouldn't.

As I said before, any connection without a connection ID monopolizes
that 5-tuple making it inaccessible to other connections.  I think
that in this case: too bad.

> And the already discussed limitations:
> - Fragility on corner cases (e.g., the 5-tuple swap above);

I don't see how you can avoid this in the general case.  Any
connection without connection ID is going to be hard to correlate if
it moves.  As for the connection that does have a connection ID but
moves on top of a connection that doesn't, I don't think that is an
acceptable loss.

> - Forcing middleware to keep state;
> - Breaking wireshark & co unless they can see the whole session;

Both of these are acceptable to me.  Unless you can describe a
middlebox use case that needs access to this information and can't
deal with the solution that I described.  Wireshark and co will need
to see the handshake if they want to decrypt and that's the only case
that is important.

> - (Depending on the use case, the cost of the two lookups per record
>   on the parsing might have a performance impact.)

The second lookup only happens after a migration.  I neglected to
mention that successful use of a connection ID causes the 5-tuple to
be assigned to that connection; there's a trick there in that you need
to watch for reordering, but it saves the double lookup.