Re: [MMUSIC] Thoughts on draft-ietf-mmusic-dtls-sdp-10 semantics

Roman Shpount <roman@telurix.com> Tue, 08 March 2016 04:24 UTC

Return-Path: <roman@telurix.com>
X-Original-To: mmusic@ietfc.amsl.com
Delivered-To: mmusic@ietfc.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfc.amsl.com (Postfix) with ESMTP id 5E9B71CDCFB for <mmusic@ietfc.amsl.com>; Mon, 7 Mar 2016 20:24:36 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.6
X-Spam-Level:
X-Spam-Status: No, score=-2.6 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, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfc.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=telurix-com.20150623.gappssmtp.com
Received: from mail.ietf.org ([4.31.198.41]) by localhost (ietfc.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ifGIVmnz-BB1 for <mmusic@ietfc.amsl.com>; Mon, 7 Mar 2016 20:24:34 -0800 (PST)
Received: from mail-io0-x22a.google.com (mail-io0-x22a.google.com [IPv6:2607:f8b0:4001:c06::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfc.amsl.com (Postfix) with ESMTPS id 696AF1CDD08 for <mmusic@ietf.org>; Mon, 7 Mar 2016 20:24:34 -0800 (PST)
Received: by mail-io0-x22a.google.com with SMTP id n190so12931731iof.0 for <mmusic@ietf.org>; Mon, 07 Mar 2016 20:24:34 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telurix-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=5W6SUvVz7dDfQ83vLBL8oz7nk5HkwKOoJ78IyUsi5qI=; b=MpQvR6gk/e7488EQ8uxsscJp8NDrNvR4KUHKZv96qePptVBXwQwBlzGut4hisbvv8l hk0prXV0sd0iUj26l5SP1cYa5HWisg5VwwRAC46uCtSxkOGerS9F8LQNgBVuQg+lbMnG cu70qQ8Y/fllFbt41TvKokAmwfVFZu7r/5wxTWG42Jjc/OX6SRGLWLvuohmNKF5yY/t+ FsGFetJPA4AdTnfSe/xkbRwbqCl5nfRDLUBGoqca2k2Z9S1Owx3aSGibUmYYD6mNNTL3 RnDigXN62qgd7M7yhHq0ghYXS1ksMk8C2XaHDUCmU6k5J7B0VLZGBwGN9Sts5X9toHHX XsyA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=5W6SUvVz7dDfQ83vLBL8oz7nk5HkwKOoJ78IyUsi5qI=; b=mZuPsWopsM1HUvlT6bPhRoxKoSLA0J8i3Q6GqhDBc87BPFDQ2yFxhykvkgdC4KqcwF f7oyMEV4F6G5O3wjkjq1uaOhSVsqWtDdhK7JBgBxekPas4i7RHQs3WX3osNVIkKSDq51 vgc/EHV1dtSMCujn8YeuRespiigcevq4WBcl/JI8kkXT2XMQ+pHb6N3SUUVGNiH5kzC0 UV5j7iw7K/E2SA8099+K0OlV10c9PT+qmUBaqEB4Mx/pLyM9HkCCPKfRDOjRz9yn2bZJ X2+Cb8qc/++ABF1PTd+zl/d6So9NJzaIIo5BDILt6rSo7TYoL58nPb8bcAqcZTlSx2W7 LLcg==
X-Gm-Message-State: AD7BkJLya5cydE7DFiS2vngrpaq2KxMoLOqHq2HHIwyPi/ydaMNDoHtwqTPxx992ErPZ3g==
X-Received: by 10.107.12.14 with SMTP id w14mr30535152ioi.8.1457411073680; Mon, 07 Mar 2016 20:24:33 -0800 (PST)
Received: from mail-ig0-f182.google.com (mail-ig0-f182.google.com. [209.85.213.182]) by smtp.gmail.com with ESMTPSA id n5sm5983544iga.15.2016.03.07.20.24.31 for <mmusic@ietf.org> (version=TLSv1/SSLv3 cipher=OTHER); Mon, 07 Mar 2016 20:24:32 -0800 (PST)
Received: by mail-ig0-f182.google.com with SMTP id ir4so65695870igb.1 for <mmusic@ietf.org>; Mon, 07 Mar 2016 20:24:31 -0800 (PST)
MIME-Version: 1.0
X-Received: by 10.50.18.113 with SMTP id v17mr6520008igd.2.1457411071385; Mon, 07 Mar 2016 20:24:31 -0800 (PST)
Received: by 10.36.105.77 with HTTP; Mon, 7 Mar 2016 20:24:31 -0800 (PST)
In-Reply-To: <CAOJ7v-3vSkHikt0_bKBsdP=GoAt5wJ5X6tOcq_4z_51jMQKT=w@mail.gmail.com>
References: <CABcZeBNJ6jdL7SfLaatfr28X83dVOafpi=jrM6bSJ-qpmj4RuA@mail.gmail.com> <CAD5OKxuK9wBG47d+SwBH_f8-PgMQJuxFRmMg9E4omjgqO0tNbQ@mail.gmail.com> <56D8D2E1.2030306@alum.mit.edu> <CAOJ7v-2eWFFzK_rtSkT5Q12qv5Cdug_Do1z=cAWvfJsKi0U94Q@mail.gmail.com> <56DCB31A.1010502@alum.mit.edu> <7594FB04B1934943A5C02806D1A2204B37E818F9@ESESSMB209.ericsson.se> <56DDA6B2.5080403@alum.mit.edu> <CAD5OKxts-yfXS2nxTfoqMiDO2GLWu4AF6WJdvsE_tFtewmmmCg@mail.gmail.com> <7594FB04B1934943A5C02806D1A2204B37E8B57C@ESESSMB209.ericsson.se> <56DDB1D2.6000801@alum.mit.edu> <CAD5OKxuXiPGDZtNQvfhQGD0NdmDoCZ6hAgqQnih8-_p7GD56fQ@mail.gmail.com> <56DDB8B0.5030806@alum.mit.edu> <CAD5OKxtsPiakn+N7PhVv+7f4cJ=+jOoB-M3VmrN-HguWy-sKCQ@mail.gmail.com> <CAOJ7v-3vSkHikt0_bKBsdP=GoAt5wJ5X6tOcq_4z_51jMQKT=w@mail.gmail.com>
Date: Mon, 07 Mar 2016 23:24:31 -0500
X-Gmail-Original-Message-ID: <CAD5OKxvnHARirebUC+tBACdAF=NhGJgxGJROfDt5LZ44Q-MUXA@mail.gmail.com>
Message-ID: <CAD5OKxvnHARirebUC+tBACdAF=NhGJgxGJROfDt5LZ44Q-MUXA@mail.gmail.com>
From: Roman Shpount <roman@telurix.com>
To: Justin Uberti <juberti@google.com>
Content-Type: multipart/alternative; boundary="089e01494ff233d211052d81f507"
Archived-At: <http://mailarchive.ietf.org/arch/msg/mmusic/8P9tHs9Ky7M7uXcC10lv7H4Inu8>
Cc: "mmusic@ietf.org" <mmusic@ietf.org>, Paul Kyzivat <pkyzivat@alum.mit.edu>, Christer Holmberg <christer.holmberg@ericsson.com>
Subject: Re: [MMUSIC] Thoughts on draft-ietf-mmusic-dtls-sdp-10 semantics
X-BeenThere: mmusic@ietf.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: Multiparty Multimedia Session Control Working Group <mmusic.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/mmusic>, <mailto:mmusic-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/mmusic/>
List-Post: <mailto:mmusic@ietf.org>
List-Help: <mailto:mmusic-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/mmusic>, <mailto:mmusic-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 08 Mar 2016 04:24:36 -0000

We need to make sure dtls-association-id works in cases of 3pcc where a new
session can be connected to an existing session or two existing sessions
can be connected with each other. In all of those cases new DTLS
association must be established. The case of merging two existing sessions
especially worry me if we chose monotonically increasing IDs. Imagine two
sessions, each hitting IVR for an announcement, and then being connecting
directly with each other. If monotonically increasing from zero ID is used,
both sessions will have dtls-association-id=1, but clearly a new session
would need to be established.

I think in general monotonically increasing IDs have a high chance of
collision when unrelated end points are used. Randomly assigned IDs are
safer in this regard.

Another option is to state that dtls-association-id should be unique for a
given security certificate fingerprint. So if new certificate is created
for each DTLS association, then dtls-association-id can stay at value 0 or
be omitted. If certificate is reused a unique value should be used for each
new DTLS association created with this certificate. This uniqueness can be
achieved by using a counter associated with each self signed certificate or
using sufficiently large random or pseudo random (server id + time stamp +
per server counter would be an example of the pseudo random) value
associated with pre-provisioned permanent certificates.

Does anybody else have any suggestions or concerns about
dtls-association-id generation scheme?
______________
Roman Shpount

On Mon, Mar 7, 2016 at 9:15 PM, Justin Uberti <juberti@google.com> wrote:

> Keep in mind that this id value isn't actually sent anywhere. So it's not
> like the ICE ufrag that needs a certain amount of entropy. It can just as
> easily be a monotonically increasing number.
>
> IOW, a string with a 1-byte minimum seems right.
>
> On Mon, Mar 7, 2016 at 10:26 AM, Roman Shpount <roman@telurix.com> wrote:
>
>>
>> On Mon, Mar 7, 2016 at 12:21 PM, Paul Kyzivat <pkyzivat@alum.mit.edu>
>> wrote:
>>
>>> On 3/7/16 12:12 PM, Roman Shpount wrote:
>>>
>>>> On Mon, Mar 7, 2016 at 11:52 AM, Paul Kyzivat <pkyzivat@alum.mit.edu
>>>> <mailto:pkyzivat@alum.mit.edu>> wrote:
>>>>
>>>>     On 3/7/16 11:26 AM, Christer Holmberg wrote:
>>>>
>>>>         I suggest dtls-association-id. In my opinion there is no longer
>>>>         the same
>>>>         need to be aligned with the name of the connection attribute.
>>>>
>>>>
>>>>     This seems plausible. But I want to reserve judgement until the
>>>>     detailed semantics of the attribute are worked out:
>>>>
>>>> I wanted to model this attribute on ICE ufrag
>>>>
>>>>     - is it numeric, or a token?
>>>>
>>>>
>>>> I was thinking something like this:
>>>> dtls-association-id-attr = "dtls-association-id" ":" dtls-association-id
>>>>
>>>> dtls-association-id = 4*256dtls-association-id-char
>>>>
>>>> dtls-association-id-char = ALPHA / DIGIT / "+" / "/"
>>>>
>>>
>>> Why this in particular? Is it your intent to reuse values that were
>>> generated for another purpose? Or to reuse code that is also used for
>>> another purpose?
>>
>>
>> This is reusing the definition (and generation code) from ice-ufrag
>> attribute (https://tools.ietf.org/html/rfc5245#section-15.4).
>>
>>     - any rules for how the value chosen?
>>>>
>>>>
>>>> The dtls-association-id attributes MUST be chosen randomly when new DTLS
>>>> association is requested.  The dtls-association-id attribute MUST
>>>> contain at least 24 bits of randomness.  This means that
>>>> the dtls-association-id  attribute will be at least 4 characters
>>>> long since the grammar for this attribute allows for 6 bits of
>>>> randomness per character.  The attribute MAY be longer than 4
>>>> characters, respectively, of course, up to 256 characters.  The upper
>>>> limit allows for buffer sizing in implementations.  Its large upper
>>>> limit allows for increased amounts of randomness to be added over time.
>>>>
>>>
>>> What is the reason for using random values, rather than some well
>>> defined sequence of values? (Where the sequence might start with a random
>>> value, or perhaps every sequence would start with 0.)
>>>
>>
>> We are dealing with multiple end points which can be reconnected in more
>> or less random order. Each end point needs to detect when it is talking to
>> a new end point or to a new DTLS association. This is why I picked a random
>> value. Once again, if this works for ICE, should work for DTLS just as well.
>>
>> Let me know if you have a better idea for ID generation.
>>
>> Regards,
>> _____________
>> Roman Shpount
>>
>>
>
>