Re: [TLS] Connection ID Draft

"Fossati, Thomas (Nokia - GB/Cambridge, UK)" <thomas.fossati@nokia.com> Thu, 19 October 2017 14:21 UTC

Return-Path: <thomas.fossati@nokia.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 B987E126D0C for <tls@ietfa.amsl.com>; Thu, 19 Oct 2017 07:21:54 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.921
X-Spam-Level:
X-Spam-Status: No, score=-1.921 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=nokia.onmicrosoft.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 knyfUWpNa7kV for <tls@ietfa.amsl.com>; Thu, 19 Oct 2017 07:21:52 -0700 (PDT)
Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0097.outbound.protection.outlook.com [104.47.1.97]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 69F781342E8 for <tls@ietf.org>; Thu, 19 Oct 2017 07:21:52 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nokia.onmicrosoft.com; s=selector1-nokia-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=lBgoepbalpWGXpjtQT17WVBMEhutHASpVsBBlqUatsM=; b=rZfyAK3yQE6zurWoezSdXNtikvEAcUxaGo61pejJce1jye8NbxZklfVIQV+2GJMOpB63whcfIpjLvPpt4Jn5qKvUu/8zhCaMr5rMqlw4mMqHuTK9A8sOtGs/JVrhaY5omtCATyEeekACFlIv2g2y/9RTiUr9He9wUZIaEuqOCBc=
Received: from VI1PR07MB1102.eurprd07.prod.outlook.com (10.163.168.26) by VI1PR07MB1103.eurprd07.prod.outlook.com (10.163.168.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.5; Thu, 19 Oct 2017 14:21:49 +0000
Received: from VI1PR07MB1102.eurprd07.prod.outlook.com ([fe80::e157:80bf:7ba7:b2ed]) by VI1PR07MB1102.eurprd07.prod.outlook.com ([fe80::e157:80bf:7ba7:b2ed%13]) with mapi id 15.20.0156.004; Thu, 19 Oct 2017 14:21:48 +0000
From: "Fossati, Thomas (Nokia - GB/Cambridge, UK)" <thomas.fossati@nokia.com>
To: Martin Thomson <martin.thomson@gmail.com>
CC: Eric Rescorla <ekr@rtfm.com>, "tls@ietf.org" <tls@ietf.org>, "Fossati, Thomas (Nokia - GB/Cambridge, UK)" <thomas.fossati@nokia.com>
Thread-Topic: [TLS] Connection ID Draft
Thread-Index: AQHTQ6/ei1Eh6DPTUUK7WLQddJSSYqLnKXUAgADEnwCAAKpMgIAAqfeAgAAG0wCAAgttgA==
Date: Thu, 19 Oct 2017 14:21:48 +0000
Message-ID: <9857D745-D654-4C7D-8D05-3AB971A4B256@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> <CABkgnnWzenxPrVUcGha5=rWU5wN4GCaKy=jRKA96JspPJ5zr7Q@mail.gmail.com>
In-Reply-To: <CABkgnnWzenxPrVUcGha5=rWU5wN4GCaKy=jRKA96JspPJ5zr7Q@mail.gmail.com>
Accept-Language: en-GB, en-US
Content-Language: en-GB
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
user-agent: Microsoft-MacOutlook/f.20.0.170309
authentication-results: spf=none (sender IP is ) smtp.mailfrom=thomas.fossati@nokia.com;
x-originating-ip: [81.134.152.4]
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; VI1PR07MB1103; 6:uVUxVsiHeWxDXClwiJXSpEKxGZPpt/3vWcKkjYAXH0wfK/ZehRIbdDHYVZZU6eOPkrXfQv75Zm5BjPRFP2evCLud5Rgvh9wy1E41XZFRUAxrTzo+Le5gi+UZ71HU66Fxzw4aGjeZf6Kvt2padW8s1C0w9nr9p0aLFJwE8OxFt4rhGdJjTzWN1J+F0jtgIl8IQInw+Yr32LI8YhIkFM5xjx8U4p6AfMn0MxOPgD5jEt1nO4G2jy23sN8yyGuEH7XXCdWIA5faC1R1MceurpQGBfa/3Mnx2+UBIu9luEGsT3yNIjnu0mYmGIwK8+4NSonW3xKD8fYGanqHK+oQa3yJAw==; 5:BdQQwstqqiBKBuA6wdXYqxgkFNPfISMKXXywdbiBnuZr5KJwcPFUJem/849Hdpi6BDHgz9jDHX6/NnZPrd+fdPiAp7hp5nj0F2tev1nkHwEuxMTiVDBd+HaqVlSdWHnzaI9xIlFQZQiB2q53isz/Cg==; 24:HL/EmSLlNI6kvepc+CUGGwIoHPE1i2o9rNJlMo2gdW0H9tg8spNoQnNccUMUTgKUN26vuLgEZfJXiZZSdxkVabc1Wguy0Ld8QAk41uRb88Y=; 7:TEnvyH7hhIbBuDVnmdno7JkSQZHEz7VkgagFfHNR/Aa/zET9X0LrI70L0WlFTnoKTreZ1kbKhO1tVY49gvkudW0wH72yHlHyPikHOr7nQpEgGv2/6bvXj6uJ8jfhFGbc1ATOXkPpw6xy9HKOWgath3MOqzuVHc1Plj1xxUBK1p273SOqiZAxHsThNXdgAUIdErQhEZf5oKC0UqCWd6CWt2J+WoMEgXWQh7ASqA+3p+0=
x-ms-exchange-antispam-srfa-diagnostics: SSOS;SSOR;
x-forefront-antispam-report: SFV:SKI; SCL:-1; SFV:NSPM; SFS:(10019020)(6009001)(376002)(39860400002)(346002)(24454002)(189002)(199003)(39060400002)(4326008)(8676002)(229853002)(83716003)(83506001)(6246003)(107886003)(316002)(53546010)(58126008)(8936002)(189998001)(86362001)(6512007)(2950100002)(2900100001)(3280700002)(3660700001)(25786009)(6916009)(6436002)(6506006)(6486002)(66066001)(81166006)(81156014)(99286003)(82746002)(478600001)(54906003)(53936002)(106356001)(7736002)(105586002)(5250100002)(97736004)(50986999)(305945005)(5660300001)(101416001)(54356999)(76176999)(14454004)(2906002)(68736007)(33656002)(36756003)(93886005)(561944003)(6116002)(102836003)(3846002); DIR:OUT; SFP:1102; SCL:1; SRVR:VI1PR07MB1103; H:VI1PR07MB1102.eurprd07.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en;
x-ms-office365-filtering-correlation-id: 7bfbe2a5-32a8-43d0-c183-08d516fcbc4b
x-ms-office365-filtering-ht: Tenant
x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254152)(48565401081)(2017052603199)(201703131423075)(201703031133081)(201702281549075); SRVR:VI1PR07MB1103;
x-ms-traffictypediagnostic: VI1PR07MB1103:
x-exchange-antispam-report-test: UriScan:(82608151540597);
x-microsoft-antispam-prvs: <VI1PR07MB1103BB62175B8E582555615580420@VI1PR07MB1103.eurprd07.prod.outlook.com>
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(10201501046)(3002001)(100000703101)(100105400095)(93006095)(93001095)(6055026)(6041248)(20161123560025)(20161123555025)(20161123558100)(20161123564025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:VI1PR07MB1103; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:VI1PR07MB1103;
x-forefront-prvs: 0465429B7F
received-spf: None (protection.outlook.com: nokia.com does not designate permitted sender hosts)
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="utf-8"
Content-ID: <341DB7A3EF7BD64A9C3117FADEF3233E@eurprd07.prod.outlook.com>
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-OriginatorOrg: nokia.com
X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Oct 2017 14:21:48.8975 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 5d471751-9675-428d-917b-70f44f9630b0
X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR07MB1103
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/ZB8QreAMqqYU9Jj0hWMDwaQ7MI0>
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: Thu, 19 Oct 2017 14:21:55 -0000

Hi Martin,

sorry for taking so long to replay.

> On 18/10/2017, 09:08, "Martin Thomson" <martin.thomson@gmail.com>
> wrote:
> 
> 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.

We seem to have a slightly different opinion on the meaning of trial and
error :-)  But more importantly, we seem to disagree on whether parsing
a binary header is orthogonal to context lookup (either via 5-tuple or
CID) or not.

> > 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.

I'm not sure I agree with that.  CID should be the tie breaker exactly
in these situations.  When something like that happens, if your
implementation supports CID it should win/survive over one that doesn't.

> > And the already discussed limitations:i
> > - 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.

I think you mean "I do think that is an acceptable loss", or "I don't
think that is an unacceptable loss", right?
 
> > - 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.

For diagnostics, it'd be pretty useful if one could filter a capture by
CID and follow *that* session among lots of others.  Irrespective of
what's in the encrypted payloads (which one can probably get from the
endpoint, if needed).  This is one use case that seems very useful to me
and doesn't require wireshark to keep state.  I'm not saying that there
are no work-arounds: we know how to make do with pcap filters.  But I'd
prefer to design something that is simple and cheap to implement and use
in the first place, if possible.

What I'm asking for is a codepoint and an explicit length for the CID,
i.e., a total +1 byte per 1.2 record on the wire.  I'm not sure the
tiny saving we get with the current proposal justifies the increase in
complexity.

> > - (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.

In the IoT use cases, re-binding during a sleep cycle is the common
pattern, so the second lookup is going to be fairly common.

> 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.

The thing that makes me slightly nervous is that we are talking about
doing trial & errors (at least in my definition of the term) and other
implementation tricks to achieve the very trivial task of parsing a
binary header.  This is what makes red flags pop up and makes me
think that we can do better.

Cheers