
From nobody Tue Oct  5 20:29:35 2021
Return-Path: <superuser@gmail.com>
X-Original-To: perc@ietfa.amsl.com
Delivered-To: perc@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id F04F13A0AE7; Tue,  5 Oct 2021 20:29:26 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.098
X-Spam-Level: 
X-Spam-Status: No, score=-2.098 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-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 B-2z1v7E8s9A; Tue,  5 Oct 2021 20:29:25 -0700 (PDT)
Received: from mail-ua1-x929.google.com (mail-ua1-x929.google.com [IPv6:2607:f8b0:4864:20::929]) (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 CC06D3A0D75; Tue,  5 Oct 2021 20:28:57 -0700 (PDT)
Received: by mail-ua1-x929.google.com with SMTP id b34so746327uad.8; Tue, 05 Oct 2021 20:28:57 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;  h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=lyFXpJS+79Po0mGs2ybw794+qTZCBObrGRz2sk9bkjU=; b=HS9b4YBDeVCjbzmGjjF9Wg7W43DnuUn+Ee2qVWUIskjvaJCaPDZAHltcyF0+F6WU9G sqoFvqx+007rdVfueO7ZrT444Muoe62iWdwUotfqsDuOSvuEcxGDuOa4rhwyZCQW1XXP O6bI1yg+icCAEsicauVXnjhYTD3gmdO0cgkYzVLhS9bVkK5bZ6sRlZioKnpeREjIu/oy IXuWMJVzl90tgkjJ6cyMAaaDRg9I4XyPHgTfBq6M2FEVLhs5aVSou0odeFHIrGwZ0c1T wKENm8w6GhckJA1mFYXWGC/f6pfUVuZChlA0i2TbwCoKU180Q6PEYARR/F5PJV20Wqlz Lpqw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=lyFXpJS+79Po0mGs2ybw794+qTZCBObrGRz2sk9bkjU=; b=O9kePrtkD8HUpsM47xCCxUp3qUW2gGYqmoNjC0YYNbxrXwD9oF5vK5z3aIdhJFU6jT Dyx62mvA2rZ103wuzVo1gWjC6/+sh+sjlGvaxBR1U8GXWjDChTqc0n7uqg2p6PEvJU48 tpvKlkvMLRD1FGPOMy1ogbb1hAeQjteVGTXsqXn0JAxK+80WsiV5XDzLTtMTGaxGEBZO 8yybzgD3FSQQfX+P7fbJYBsruqwClJ0PNtV+m9/YQs/0qTi08Y93N6giDRzVOOGxHmSU rDwqyOzETHjUy2X+4kxj9MMz/Pmx4zPResJfp/FEiZIyyAte9/Nr06aWlaUbmFKYOW44 6prQ==
X-Gm-Message-State: AOAM53143zDeSc3bIUENVLwYpS38bIP1Hp4wSoaox+yFuNn3jalL8Yko fVzrsZm97V3b8BnuZhroavojyIy09MnAloaeSHM=
X-Google-Smtp-Source: ABdhPJxtDC55/MXtit+Nn7XiliUiOVd65AA6aZ6O0BYcOtHXP9kIXXMGT3joPYrfOnq5Hf1FnxMFLQbNzimo2wicccc=
X-Received: by 2002:ab0:5b89:: with SMTP id y9mr16156812uae.47.1633490934705;  Tue, 05 Oct 2021 20:28:54 -0700 (PDT)
MIME-Version: 1.0
References: <162510321507.13724.12968550804927630403@ietfa.amsl.com> <emf2164c70-5bda-4e41-aa5e-08eb27232cef@sydney> <CAL0qLwb12yh6p6cK21bD8PWM7F_co8NYyy+oqsmg80VT6CZZwg@mail.gmail.com> <235FA332-7A68-4189-B74E-52D7276AE8AD@iii.ca> <CAL0qLwbD+jRnC1sexQhoVk_Zvt2vKsjtsq29TYgqZs9coM3QNA@mail.gmail.com> <CAL0qLwZLoN=GR8dezd_mafisR867F=pMiYQ2pmJr3EPMZeEA=A@mail.gmail.com> <CAMRcRGSXUOVruR0+nbg8_PWELyH3jD8WaU0yoO2jfnymXbLXDQ@mail.gmail.com>
In-Reply-To: <CAMRcRGSXUOVruR0+nbg8_PWELyH3jD8WaU0yoO2jfnymXbLXDQ@mail.gmail.com>
From: "Murray S. Kucherawy" <superuser@gmail.com>
Date: Tue, 5 Oct 2021 20:28:42 -0700
Message-ID: <CAL0qLwZ-L1o1Mq9x6rQ-1TgNeXddhkZMbUf_+VptVRWNm_dYpg@mail.gmail.com>
To: Suhas Nandakumar <suhasietf@gmail.com>
Cc: Cullen Jennings <fluffy@iii.ca>, Benjamin Kaduk <kaduk@mit.edu>, Paul Jones <paulej@packetizer.com>,  perc@ietf.org, perc-chairs@ietf.org, draft-ietf-perc-dtls-tunnel@ietf.org,  The IESG <iesg@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000e8338f05cda6be17"
Archived-At: <https://mailarchive.ietf.org/arch/msg/perc/1wlYr-aNFFlx01L5EtbvsLkQkOU>
Subject: Re: [Perc] Benjamin Kaduk's Discuss on draft-ietf-perc-dtls-tunnel-09: (with DISCUSS and COMMENT)
X-BeenThere: perc@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Privacy Enhanced RTP Conferencing <perc.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/perc>, <mailto:perc-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/perc/>
List-Post: <mailto:perc@ietf.org>
List-Help: <mailto:perc-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/perc>, <mailto:perc-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 06 Oct 2021 03:29:28 -0000

--000000000000e8338f05cda6be17
Content-Type: text/plain; charset="UTF-8"

On Mon, Sep 27, 2021 at 9:05 PM Suhas Nandakumar <suhasietf@gmail.com>
wrote:

>
>
>>> I'll follow up with Ben and the others during the next IESG telechat (in
>>> about nine hours)
>>>
>>
>> I did this just now, and he reminds me that the IESG on review of this
>> document found that it actually meets the bar for Proposed Standard, since
>> it specifies a protocol with interoperable implementations, and we were
>> wondering if the Working Group really wanted to stick with Informational.
>> The IANA question was secondary.
>>
>> So I'm happy to send it through as-is, but I wanted to get that point
>> covered first.  Unfortunately I have had very little success getting anyone
>> to answer my inquiries.
>>
>
> [Suhas]  From what I understand, authors are fine with either Standards
> track or an Informational reference. Informational was chosen with the
> intent of helping have a standard reference to enable interop and if IESG
> experts recommend the spec could be a Standards track one, we should be ok
> with it . Hope this helps
>

Well it's a question of the Working Group's preference, and the process we
follow from here.

If really nobody cares that much, then Informational it is.  I press the
button and we're done.  But if the Working Group would actually prefer
Standards Track and the IESG concurs (and so far I've heard no resistance
to indicate such), then we have to repeat the Last Call at the new status,
but probably not bother with a second ballot and just proceed (absent any
objection).

So let's do this: I'll wait a week.  If anyone pushes for the higher status
between now and October 12, I'll repeat the Last Call at Proposed Standard
and we'll figure it out from there.  If not, I'll send it to the RFC Editor
as Informational with no further handling needed by the WG or the IESG.

-MSK

--000000000000e8338f05cda6be17
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr">On Mon, Sep 27, 2021 at 9:05 PM Suhas Nan=
dakumar &lt;<a href=3D"mailto:suhasietf@gmail.com">suhasietf@gmail.com</a>&=
gt; wrote:<br></div><div class=3D"gmail_quote"><blockquote class=3D"gmail_q=
uote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,2=
04);padding-left:1ex"><div dir=3D"ltr"><br><div class=3D"gmail_quote"><bloc=
kquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:=
1px solid rgb(204,204,204);padding-left:1ex"><div dir=3D"ltr"><div class=3D=
"gmail_quote"><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px=
 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir=3D=
"ltr"><div class=3D"gmail_quote"><div><br></div><div>I&#39;ll follow up wit=
h Ben and the others during the next IESG telechat (in about nine hours)</d=
iv></div></div></blockquote><div><br></div><div>I did this just now, and he=
 reminds me that the IESG on review of this document found that it actually=
 meets the bar for Proposed Standard, since it specifies a protocol with in=
teroperable implementations, and we were wondering if the Working Group rea=
lly wanted to stick with Informational.=C2=A0 The IANA question was seconda=
ry.</div><div><br></div><div>So I&#39;m happy to send it through as-is, but=
 I wanted to get that point covered first.=C2=A0 Unfortunately I have had v=
ery little success getting anyone to answer my inquiries.<br></div></div></=
div></blockquote><div><br></div><div>[Suhas]=C2=A0 From what I understand, =
authors are fine with either Standards track or an Informational reference.=
 Informational was chosen with the intent of helping have a standard refere=
nce to enable interop and if IESG experts recommend the spec could be a Sta=
ndards track one, we should be ok with it . Hope this helps</div></div></di=
v></blockquote><div><br></div><div>Well it&#39;s a question of the Working =
Group&#39;s preference, and the process we follow from here.</div><div><br>=
</div><div>If really nobody cares that much, then Informational it is.=C2=
=A0 I press the button and we&#39;re done.=C2=A0 But if the Working Group w=
ould actually prefer Standards Track and the IESG concurs (and so far I&#39=
;ve heard no resistance to indicate such), then we have to repeat the Last =
Call at the new status, but probably not bother with a second ballot and ju=
st proceed (absent any objection).</div><div><br></div><div>So let&#39;s do=
 this: I&#39;ll wait a week.=C2=A0 If anyone pushes for the higher status b=
etween now and October 12, I&#39;ll repeat the Last Call at Proposed Standa=
rd and we&#39;ll figure it out from there.=C2=A0 If not, I&#39;ll send it t=
o the RFC Editor as Informational with no further handling needed by the WG=
 or the IESG.<br></div><div><br></div><div>-MSK<br></div></div></div>

--000000000000e8338f05cda6be17--


From nobody Thu Oct 14 12:17:19 2021
Return-Path: <noreply@ietf.org>
X-Original-To: perc@ietf.org
Delivered-To: perc@ietfa.amsl.com
Received: from ietfa.amsl.com (localhost [IPv6:::1]) by ietfa.amsl.com (Postfix) with ESMTP id 7BEC73A17BF; Thu, 14 Oct 2021 12:16:36 -0700 (PDT)
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
From: Benjamin Kaduk via Datatracker <noreply@ietf.org>
To: "The IESG" <iesg@ietf.org>
Cc: draft-ietf-perc-dtls-tunnel@ietf.org, perc-chairs@ietf.org, perc@ietf.org,  suhasietf@gmail.com, suhasietf@gmail.com
X-Test-IDTracker: no
X-IETF-IDTracker: 7.39.0
Auto-Submitted: auto-generated
Precedence: bulk
Reply-To: Benjamin Kaduk <kaduk@mit.edu>
Message-ID: <163423899560.11624.17767066695024804386@ietfa.amsl.com>
Date: Thu, 14 Oct 2021 12:16:36 -0700
Archived-At: <https://mailarchive.ietf.org/arch/msg/perc/ueQh-hbi6i1hw46Y4UqpSTKo5ko>
Subject: [Perc] Benjamin Kaduk's Discuss on draft-ietf-perc-dtls-tunnel-10: (with DISCUSS and COMMENT)
X-BeenThere: perc@ietf.org
X-Mailman-Version: 2.1.29
List-Id: Privacy Enhanced RTP Conferencing <perc.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/perc>, <mailto:perc-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/perc/>
List-Post: <mailto:perc@ietf.org>
List-Help: <mailto:perc-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/perc>, <mailto:perc-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 14 Oct 2021 19:16:37 -0000

Benjamin Kaduk has entered the following ballot position for
draft-ietf-perc-dtls-tunnel-10: Discuss

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 https://www.ietf.org/blog/handling-iesg-ballot-positions/
for more information about how to handle DISCUSS and COMMENT positions.


The document, along with other ballot positions, can be found here:
https://datatracker.ietf.org/doc/draft-ietf-perc-dtls-tunnel/



----------------------------------------------------------------------
DISCUSS:
----------------------------------------------------------------------

Thank you for the updates in the -10; they are improvements.
I also see that we had enough discussion of Informational vs
Standards-Track for this document, with no one really wanting to push
for it to be a Proposed Standard.
Unfortunately, I think there are still a couple places remaining that
aren't quite compatible with DTLS 1.3, and so an additional revision
will be required.

Section 5.4

(1)

    When sending the ServerHello message, the Key Distributor MUST insert
    its own unique identifier in the external_session_id extension. This
    value MUST also be conveyed back to the client via SDP as a tls-id
    attribute.

In (D)TLS 1.3, the external_session_id extension goes in the
EncryptedExtensions message, not the ServerHello.  One way to handle
this scenario in a DTLS-version-agnostic manner would be

NEW:
    The Key Distributor MUST report its own unique identifier in the
    "external_session_id" extension.  This extension is sent in the
    EncryptedExtensions message in DTLS 1.3, and the ServerHello in
    previous DTLS versions.  This value MUST also be conveyed back to
    the client via SDP as a tls-id attribute.

(2)

    The Key Distributor MUST send a MediaKeys message to the Media
    Distributor as soon as a HBH encryption key is computed. The MediaKeys
    message includes the selected cipher (i.e. protection profile), MKI
    [RFC3711] value (if any), SRTP master keys, and SRTP master salt values.
    The Key Distributor MUST use the same association identifier in the
    MediaKeys message as is used in the TunneledDtls messages for the given
    endpoint.

"As soon as a HBH encryption key is computed" is too soon.
The key is available before the endpoint is authenticated, and a
properly operating DTLS-SRTP session should not send media before the
mutual authentication has completed; sending the HBH encryption key "when
available" would allow the media distributor (which has no visibility
into when the DTLS handshake is completed) to send media even though the
authentication is not complete.  I think it would be more appropriate to
say that the MediaKeys message is sent when the DTLS handshake is
complete, which is unambiguous and a condition that is universally
applicable to all DTLS versions.  That might be written as something
like

NEW:
    The Key Distributor MUST send a MediaKeys message to the Media
    Distributor immediately after the DTLS handshake completes. The MediaKeys
    message includes the selected cipher (i.e. protection profile), MKI
    [RFC3711] value (if any), SRTP master keys, and SRTP master salt values.
    The Key Distributor MUST use the same association identifier in the
    MediaKeys message as is used in the TunneledDtls messages for the given
    endpoint.


----------------------------------------------------------------------
COMMENT:
----------------------------------------------------------------------

A couple remarks on the -10:

Section 5.4

    The Key Distributor MUST match the certificate fingerprint [RFC4572] and
    external_session_id received from endpoint's ClientHello message with
    the values received from the SDP transmitted by the endpoint [RFC8122].

As far as I can tell, the certificate fingerprint is in the
"external_id_hash" TLS extension in the ClientHello, but this document
does not mention that extension name in any location.  I strongly
suggest noting somewhere (possibly earlier) that the fingerprint hash
used here is conveyed in the "external_id_hash" extension.  (Also, 4752
is obsoleted by 8122, and does not cover the TLS conveyance of the
fingerprint at all.) One way to do that would be

NEW:

    The Key Distributor MUST match the certificate fingerprint [RFC8122]
    and unique session identifier received in the "external_id_hash"
    [RFC8844] and "external_session_id" [RFC8844] TLS extensions
    (respectively) of the endpoint's ClientHello message with the values
    received from the SDP transmitted by the endpoint [RFC8122].

Section 5.5

    Note that it is not necessary for the Media Distributor to
    understand the newer version of the protocol to understand that the
    first message received is UnsupportedVersion. The Media Distributor can
    determine from the first four octets received what the version number is
    and that the message is UnsupportedVersion.

This would be great content for a "protocol invariants" section, though
given the lack of interest in changing the target status of this
document to Standards-Track I do not expect there to be much interest in
putting together a "protocol invariants" section.

=============== Ballot Comments from the -09 preserved below for posterity ===========

I have a few general remarks before diving into the section-by-section
commentary (with nits split off into a final section).

It seems like one of the key security-relevant aspects of this setup is
how the information in (unauthenticated) incoming DTLS messages at the
key distributor are mapped up to the existing (or in the process of
establishment?) SDP sessions that describe the expected DTLS
session construction (and the media to be carried over DTLS-SRTP).  It
seems that in the general case, a given Key Distributor will be engaged
in many active and pending sessions, and thus will need to be able to
look up across many clients and sessions which SDP state might be a
match for a given DTLS ClientHello, while avoiding DoS attacks and not
committing any given SDP session to a DTLS association prior to the
completion of the DTLS handshake.  My preference would be to see a lot
more discussion in the document about this type of considerations,
though for an Informational protocol I won't insist on it (this is a
non-blocking comment).

With the media distributor acting as an intermediary that is partially
trusted, the situation is more complicated than usual, and the key
distributor cannot use transport coordinates to identify DTLS
associations, and instead the only index available is the UUID assigned
by the media distributor.  To some extent we rely on the media
distributor to properly map DTLS packets to the UUID identifier, but
AFAICT if the media distributor fails to do so, the DTLS cryptographic
mechanisms will detect such errors and either abort the handshake or
(post-handshake) reject invalid messages.  It might be worth reiterating
that DTLS does provide this form of protection.

Since the UUID is the only index that the key distributor has for DTLS
associations, there does not seem to be any risk of having the media
distributor trick the key distributor into releasing HBH keys from the
"wrong" association -- keys should only be released if the DTLS
handshake will complete successfully (but see the Discuss point #1!),
and the completion of the handshake authenticates the overall exchange
so that it's safe to release keys via the channel that identifies the
handshake (i.e., the UUID).  There does seem to only be very
coarsed-grained "trusted or not" authorization for media servers to
receive keys at all, though -- a malicious-but-trusted media distributor
that had on-path access for some other DTLS flows could relay them to
the key distributor and have the DTLS handshake succeed along that path,
even if it was not the intended path, and would get the HBH keys as a
result.

Does it only make sense to use this tunneling protocol with a "DOUBLE"
DTLS-SRTP profile?  If so, that might be worth mentioning somewhere more
explicitly.

Section 3

   The Key Distributor is a logical function that might be co-resident
   with a key management server operated by an enterprise, reside in one
   of the endpoints participating in the conference, or elsewhere that
   is trusted with E2E keying material.

Do we want to say something about the Key Distributor acting at a higher
level of trust than the Media Distributor?  (Is that even always true?)

Section 4

Figure 2 seems to show the MediaKeys being delivered to the Media
Distributor after only a single message from the Endpoint (i.e., prior
to the completion of the DTLS handshake).  I don't think that is
accurate, and it seems like that arrow should be moved later in the time
sequence.

Section 5.4

   When processing an incoming endpoint association, the Key Distributor
   MUST extract the "external_session_id" value transmitted in the
   "ClientHello" message and match that against "tls-id" value the
   endpoint transmitted via SDP.  If the values in SDP and the
   "ClientHello" do not match, the DTLS association MUST be rejected.

The Key Distributor might have multiple pending associations, and
potentially only weak bindings to endpoint identities prior to DTLS
establishment, so it's not clear that "match [external_session_id]
against 'tls-id' value the endpoint transmitted via SDP" is entirely
accurate.  I'm implicitly inserting a "the" before "tls-id" to make it
parse, but the implicit "the" is not a good fit since the definite
article implies there is a single one identified but there may be
multiple pending associations.  AFAICT at this point in processing the
only real identifier that the key distributor has for the pending DTLS
association is the UUID from the media distributor and there is no tight
association betwen that identifier and the "tld-id" value that (per the
following paragraph) is conveyed to the key distributor in some
unspecified manner.

   The Key Distributor MUST match the certificate fingerprint and
   "external_session_id" received from endpoint's "ClientHello" message
   with the values received from the SDP transmitted by the endpoint.

This sentence is rather confusing to me, since I don't know of a
certificate fingerprint conveyed in the ClientHello itself (as opposed
to the fingerprint of the certificate contained in the Certificate
message presented during the handshake).

   It is through this process that the Key Distributor can be sure to
   deliver the correct conference key to the endpoint.

Do we need to say anything about how the Key Distributor gets the
fingerprint and external_session_id values from SDP?  (I mean, I assume
that it's the same way that it gets the "tls-id", but the previous
paragraph just talked about "tls-id" and not the other stuff, so
formally it's ambiguous.)

   When sending the "ServerHello" message, the Key Distributor MUST
   insert its own unique identifier in the "external_session_id"
   extension.  This value MUST also be conveyed back to the client via
   SDP as a "tls-id" attribute.

It's not really clear that the binding between the endpoint that is
supposedly presenting the DTLS data and the SDP data has been
established at all here, so the selection of what "tls-id" to use here
feels rather speculative.  I think we should discuss the security
considerations for what is leaked if the key distributor sends the
"wrong" values here...

I'm also not sure if the sequencing of events is properly described
here.  Does the SDP need to complete before the DTLS handshake begins,
or can they proceed in parallel as described here?

Section 6

                                                                Tunnel
   messages are specified using the format described in [RFC5246]
   section 4.  [...]

I think that Â§3 of RFC 8446 is probably a better reference for TLS
presentation language at this point.

Section 6.5

I'm not sure what purpose sending an empty dtls_message would serve.

   *  "dtls_message": the content of the DTLS message received by the
      endpoint or to be sent to the endpoint.

I recommend saying something about "including record-layer framing" to
reiterate where the boundary is.

Section 9

I strongly recommend upgrading the TLS version between media distributor
and key distributor to be TLS 1.3.  Whether or not to use DTLS 1.2 or
1.3 for the tunneled traffic between endpoint and key distributor is an
orthogonal topic.

I'd also reiterate that the media distributor has access to metadata
about the endpoint/key distributor communications, even though the main
content and key information is encrypted.

I'd also consider calling out that the media distributor could generate
false EndpointDisconnect messages, but that this is essentially the same
capability afforded by just not forwarding media anymore.

   A requirement in this document is that a TLS connection between the
   Media Distributor and the Key Distributor be mutually authenticated.
   The reason for this requirement is to ensure that only an authorized
   Media Distributor receives the HBH keying material.  [...]

Can we say anything about what the Key Distributor's authorization
policy might be, using the authenticated identity of the TLS peer as
input?  "Any authenticated identity is granted all access" is not a
great authorization policy :)

NITS

Abstract

   This document defines a DTLS tunneling protocol for use in multimedia

I think the hyphenated "DTLS-tunneling" would clarify that DTLS is being
tunneled (as opposed to the mechanism used to tunnel other things).
A slightly more intrusive change would be "protocol for tunneling DTLS
traffic" but that might be confusing in the terse setting of the
Abstract.

Section 1

   By establishing this TLS tunnel between the Media Distributor and Key
   Distributor and implementing the protocol defined in this document,
   it is possible for the Media Distributor to facilitate the
   establishment of a secure DTLS association between an endpoint and
   the Key Distributor in order for the endpoint to receive E2E and HBH
   keying material.  [...]

I think "receive" might not be the best word here, since the key
material should incorporate contributions from both parties; the "arrive
at" language used in the previous paragraph was good.

Section 4

   As DTLS messages are received from the endpoint by the Media
   Distributor, they are forwarded to the Key Distributor encapsulated
   inside a "TunneledDtls" message.  Likewise, as "TunneledDtls"
   messages are received by the Media Distributor from the Mey
   Distributor, the encapsulated DTLS packet is forwarded to the
   endpoint.

s/Mey/Key/

Section 5.1

   The endpoint MUST include a unique identifier in the "tls-id" SDP
   [RFC4566] attribute sent by the endpoint in both offer and answer
   [RFC3264] messages as per [RFC8842].  Further, the endpoint MUST
   include this same unique identifier in the "external_session_id"
   extension [RFC8844] in the "ClientHello" message when establishing a
   DTLS association.

Since this is the section about the endpoint procedures (the key
distributor's behavior is discussed later), I think we might avoid
phrasing that implies a linked offer/answer pair, and instead say
something like "in all offer and answer messages that it generates".

Section 5.4

   The Key Distributor MUST encapsulate any DTLS message it sends to an
   endpoint inside a "TunneledDtls" message (see Section 6).  The Key
   Distributor is not required to transmit all messages a given DTLS
   association through the same tunnel if more than one tunnel has been
   established between it and a Media Distributor.

I suggest "a given Media Distributor", since the current phrasing seems
to allow sending to a different media distributor entirely, which seems
unlikely to work since the UUID identifying the DTLS association will
not be recognized there.

   The Key Distributor MUST select a cipher that is supported by both
   the endpoint and the Media Distributor to ensure proper HBH
   operations.

(It also has to pick a cipher that it itself supports...)

Section 5.5

   "UnsupportedVersion".  The Media Distributor can determine from the
   first two octets received what the version number is and that the
   message is "UnsupportedVersion".  The rest of the data received, if

I think that the "two" should be either "one" or "four", as the actual
message structure has two octets of length between the message type and
the unsupported_version structure.  One octet is needed to determine
that it is an unsupported-version message, and four to determine the
highest supported version number.

Section 6.2

   struct {
       uint8 version;
       SRTPProtectionProfile protection_profiles<0..2^16-1>;
   } SupportedProfiles;

The presentation language allows an empty list of profiles; is that
intended to be allowed?  (What happens if an empty list is sent?)

   *  "version": indicates the version of the protocol to use (0x00).

I suggest "this document specifies version 0x00" rather than the
parenthetical.




From nobody Wed Oct 20 21:12:34 2021
Return-Path: <paulej@packetizer.com>
X-Original-To: perc@ietfa.amsl.com
Delivered-To: perc@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 759763A11DD; Wed, 20 Oct 2021 21:12:06 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.099
X-Spam-Level: 
X-Spam-Status: No, score=-2.099 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_PASS=-0.001, UNPARSEABLE_RELAY=0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=packetizer.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 Cn0jR_UE8YsV; Wed, 20 Oct 2021 21:12:00 -0700 (PDT)
Received: from dublin.packetizer.com (dublin.packetizer.com [IPv6:2600:1f18:24d6:2e01:e842:9b2b:72a2:d2c6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id F02CC3A1229; Wed, 20 Oct 2021 21:11:58 -0700 (PDT)
Received: from authuser (localhost [127.0.0.1]) 
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=packetizer.com; s=dublin; t=1634789514; bh=+rKS7DVUXH05cIeBrzL8KKk+Z9Kg1M/nrlcuOb7bJVk=; h=From:To:Subject:Cc:Date:In-Reply-To:References:Reply-To; b=IvapnijgrpZoPbH7NCdVFtyx9WdwUU4fBRh5peMPZhzM1/NsPZr7SSZJ+FeJ/4YJK 6FTslA/sONgJyIarc6FCdkFmQEuyeJOBMZJXjCULSwuBMBHzGvOx3uXHIMDsnZ0ay0 Aa7CLO2qB+DRIRcUvCwlkppzbvgP3mfXTB1rQvBc=
From: "Paul E. Jones" <paulej@packetizer.com>
To: "Benjamin Kaduk" <kaduk@mit.edu>, "The IESG" <iesg@ietf.org>
Cc: draft-ietf-perc-dtls-tunnel@ietf.org, perc-chairs@ietf.org, perc@ietf.org,  suhasietf@gmail.com, suhasietf@gmail.com
Date: Thu, 21 Oct 2021 04:11:50 +0000
Message-Id: <em3d81a846-2e4d-49b9-92d7-a4d651eff2e9@sydney>
In-Reply-To: <163423899560.11624.17767066695024804386@ietfa.amsl.com>
References: <163423899560.11624.17767066695024804386@ietfa.amsl.com>
Reply-To: "Paul E. Jones" <paulej@packetizer.com>
User-Agent: eM_Client/8.2.1659.0
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/perc/qeRNJRkh_YcUbRqab_4Gyc2cW74>
Subject: Re: [Perc] Benjamin Kaduk's Discuss on draft-ietf-perc-dtls-tunnel-10: (with DISCUSS and COMMENT)
X-BeenThere: perc@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Privacy Enhanced RTP Conferencing <perc.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/perc>, <mailto:perc-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/perc/>
List-Post: <mailto:perc@ietf.org>
List-Help: <mailto:perc-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/perc>, <mailto:perc-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 21 Oct 2021 04:12:07 -0000

Ben,

I responded to points below, but to see the changes I've made, see this:
https://github.com/percwg/perc-wg/pull/185

  If you'd prefer, I can publish draft -11 now or we can further revise=20
this PR.

Thanks!
Paul


>----------------------------------------------------------------------
>DISCUSS:
>----------------------------------------------------------------------
>
>Thank you for the updates in the -10; they are improvements.
>I also see that we had enough discussion of Informational vs
>Standards-Track for this document, with no one really wanting to push
>for it to be a Proposed Standard.
>Unfortunately, I think there are still a couple places remaining that
>aren't quite compatible with DTLS 1.3, and so an additional revision
>will be required.
>
>Section 5.4
>
>(1)
>
>     When sending the ServerHello message, the Key Distributor MUST insert
>     its own unique identifier in the external_session_id extension. This
>     value MUST also be conveyed back to the client via SDP as a tls-id
>     attribute.
>
>In (D)TLS 1.3, the external_session_id extension goes in the
>EncryptedExtensions message, not the ServerHello.  One way to handle
>this scenario in a DTLS-version-agnostic manner would be
>
>NEW:
>     The Key Distributor MUST report its own unique identifier in the
>     "external_session_id" extension.  This extension is sent in the
>     EncryptedExtensions message in DTLS 1.3, and the ServerHello in
>     previous DTLS versions.  This value MUST also be conveyed back to
>     the client via SDP as a tls-id attribute.

Thank you.  I made the changes as you suggest.


>
>
>(2)
>
>     The Key Distributor MUST send a MediaKeys message to the Media
>     Distributor as soon as a HBH encryption key is computed. The MediaKey=
s
>     message includes the selected cipher (i.e. protection profile), MKI
>     [RFC3711] value (if any), SRTP master keys, and SRTP master salt valu=
es.
>     The Key Distributor MUST use the same association identifier in the
>     MediaKeys message as is used in the TunneledDtls messages for the giv=
en
>     endpoint.
>
>"As soon as a HBH encryption key is computed" is too soon.
>The key is available before the endpoint is authenticated, and a
>properly operating DTLS-SRTP session should not send media before the
>mutual authentication has completed; sending the HBH encryption key "when
>available" would allow the media distributor (which has no visibility
>into when the DTLS handshake is completed) to send media even though the
>authentication is not complete.  I think it would be more appropriate to
>say that the MediaKeys message is sent when the DTLS handshake is
>complete, which is unambiguous and a condition that is universally
>applicable to all DTLS versions.  That might be written as something
>like
>
>NEW:
>     The Key Distributor MUST send a MediaKeys message to the Media
>     Distributor immediately after the DTLS handshake completes. The Media=
Keys
>     message includes the selected cipher (i.e. protection profile), MKI
>     [RFC3711] value (if any), SRTP master keys, and SRTP master salt valu=
es.
>     The Key Distributor MUST use the same association identifier in the
>     MediaKeys message as is used in the TunneledDtls messages for the giv=
en
>     endpoint.

Good point.  Change made as suggested.


>
>
>
>----------------------------------------------------------------------
>COMMENT:
>----------------------------------------------------------------------
>
>A couple remarks on the -10:
>
>Section 5.4
>
>     The Key Distributor MUST match the certificate fingerprint [RFC4572]=
 and
>     external_session_id received from endpoint's ClientHello message with
>     the values received from the SDP transmitted by the endpoint [RFC8122=
].
>
>As far as I can tell, the certificate fingerprint is in the
>"external_id_hash" TLS extension in the ClientHello, but this document
>does not mention that extension name in any location.  I strongly
>suggest noting somewhere (possibly earlier) that the fingerprint hash
>used here is conveyed in the "external_id_hash" extension.  (Also, 4752
>is obsoleted by 8122, and does not cover the TLS conveyance of the
>fingerprint at all.) One way to do that would be
>
>NEW:
>
>     The Key Distributor MUST match the certificate fingerprint [RFC8122]
>     and unique session identifier received in the "external_id_hash"
>     [RFC8844] and "external_session_id" [RFC8844] TLS extensions
>     (respectively) of the endpoint's ClientHello message with the values
>     received from the SDP transmitted by the endpoint [RFC8122].

Actually, that was not the intended behavior. The intent was for the Key=20
Distributor to match what it sees from the endpoint via DTLS with the=20
expected values received via SDP.

I modified the text as follows, including repeated references to=20
hopefully make this clearer:

     The Key Distributor **MUST** match the certificate fingerprint and
     `external_session_id` [@!RFC8844] received from endpoint via DTLS=20
with the
     expected fingerprint [@!RFC8122] and `tls-id` [@!RFC8842] values=20
received via
     SDP.  It is through this process that the Key Distributor can be=20
sure to
     deliver the correct conference key to the endpoint.

Hopefully this helps.  The certificate fingerprint is computed by the=20
KD, but using the same method as would have been performed in generating=20
the "fingerprint" SDP value described in RFC 8122.


>Section 5.5
>
>     Note that it is not necessary for the Media Distributor to
>     understand the newer version of the protocol to understand that the
>     first message received is UnsupportedVersion. The Media Distributor c=
an
>     determine from the first four octets received what the version number =
is
>     and that the message is UnsupportedVersion.
>
>This would be great content for a "protocol invariants" section, though
>given the lack of interest in changing the target status of this
>document to Standards-Track I do not expect there to be much interest in
>putting together a "protocol invariants" section.

If we ever see a second version, maybe. :)


>
>
>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Ballot Comments from the -09 =
preserved below for posterity =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>
>I have a few general remarks before diving into the section-by-section
>commentary (with nits split off into a final section).
>
>It seems like one of the key security-relevant aspects of this setup is
>how the information in (unauthenticated) incoming DTLS messages at the
>key distributor are mapped up to the existing (or in the process of
>establishment?) SDP sessions that describe the expected DTLS
>session construction (and the media to be carried over DTLS-SRTP).  It
>seems that in the general case, a given Key Distributor will be engaged
>in many active and pending sessions, and thus will need to be able to
>look up across many clients and sessions which SDP state might be a
>match for a given DTLS ClientHello, while avoiding DoS attacks and not
>committing any given SDP session to a DTLS association prior to the
>completion of the DTLS handshake.  My preference would be to see a lot
>more discussion in the document about this type of considerations,
>though for an Informational protocol I won't insist on it (this is a
>non-blocking comment).

I can appreciate that, though I know this would lead to a lot of debate=20
on architecture that I don't think we have the luxury to do at this=20
point.


>With the media distributor acting as an intermediary that is partially
>trusted, the situation is more complicated than usual, and the key
>distributor cannot use transport coordinates to identify DTLS
>associations, and instead the only index available is the UUID assigned
>by the media distributor.  To some extent we rely on the media
>distributor to properly map DTLS packets to the UUID identifier, but
>AFAICT if the media distributor fails to do so, the DTLS cryptographic
>mechanisms will detect such errors and either abort the handshake or
>(post-handshake) reject invalid messages.  It might be worth reiterating
>that DTLS does provide this form of protection.

Indeed, this could be another attack vector the KD implementations=20
should consider.  I'll add a paragraph on that.


>Since the UUID is the only index that the key distributor has for DTLS
>associations, there does not seem to be any risk of having the media
>distributor trick the key distributor into releasing HBH keys from the
>"wrong" association -- keys should only be released if the DTLS
>handshake will complete successfully (but see the Discuss point #1!),
>and the completion of the handshake authenticates the overall exchange
>so that it's safe to release keys via the channel that identifies the
>handshake (i.e., the UUID).  There does seem to only be very
>coarsed-grained "trusted or not" authorization for media servers to
>receive keys at all, though -- a malicious-but-trusted media distributor
>that had on-path access for some other DTLS flows could relay them to
>the key distributor and have the DTLS handshake succeed along that path,
>even if it was not the intended path, and would get the HBH keys as a
>result.

I do not think this would be possible since the Key Distributor would=20
not accept a connection if it could not match the certificate and=20
tls_id.  That information would have been conveyed to the key=20
distributor via SDP and, if the key distributor could not perform that=20
match, the DTLS session would be rejected.


>Does it only make sense to use this tunneling protocol with a "DOUBLE"
>DTLS-SRTP profile?  If so, that might be worth mentioning somewhere more
>explicitly.

I wish you were in the group when reviewing the entirety of the system,=20
because this is a better catch than this short paragraph suggests. =20
Indeed, only DOUBLE protection profiles are defined for PERC.  I did not=20
see any text that actually explains that the MediaKeys message only=20
contains the portion of the key used for HBH encryption/decryption.  if=20
you saw this stated elsewhere, let me know.  I propose fixing this=20
oversight with this text in the Key Distributor section:

     There are presently two SRTP protection profiles defined for PERC,
     namely `DOUBLE_AEAD_AES_128_GCM_AEAD_AES_128_GCM` and
     `DOUBLE_AEAD_AES_256_GCM_AEAD_AES_256_GCM` [!@RFC8723].  As=20
[!@RFC8723]
     explains in Section 5.2, the Media Distributor is only given the=20
SRTP
     master key for HBH operations.  As such, the SRTP master key
     length advertised in the `MediaKeys` message is half the length of=20
the key
     normally associated with selected "double" protection profile.


>Section 3
>
>    The Key Distributor is a logical function that might be co-resident
>    with a key management server operated by an enterprise, reside in one
>    of the endpoints participating in the conference, or elsewhere that
>    is trusted with E2E keying material.
>
>Do we want to say something about the Key Distributor acting at a higher
>level of trust than the Media Distributor?  (Is that even always true?)

This is always true and explained in the PERC framework document (RFC=20
8871).  We could add more text here, but I would personally prefer to=20
not add more than is strictly necessary for this piece of the larger=20
architecture.


>Section 4
>
>Figure 2 seems to show the MediaKeys being delivered to the Media
>Distributor after only a single message from the Endpoint (i.e., prior
>to the completion of the DTLS handshake).  I don't think that is
>accurate, and it seems like that arrow should be moved later in the time
>sequence.

It was accurate, until you changed it in this email exchange. :)

I updated the diagram to put that at the bottom.  However, there is=20
nothing in the diagram that explicitly says the handshake completes in=20
the diagram, but I think it is hinted at now. It is explicitly stated=20
now in the body of the text now, though.


>
>Section 5.4
>
>    When processing an incoming endpoint association, the Key Distributor
>    MUST extract the "external_session_id" value transmitted in the
>    "ClientHello" message and match that against "tls-id" value the
>    endpoint transmitted via SDP.  If the values in SDP and the
>    "ClientHello" do not match, the DTLS association MUST be rejected.
>
>The Key Distributor might have multiple pending associations, and
>potentially only weak bindings to endpoint identities prior to DTLS
>establishment, so it's not clear that "match [external_session_id]
>against 'tls-id' value the endpoint transmitted via SDP" is entirely
>accurate.  I'm implicitly inserting a "the" before "tls-id" to make it
>parse, but the implicit "the" is not a good fit since the definite
>article implies there is a single one identified but there may be
>multiple pending associations.  AFAICT at this point in processing the
>only real identifier that the key distributor has for the pending DTLS
>association is the UUID from the media distributor and there is no tight
>association betwen that identifier and the "tld-id" value that (per the
>following paragraph) is conveyed to the key distributor in some
>unspecified manner.

Before the DTLS session is initiated, an SDP exchange would have=20
occurred.  After all, the endpoint would not even know where to send a=20
DTLS message otherwise. That is something outside the scope of this=20
document, though.  The Key Distributor would already have something to=20
pin this DTLS session against.


>    The Key Distributor MUST match the certificate fingerprint and
>    "external_session_id" received from endpoint's "ClientHello" message
>    with the values received from the SDP transmitted by the endpoint.
>
>This sentence is rather confusing to me, since I don't know of a
>certificate fingerprint conveyed in the ClientHello itself (as opposed
>to the fingerprint of the certificate contained in the Certificate
>message presented during the handshake).

Hopefully this is less confusing in the next draft given the changes I=20
mentioned above.  The fingerprint and "external_session_id" are both=20
discussed in RFC 8122.  The text should be clearer than before, but=20
perhaps another pass is needed to ensure that's true.


>    It is through this process that the Key Distributor can be sure to
>    deliver the correct conference key to the endpoint.
>
>Do we need to say anything about how the Key Distributor gets the
>fingerprint and external_session_id values from SDP?  (I mean, I assume
>that it's the same way that it gets the "tls-id", but the previous
>paragraph just talked about "tls-id" and not the other stuff, so
>formally it's ambiguous.)

That is one aspect of the solution that the WG explicitly did not want=20
to define.  The reason was that there is more than one possible protocol=20
that might be used depending on where the KD is situated and how the KD=20
interfaces with call control.  In cases where the KD is integrated with=20
an endpoint that is part of a decentralized model, for example, it would=20
be quite different than how this might work in a more complex,=20
centralized solution.  Maybe this might get addressed one day, but I=20
doubt it.  There seems to be a tendency these days to standardize the=20
least possible.  Even this draft is just _a_ solution to the MD/KD=20
interface problem.


>    When sending the "ServerHello" message, the Key Distributor MUST
>    insert its own unique identifier in the "external_session_id"
>    extension.  This value MUST also be conveyed back to the client via
>    SDP as a "tls-id" attribute.
>
>It's not really clear that the binding between the endpoint that is
>supposedly presenting the DTLS data and the SDP data has been
>established at all here, so the selection of what "tls-id" to use here
>feels rather speculative.  I think we should discuss the security
>considerations for what is leaked if the key distributor sends the
>"wrong" values here...

I think this gets back to the issue of the call control / KD interface=20
that is not defined.  The KD _will_ get SDP from the endpoint before=20
DTLS happens.  It cannot work any other way.  The endpoint needs to=20
receive and SDP response with the address of the MD in order to initiate=20
DTLS.  In between these steps, somehow through magic not defined, yet=20
definitely outside the scope of this document, the KD will have been=20
party to this SDP exchange and have this data.

If the wrong values are transmitted, the DTLS session should fail since=20
either the KD or endpoint would detect a mismatch with SDP.


>I'm also not sure if the sequencing of events is properly described
>here.  Does the SDP need to complete before the DTLS handshake begins,
>or can they proceed in parallel as described here?

SDP must happen first.


>
>Section 6
>
>                                                                 Tunnel
>    messages are specified using the format described in [RFC5246]
>    section 4.  [...]
>
>I think that =C2=A73 of RFC 8446 is probably a better reference for TLS
>presentation language at this point.

This was updated in draft -10.

>
>
>Section 6.5
>
>I'm not sure what purpose sending an empty dtls_message would serve.
>
>    *  "dtls_message": the content of the DTLS message received by the
>       endpoint or to be sent to the endpoint.
>
>I recommend saying something about "including record-layer framing" to
>reiterate where the boundary is.

OK. I've added "This includes one or more complete  DTLS records."  I'm=20
happy to adjust the language as you suggest.


>Section 9
>
>I strongly recommend upgrading the TLS version between media distributor
>and key distributor to be TLS 1.3.  Whether or not to use DTLS 1.2 or
>1.3 for the tunneled traffic between endpoint and key distributor is an
>orthogonal topic.

I've upgraded all references to the latest drafts and RFCs, I think.  No=20
point referring to old stuff.


>I'd also reiterate that the media distributor has access to metadata
>about the endpoint/key distributor communications, even though the main
>content and key information is encrypted.

OK, I added a sentence to the security considerations section on that.

>I'd also consider calling out that the media distributor could generate
>false EndpointDisconnect messages, but that this is essentially the same
>capability afforded by just not forwarding media anymore.

I'll add something about that, too.


>    A requirement in this document is that a TLS connection between the
>    Media Distributor and the Key Distributor be mutually authenticated.
>    The reason for this requirement is to ensure that only an authorized
>    Media Distributor receives the HBH keying material.  [...]
>
>Can we say anything about what the Key Distributor's authorization
>policy might be, using the authenticated identity of the TLS peer as
>input?  "Any authenticated identity is granted all access" is not a
>great authorization policy :)

I think this gets into the "what is between the KD and the endpoint"=20
problem.  I do not know what the policy might be, how the KD decides who=20
is and is not allowed in a conference, etc.  Those things are outside=20
the scope of this document and never settled.


>NITS

I think all of these below were addressed already in draft -10.  I did=20
change the syntax so that DTLS messages cannot be 0 octets in length (as=20
you suggested above).




>
>
>Abstract
>
>    This document defines a DTLS tunneling protocol for use in multimedia
>
>I think the hyphenated "DTLS-tunneling" would clarify that DTLS is being
>tunneled (as opposed to the mechanism used to tunnel other things).
>A slightly more intrusive change would be "protocol for tunneling DTLS
>traffic" but that might be confusing in the terse setting of the
>Abstract.
>
>Section 1
>
>    By establishing this TLS tunnel between the Media Distributor and Key
>    Distributor and implementing the protocol defined in this document,
>    it is possible for the Media Distributor to facilitate the
>    establishment of a secure DTLS association between an endpoint and
>    the Key Distributor in order for the endpoint to receive E2E and HBH
>    keying material.  [...]
>
>I think "receive" might not be the best word here, since the key
>material should incorporate contributions from both parties; the "arrive
>at" language used in the previous paragraph was good.
>
>Section 4
>
>    As DTLS messages are received from the endpoint by the Media
>    Distributor, they are forwarded to the Key Distributor encapsulated
>    inside a "TunneledDtls" message.  Likewise, as "TunneledDtls"
>    messages are received by the Media Distributor from the Mey
>    Distributor, the encapsulated DTLS packet is forwarded to the
>    endpoint.
>
>s/Mey/Key/
>
>Section 5.1
>
>    The endpoint MUST include a unique identifier in the "tls-id" SDP
>    [RFC4566] attribute sent by the endpoint in both offer and answer
>    [RFC3264] messages as per [RFC8842].  Further, the endpoint MUST
>    include this same unique identifier in the "external_session_id"
>    extension [RFC8844] in the "ClientHello" message when establishing a
>    DTLS association.
>
>Since this is the section about the endpoint procedures (the key
>distributor's behavior is discussed later), I think we might avoid
>phrasing that implies a linked offer/answer pair, and instead say
>something like "in all offer and answer messages that it generates".
>
>Section 5.4
>
>    The Key Distributor MUST encapsulate any DTLS message it sends to an
>    endpoint inside a "TunneledDtls" message (see Section 6).  The Key
>    Distributor is not required to transmit all messages a given DTLS
>    association through the same tunnel if more than one tunnel has been
>    established between it and a Media Distributor.
>
>I suggest "a given Media Distributor", since the current phrasing seems
>to allow sending to a different media distributor entirely, which seems
>unlikely to work since the UUID identifying the DTLS association will
>not be recognized there.
>
>    The Key Distributor MUST select a cipher that is supported by both
>    the endpoint and the Media Distributor to ensure proper HBH
>    operations.
>
>(It also has to pick a cipher that it itself supports...)
>
>Section 5.5
>
>    "UnsupportedVersion".  The Media Distributor can determine from the
>    first two octets received what the version number is and that the
>    message is "UnsupportedVersion".  The rest of the data received, if
>
>I think that the "two" should be either "one" or "four", as the actual
>message structure has two octets of length between the message type and
>the unsupported_version structure.  One octet is needed to determine
>that it is an unsupported-version message, and four to determine the
>highest supported version number.
>
>Section 6.2
>
>    struct {
>        uint8 version;
>        SRTPProtectionProfile protection_profiles<0..2^16-1>;
>    } SupportedProfiles;
>
>The presentation language allows an empty list of profiles; is that
>intended to be allowed?  (What happens if an empty list is sent?)
>
>    *  "version": indicates the version of the protocol to use (0x00).
>
>I suggest "this document specifies version 0x00" rather than the
>parenthetical.
>
>
>


From nobody Mon Oct 25 09:39:28 2021
Return-Path: <internet-drafts@ietf.org>
X-Original-To: perc@ietf.org
Delivered-To: perc@ietfa.amsl.com
Received: from ietfa.amsl.com (localhost [IPv6:::1]) by ietfa.amsl.com (Postfix) with ESMTP id 11BF53A0C92; Mon, 25 Oct 2021 09:39:24 -0700 (PDT)
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
From: internet-drafts@ietf.org
To: <i-d-announce@ietf.org>
Cc: perc@ietf.org
X-Test-IDTracker: no
X-IETF-IDTracker: 7.39.0
Auto-Submitted: auto-generated
Precedence: bulk
Reply-To: perc@ietf.org
Message-ID: <163517996401.13909.4562733780756048786@ietfa.amsl.com>
Date: Mon, 25 Oct 2021 09:39:24 -0700
Archived-At: <https://mailarchive.ietf.org/arch/msg/perc/cyEac-hv66scNsQ3DYxrKwT77qU>
Subject: [Perc] I-D Action: draft-ietf-perc-dtls-tunnel-11.txt
X-BeenThere: perc@ietf.org
X-Mailman-Version: 2.1.29
List-Id: Privacy Enhanced RTP Conferencing <perc.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/perc>, <mailto:perc-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/perc/>
List-Post: <mailto:perc@ietf.org>
List-Help: <mailto:perc-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/perc>, <mailto:perc-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 25 Oct 2021 16:39:24 -0000

A New Internet-Draft is available from the on-line Internet-Drafts directories.
This draft is a work item of the Privacy Enhanced RTP Conferencing WG of the IETF.

        Title           : DTLS Tunnel between a Media Distributor and Key Distributor to Facilitate Key Exchange
        Authors         : Paul E. Jones
                          Paul M. Ellenbogen
                          Nils H. Ohlmeier
	Filename        : draft-ietf-perc-dtls-tunnel-11.txt
	Pages           : 19
	Date            : 2021-10-25

Abstract:
   This document defines a protocol for tunneling DTLS traffic in
   multimedia conferences that enables a Media Distributor to facilitate
   key exchange between an endpoint in a conference and the Key
   Distributor.  The protocol is designed to ensure that the keying
   material used for hop-by-hop encryption and authentication is
   accessible to the Media Distributor, while the keying material used
   for end-to-end encryption and authentication is inaccessible to the
   Media Distributor.


The IETF datatracker status page for this draft is:
https://datatracker.ietf.org/doc/draft-ietf-perc-dtls-tunnel/

There is also an HTML version available at:
https://www.ietf.org/archive/id/draft-ietf-perc-dtls-tunnel-11.html

A diff from the previous version is available at:
https://www.ietf.org/rfcdiff?url2=draft-ietf-perc-dtls-tunnel-11


Internet-Drafts are also available by anonymous FTP at:
ftp://ftp.ietf.org/internet-drafts/



From nobody Mon Oct 25 09:41:08 2021
Return-Path: <paulej@packetizer.com>
X-Original-To: perc@ietfa.amsl.com
Delivered-To: perc@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id E37F23A08E3; Mon, 25 Oct 2021 09:41:02 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.099
X-Spam-Level: 
X-Spam-Status: No, score=-2.099 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_PASS=-0.001, UNPARSEABLE_RELAY=0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=packetizer.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 iAcZdvaVCRY0; Mon, 25 Oct 2021 09:40:57 -0700 (PDT)
Received: from dublin.packetizer.com (dublin.packetizer.com [IPv6:2600:1f18:24d6:2e01:e842:9b2b:72a2:d2c6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 98F973A0DA8; Mon, 25 Oct 2021 09:40:56 -0700 (PDT)
Received: from authuser (localhost [127.0.0.1]) 
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=packetizer.com; s=dublin; t=1635180048; bh=6oHmYklHX0gSOV/6iI1vL2ufnHBP2dDaDMT4VnnJPYk=; h=From:To:Subject:Cc:Date:In-Reply-To:References:Reply-To; b=qYBCml6i2P7lXl0TDmfSVJaQ380jyyUivPdizL9hIohSo7Q2LMdb3aJ6LUpDRj1Z2 jOT0+yfBgVGrdiegp6Lqq6ojbyNm06ONnOCiqqtO/ipwHYSsCMUHxanLxhz8JUqgMB foJHP5aB+6NSFFha6VF3lzgkUy0sZpLB0DmBFt5g=
From: "Paul E. Jones" <paulej@packetizer.com>
To: "Paul E. Jones" <paulej@packetizer.com>, "Benjamin Kaduk" <kaduk@mit.edu>,  "The IESG" <iesg@ietf.org>
Cc: perc-chairs@ietf.org, suhasietf@gmail.com, perc@ietf.org, draft-ietf-perc-dtls-tunnel@ietf.org, "Murray S. Kucherawy" <superuser@gmail.com>
Date: Mon, 25 Oct 2021 16:40:42 +0000
Message-Id: <em56f3e000-58e0-4ca9-804a-6fca49aea5bb@sydney>
In-Reply-To: <em3d81a846-2e4d-49b9-92d7-a4d651eff2e9@sydney>
References: <163423899560.11624.17767066695024804386@ietfa.amsl.com> <em3d81a846-2e4d-49b9-92d7-a4d651eff2e9@sydney>
Reply-To: "Paul E. Jones" <paulej@packetizer.com>
User-Agent: eM_Client/8.2.1659.0
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/perc/EUCwDbbdrpTUcQsL1gIQnGNach4>
Subject: Re: [Perc] Benjamin Kaduk's Discuss on draft-ietf-perc-dtls-tunnel-10: (with DISCUSS and COMMENT)
X-BeenThere: perc@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Privacy Enhanced RTP Conferencing <perc.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/perc>, <mailto:perc-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/perc/>
List-Post: <mailto:perc@ietf.org>
List-Help: <mailto:perc-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/perc>, <mailto:perc-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 25 Oct 2021 16:41:03 -0000

Ben, Murray, et al,

I published version 11 for consideration:
https://datatracker.ietf.org/doc/html/draft-ietf-perc-dtls-tunnel-11

Paul


------ Original Message ------
From: "Paul E. Jones" <paulej=3D40packetizer.com@dmarc.ietf.org>
To: "Benjamin Kaduk" <kaduk@mit.edu>; "The IESG" <iesg@ietf.org>
Cc: perc-chairs@ietf.org; suhasietf@gmail.com; perc@ietf.org;=20
draft-ietf-perc-dtls-tunnel@ietf.org
Sent: 10/21/2021 12:11:50 AM
Subject: Re: [Perc] Benjamin Kaduk's Discuss on=20
draft-ietf-perc-dtls-tunnel-10: (with DISCUSS and COMMENT)

>Ben,
>
>I responded to points below, but to see the changes I've made, see this:
>https://github.com/percwg/perc-wg/pull/185
>
>  If you'd prefer, I can publish draft -11 now or we can further revise th=
is PR.
>
>Thanks!
>Paul
>
>
>>----------------------------------------------------------------------
>>DISCUSS:
>>----------------------------------------------------------------------
>>
>>Thank you for the updates in the -10; they are improvements.
>>I also see that we had enough discussion of Informational vs
>>Standards-Track for this document, with no one really wanting to push
>>for it to be a Proposed Standard.
>>Unfortunately, I think there are still a couple places remaining that
>>aren't quite compatible with DTLS 1.3, and so an additional revision
>>will be required.
>>
>>Section 5.4
>>
>>(1)
>>
>>     When sending the ServerHello message, the Key Distributor MUST inser=
t
>>     its own unique identifier in the external_session_id extension. This
>>     value MUST also be conveyed back to the client via SDP as a tls-id
>>     attribute.
>>
>>In (D)TLS 1.3, the external_session_id extension goes in the
>>EncryptedExtensions message, not the ServerHello.  One way to handle
>>this scenario in a DTLS-version-agnostic manner would be
>>
>>NEW:
>>     The Key Distributor MUST report its own unique identifier in the
>>     "external_session_id" extension.  This extension is sent in the
>>     EncryptedExtensions message in DTLS 1.3, and the ServerHello in
>>     previous DTLS versions.  This value MUST also be conveyed back to
>>     the client via SDP as a tls-id attribute.
>
>Thank you.  I made the changes as you suggest.
>
>
>>
>>
>>(2)
>>
>>     The Key Distributor MUST send a MediaKeys message to the Media
>>     Distributor as soon as a HBH encryption key is computed. The MediaKe=
ys
>>     message includes the selected cipher (i.e. protection profile), MKI
>>     [RFC3711] value (if any), SRTP master keys, and SRTP master salt val=
ues.
>>     The Key Distributor MUST use the same association identifier in the
>>     MediaKeys message as is used in the TunneledDtls messages for the gi=
ven
>>     endpoint.
>>
>>"As soon as a HBH encryption key is computed" is too soon.
>>The key is available before the endpoint is authenticated, and a
>>properly operating DTLS-SRTP session should not send media before the
>>mutual authentication has completed; sending the HBH encryption key "when
>>available" would allow the media distributor (which has no visibility
>>into when the DTLS handshake is completed) to send media even though the
>>authentication is not complete.  I think it would be more appropriate to
>>say that the MediaKeys message is sent when the DTLS handshake is
>>complete, which is unambiguous and a condition that is universally
>>applicable to all DTLS versions.  That might be written as something
>>like
>>
>>NEW:
>>     The Key Distributor MUST send a MediaKeys message to the Media
>>     Distributor immediately after the DTLS handshake completes. The Medi=
aKeys
>>     message includes the selected cipher (i.e. protection profile), MKI
>>     [RFC3711] value (if any), SRTP master keys, and SRTP master salt val=
ues.
>>     The Key Distributor MUST use the same association identifier in the
>>     MediaKeys message as is used in the TunneledDtls messages for the gi=
ven
>>     endpoint.
>
>Good point.  Change made as suggested.
>
>
>>
>>
>>
>>----------------------------------------------------------------------
>>COMMENT:
>>----------------------------------------------------------------------
>>
>>A couple remarks on the -10:
>>
>>Section 5.4
>>
>>     The Key Distributor MUST match the certificate fingerprint [RFC4572] =
and
>>     external_session_id received from endpoint's ClientHello message wit=
h
>>     the values received from the SDP transmitted by the endpoint [RFC812=
2].
>>
>>As far as I can tell, the certificate fingerprint is in the
>>"external_id_hash" TLS extension in the ClientHello, but this document
>>does not mention that extension name in any location.  I strongly
>>suggest noting somewhere (possibly earlier) that the fingerprint hash
>>used here is conveyed in the "external_id_hash" extension.  (Also, 4752
>>is obsoleted by 8122, and does not cover the TLS conveyance of the
>>fingerprint at all.) One way to do that would be
>>
>>NEW:
>>
>>     The Key Distributor MUST match the certificate fingerprint [RFC8122]
>>     and unique session identifier received in the "external_id_hash"
>>     [RFC8844] and "external_session_id" [RFC8844] TLS extensions
>>     (respectively) of the endpoint's ClientHello message with the values
>>     received from the SDP transmitted by the endpoint [RFC8122].
>
>Actually, that was not the intended behavior. The intent was for the Key D=
istributor to match what it sees from the endpoint via DTLS with the expect=
ed values received via SDP.
>
>I modified the text as follows, including repeated references to hopefully =
make this clearer:
>
>     The Key Distributor **MUST** match the certificate fingerprint and
>     `external_session_id` [@!RFC8844] received from endpoint via DTLS wit=
h the
>     expected fingerprint [@!RFC8122] and `tls-id` [@!RFC8842] values rece=
ived via
>     SDP.  It is through this process that the Key Distributor can be sure =
to
>     deliver the correct conference key to the endpoint.
>
>Hopefully this helps.  The certificate fingerprint is computed by the KD,=
 but using the same method as would have been performed in generating the "f=
ingerprint" SDP value described in RFC 8122.
>
>
>>Section 5.5
>>
>>     Note that it is not necessary for the Media Distributor to
>>     understand the newer version of the protocol to understand that the
>>     first message received is UnsupportedVersion. The Media Distributor=
 can
>>     determine from the first four octets received what the version numbe=
r is
>>     and that the message is UnsupportedVersion.
>>
>>This would be great content for a "protocol invariants" section, though
>>given the lack of interest in changing the target status of this
>>document to Standards-Track I do not expect there to be much interest in
>>putting together a "protocol invariants" section.
>
>If we ever see a second version, maybe. :)
>
>
>>
>>
>>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Ballot Comments from the -0=
9 preserved below for posterity =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>>
>>I have a few general remarks before diving into the section-by-section
>>commentary (with nits split off into a final section).
>>
>>It seems like one of the key security-relevant aspects of this setup is
>>how the information in (unauthenticated) incoming DTLS messages at the
>>key distributor are mapped up to the existing (or in the process of
>>establishment?) SDP sessions that describe the expected DTLS
>>session construction (and the media to be carried over DTLS-SRTP).  It
>>seems that in the general case, a given Key Distributor will be engaged
>>in many active and pending sessions, and thus will need to be able to
>>look up across many clients and sessions which SDP state might be a
>>match for a given DTLS ClientHello, while avoiding DoS attacks and not
>>committing any given SDP session to a DTLS association prior to the
>>completion of the DTLS handshake.  My preference would be to see a lot
>>more discussion in the document about this type of considerations,
>>though for an Informational protocol I won't insist on it (this is a
>>non-blocking comment).
>
>I can appreciate that, though I know this would lead to a lot of debate on =
architecture that I don't think we have the luxury to do at this point.
>
>
>>With the media distributor acting as an intermediary that is partially
>>trusted, the situation is more complicated than usual, and the key
>>distributor cannot use transport coordinates to identify DTLS
>>associations, and instead the only index available is the UUID assigned
>>by the media distributor.  To some extent we rely on the media
>>distributor to properly map DTLS packets to the UUID identifier, but
>>AFAICT if the media distributor fails to do so, the DTLS cryptographic
>>mechanisms will detect such errors and either abort the handshake or
>>(post-handshake) reject invalid messages.  It might be worth reiterating
>>that DTLS does provide this form of protection.
>
>Indeed, this could be another attack vector the KD implementations should=
 consider.  I'll add a paragraph on that.
>
>
>>Since the UUID is the only index that the key distributor has for DTLS
>>associations, there does not seem to be any risk of having the media
>>distributor trick the key distributor into releasing HBH keys from the
>>"wrong" association -- keys should only be released if the DTLS
>>handshake will complete successfully (but see the Discuss point #1!),
>>and the completion of the handshake authenticates the overall exchange
>>so that it's safe to release keys via the channel that identifies the
>>handshake (i.e., the UUID).  There does seem to only be very
>>coarsed-grained "trusted or not" authorization for media servers to
>>receive keys at all, though -- a malicious-but-trusted media distributor
>>that had on-path access for some other DTLS flows could relay them to
>>the key distributor and have the DTLS handshake succeed along that path,
>>even if it was not the intended path, and would get the HBH keys as a
>>result.
>
>I do not think this would be possible since the Key Distributor would not=
 accept a connection if it could not match the certificate and tls_id.  That =
information would have been conveyed to the key distributor via SDP and, i=
f the key distributor could not perform that match, the DTLS session would=
 be rejected.
>
>
>>Does it only make sense to use this tunneling protocol with a "DOUBLE"
>>DTLS-SRTP profile?  If so, that might be worth mentioning somewhere more
>>explicitly.
>
>I wish you were in the group when reviewing the entirety of the system, be=
cause this is a better catch than this short paragraph suggests.  Indeed, o=
nly DOUBLE protection profiles are defined for PERC.  I did not see any tex=
t that actually explains that the MediaKeys message only contains the porti=
on of the key used for HBH encryption/decryption.  if you saw this stated e=
lsewhere, let me know.  I propose fixing this oversight with this text in t=
he Key Distributor section:
>
>     There are presently two SRTP protection profiles defined for PERC,
>     namely `DOUBLE_AEAD_AES_128_GCM_AEAD_AES_128_GCM` and
>     `DOUBLE_AEAD_AES_256_GCM_AEAD_AES_256_GCM` [!@RFC8723].  As [!@RFC872=
3]
>     explains in Section 5.2, the Media Distributor is only given the SRTP
>     master key for HBH operations.  As such, the SRTP master key
>     length advertised in the `MediaKeys` message is half the length of th=
e key
>     normally associated with selected "double" protection profile.
>
>
>>Section 3
>>
>>    The Key Distributor is a logical function that might be co-resident
>>    with a key management server operated by an enterprise, reside in one
>>    of the endpoints participating in the conference, or elsewhere that
>>    is trusted with E2E keying material.
>>
>>Do we want to say something about the Key Distributor acting at a higher
>>level of trust than the Media Distributor?  (Is that even always true?)
>
>This is always true and explained in the PERC framework document (RFC 8871=
).  We could add more text here, but I would personally prefer to not add m=
ore than is strictly necessary for this piece of the larger architecture.
>
>
>>Section 4
>>
>>Figure 2 seems to show the MediaKeys being delivered to the Media
>>Distributor after only a single message from the Endpoint (i.e., prior
>>to the completion of the DTLS handshake).  I don't think that is
>>accurate, and it seems like that arrow should be moved later in the time
>>sequence.
>
>It was accurate, until you changed it in this email exchange. :)
>
>I updated the diagram to put that at the bottom.  However, there is nothin=
g in the diagram that explicitly says the handshake completes in the diagra=
m, but I think it is hinted at now. It is explicitly stated now in the body =
of the text now, though.
>
>
>>
>>Section 5.4
>>
>>    When processing an incoming endpoint association, the Key Distributor
>>    MUST extract the "external_session_id" value transmitted in the
>>    "ClientHello" message and match that against "tls-id" value the
>>    endpoint transmitted via SDP.  If the values in SDP and the
>>    "ClientHello" do not match, the DTLS association MUST be rejected.
>>
>>The Key Distributor might have multiple pending associations, and
>>potentially only weak bindings to endpoint identities prior to DTLS
>>establishment, so it's not clear that "match [external_session_id]
>>against 'tls-id' value the endpoint transmitted via SDP" is entirely
>>accurate.  I'm implicitly inserting a "the" before "tls-id" to make it
>>parse, but the implicit "the" is not a good fit since the definite
>>article implies there is a single one identified but there may be
>>multiple pending associations.  AFAICT at this point in processing the
>>only real identifier that the key distributor has for the pending DTLS
>>association is the UUID from the media distributor and there is no tight
>>association betwen that identifier and the "tld-id" value that (per the
>>following paragraph) is conveyed to the key distributor in some
>>unspecified manner.
>
>Before the DTLS session is initiated, an SDP exchange would have occurred.=
  After all, the endpoint would not even know where to send a DTLS message=
 otherwise. That is something outside the scope of this document, though.  T=
he Key Distributor would already have something to pin this DTLS session ag=
ainst.
>
>
>>    The Key Distributor MUST match the certificate fingerprint and
>>    "external_session_id" received from endpoint's "ClientHello" message
>>    with the values received from the SDP transmitted by the endpoint.
>>
>>This sentence is rather confusing to me, since I don't know of a
>>certificate fingerprint conveyed in the ClientHello itself (as opposed
>>to the fingerprint of the certificate contained in the Certificate
>>message presented during the handshake).
>
>Hopefully this is less confusing in the next draft given the changes I men=
tioned above.  The fingerprint and "external_session_id" are both discussed =
in RFC 8122.  The text should be clearer than before, but perhaps another=
 pass is needed to ensure that's true.
>
>
>>    It is through this process that the Key Distributor can be sure to
>>    deliver the correct conference key to the endpoint.
>>
>>Do we need to say anything about how the Key Distributor gets the
>>fingerprint and external_session_id values from SDP?  (I mean, I assume
>>that it's the same way that it gets the "tls-id", but the previous
>>paragraph just talked about "tls-id" and not the other stuff, so
>>formally it's ambiguous.)
>
>That is one aspect of the solution that the WG explicitly did not want to=
 define.  The reason was that there is more than one possible protocol that=
 might be used depending on where the KD is situated and how the KD interfac=
es with call control.  In cases where the KD is integrated with an endpoint =
that is part of a decentralized model, for example, it would be quite diff=
erent than how this might work in a more complex, centralized solution.  Ma=
ybe this might get addressed one day, but I doubt it.  There seems to be a=
 tendency these days to standardize the least possible.  Even this draft is=
 just _a_ solution to the MD/KD interface problem.
>
>
>>    When sending the "ServerHello" message, the Key Distributor MUST
>>    insert its own unique identifier in the "external_session_id"
>>    extension.  This value MUST also be conveyed back to the client via
>>    SDP as a "tls-id" attribute.
>>
>>It's not really clear that the binding between the endpoint that is
>>supposedly presenting the DTLS data and the SDP data has been
>>established at all here, so the selection of what "tls-id" to use here
>>feels rather speculative.  I think we should discuss the security
>>considerations for what is leaked if the key distributor sends the
>>"wrong" values here...
>
>I think this gets back to the issue of the call control / KD interface tha=
t is not defined.  The KD _will_ get SDP from the endpoint before DTLS happ=
ens.  It cannot work any other way.  The endpoint needs to receive and SDP=
 response with the address of the MD in order to initiate DTLS.  In between=
 these steps, somehow through magic not defined, yet definitely outside the=
 scope of this document, the KD will have been party to this SDP exchange an=
d have this data.
>
>If the wrong values are transmitted, the DTLS session should fail since ei=
ther the KD or endpoint would detect a mismatch with SDP.
>
>
>>I'm also not sure if the sequencing of events is properly described
>>here.  Does the SDP need to complete before the DTLS handshake begins,
>>or can they proceed in parallel as described here?
>
>SDP must happen first.
>
>
>>
>>Section 6
>>
>>                                                                 Tunnel
>>    messages are specified using the format described in [RFC5246]
>>    section 4.  [...]
>>
>>I think that =C2=A73 of RFC 8446 is probably a better reference for TLS
>>presentation language at this point.
>
>This was updated in draft -10.
>
>>
>>
>>Section 6.5
>>
>>I'm not sure what purpose sending an empty dtls_message would serve.
>>
>>    *  "dtls_message": the content of the DTLS message received by the
>>       endpoint or to be sent to the endpoint.
>>
>>I recommend saying something about "including record-layer framing" to
>>reiterate where the boundary is.
>
>OK. I've added "This includes one or more complete  DTLS records."  I'm ha=
ppy to adjust the language as you suggest.
>
>
>>Section 9
>>
>>I strongly recommend upgrading the TLS version between media distributor
>>and key distributor to be TLS 1.3.  Whether or not to use DTLS 1.2 or
>>1.3 for the tunneled traffic between endpoint and key distributor is an
>>orthogonal topic.
>
>I've upgraded all references to the latest drafts and RFCs, I think.  No p=
oint referring to old stuff.
>
>
>>I'd also reiterate that the media distributor has access to metadata
>>about the endpoint/key distributor communications, even though the main
>>content and key information is encrypted.
>
>OK, I added a sentence to the security considerations section on that.
>
>>I'd also consider calling out that the media distributor could generate
>>false EndpointDisconnect messages, but that this is essentially the same
>>capability afforded by just not forwarding media anymore.
>
>I'll add something about that, too.
>
>
>>    A requirement in this document is that a TLS connection between the
>>    Media Distributor and the Key Distributor be mutually authenticated.
>>    The reason for this requirement is to ensure that only an authorized
>>    Media Distributor receives the HBH keying material.  [...]
>>
>>Can we say anything about what the Key Distributor's authorization
>>policy might be, using the authenticated identity of the TLS peer as
>>input?  "Any authenticated identity is granted all access" is not a
>>great authorization policy :)
>
>I think this gets into the "what is between the KD and the endpoint" probl=
em.  I do not know what the policy might be, how the KD decides who is and=
 is not allowed in a conference, etc.  Those things are outside the scope of =
this document and never settled.
>
>
>>NITS
>
>I think all of these below were addressed already in draft -10.  I did cha=
nge the syntax so that DTLS messages cannot be 0 octets in length (as you s=
uggested above).
>
>
>
>
>>
>>
>>Abstract
>>
>>    This document defines a DTLS tunneling protocol for use in multimedia
>>
>>I think the hyphenated "DTLS-tunneling" would clarify that DTLS is being
>>tunneled (as opposed to the mechanism used to tunnel other things).
>>A slightly more intrusive change would be "protocol for tunneling DTLS
>>traffic" but that might be confusing in the terse setting of the
>>Abstract.
>>
>>Section 1
>>
>>    By establishing this TLS tunnel between the Media Distributor and Key
>>    Distributor and implementing the protocol defined in this document,
>>    it is possible for the Media Distributor to facilitate the
>>    establishment of a secure DTLS association between an endpoint and
>>    the Key Distributor in order for the endpoint to receive E2E and HBH
>>    keying material.  [...]
>>
>>I think "receive" might not be the best word here, since the key
>>material should incorporate contributions from both parties; the "arrive
>>at" language used in the previous paragraph was good.
>>
>>Section 4
>>
>>    As DTLS messages are received from the endpoint by the Media
>>    Distributor, they are forwarded to the Key Distributor encapsulated
>>    inside a "TunneledDtls" message.  Likewise, as "TunneledDtls"
>>    messages are received by the Media Distributor from the Mey
>>    Distributor, the encapsulated DTLS packet is forwarded to the
>>    endpoint.
>>
>>s/Mey/Key/
>>
>>Section 5.1
>>
>>    The endpoint MUST include a unique identifier in the "tls-id" SDP
>>    [RFC4566] attribute sent by the endpoint in both offer and answer
>>    [RFC3264] messages as per [RFC8842].  Further, the endpoint MUST
>>    include this same unique identifier in the "external_session_id"
>>    extension [RFC8844] in the "ClientHello" message when establishing a
>>    DTLS association.
>>
>>Since this is the section about the endpoint procedures (the key
>>distributor's behavior is discussed later), I think we might avoid
>>phrasing that implies a linked offer/answer pair, and instead say
>>something like "in all offer and answer messages that it generates".
>>
>>Section 5.4
>>
>>    The Key Distributor MUST encapsulate any DTLS message it sends to an
>>    endpoint inside a "TunneledDtls" message (see Section 6).  The Key
>>    Distributor is not required to transmit all messages a given DTLS
>>    association through the same tunnel if more than one tunnel has been
>>    established between it and a Media Distributor.
>>
>>I suggest "a given Media Distributor", since the current phrasing seems
>>to allow sending to a different media distributor entirely, which seems
>>unlikely to work since the UUID identifying the DTLS association will
>>not be recognized there.
>>
>>    The Key Distributor MUST select a cipher that is supported by both
>>    the endpoint and the Media Distributor to ensure proper HBH
>>    operations.
>>
>>(It also has to pick a cipher that it itself supports...)
>>
>>Section 5.5
>>
>>    "UnsupportedVersion".  The Media Distributor can determine from the
>>    first two octets received what the version number is and that the
>>    message is "UnsupportedVersion".  The rest of the data received, if
>>
>>I think that the "two" should be either "one" or "four", as the actual
>>message structure has two octets of length between the message type and
>>the unsupported_version structure.  One octet is needed to determine
>>that it is an unsupported-version message, and four to determine the
>>highest supported version number.
>>
>>Section 6.2
>>
>>    struct {
>>        uint8 version;
>>        SRTPProtectionProfile protection_profiles<0..2^16-1>;
>>    } SupportedProfiles;
>>
>>The presentation language allows an empty list of profiles; is that
>>intended to be allowed?  (What happens if an empty list is sent?)
>>
>>    *  "version": indicates the version of the protocol to use (0x00).
>>
>>I suggest "this document specifies version 0x00" rather than the
>>parenthetical.
>>
>>
>>
>
>_______________________________________________
>Perc mailing list
>Perc@ietf.org
>https://www.ietf.org/mailman/listinfo/perc


From nobody Thu Oct 28 16:22:36 2021
Return-Path: <kaduk@mit.edu>
X-Original-To: perc@ietfa.amsl.com
Delivered-To: perc@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 8680B3A138D; Thu, 28 Oct 2021 16:22:30 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.498
X-Spam-Level: 
X-Spam-Status: No, score=-1.498 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, KHOP_HELO_FCRDNS=0.4, SPF_HELO_NONE=0.001, SPF_NONE=0.001] autolearn=no autolearn_force=no
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 hJdNE8T_wepk; Thu, 28 Oct 2021 16:22:27 -0700 (PDT)
Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id CD3F93A138A; Thu, 28 Oct 2021 16:22:26 -0700 (PDT)
Received: from kduck.mit.edu ([24.16.140.251]) (authenticated bits=56) (User authenticated as kaduk@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 19SNMDCh017834 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 28 Oct 2021 19:22:19 -0400
Date: Thu, 28 Oct 2021 16:22:13 -0700
From: Benjamin Kaduk <kaduk@mit.edu>
To: "Paul E. Jones" <paulej@packetizer.com>
Cc: The IESG <iesg@ietf.org>, draft-ietf-perc-dtls-tunnel@ietf.org, perc-chairs@ietf.org, perc@ietf.org, suhasietf@gmail.com
Message-ID: <20211028232213.GX54936@kduck.mit.edu>
References: <163423899560.11624.17767066695024804386@ietfa.amsl.com> <em3d81a846-2e4d-49b9-92d7-a4d651eff2e9@sydney>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <em3d81a846-2e4d-49b9-92d7-a4d651eff2e9@sydney>
Archived-At: <https://mailarchive.ietf.org/arch/msg/perc/OCe7F0ZBAvUsXUT8CKhWP66_j80>
Subject: Re: [Perc] Benjamin Kaduk's Discuss on draft-ietf-perc-dtls-tunnel-10: (with DISCUSS and COMMENT)
X-BeenThere: perc@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Privacy Enhanced RTP Conferencing <perc.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/perc>, <mailto:perc-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/perc/>
List-Post: <mailto:perc@ietf.org>
List-Help: <mailto:perc-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/perc>, <mailto:perc-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 28 Oct 2021 23:22:31 -0000

Hi Paul,

Thanks for going ahead and publishing the -11 while I was heads-down on
other things.

I've updated my ballot position in the datatracker to "No Objection", so
Murray should be able to go ahead and mark this as approved (assuming
nothing comes out of the below).

Just a couple further notes inline.

On Thu, Oct 21, 2021 at 04:11:50AM +0000, Paul E. Jones wrote:
> Ben,
> 
> I responded to points below, but to see the changes I've made, see this:
> https://github.com/percwg/perc-wg/pull/185
> 
>   If you'd prefer, I can publish draft -11 now or we can further revise 
> this PR.
> 
> Thanks!
> Paul
> 
> 
> >----------------------------------------------------------------------
> >DISCUSS:
> >----------------------------------------------------------------------
> >
> >Thank you for the updates in the -10; they are improvements.
> >I also see that we had enough discussion of Informational vs
> >Standards-Track for this document, with no one really wanting to push
> >for it to be a Proposed Standard.
> >Unfortunately, I think there are still a couple places remaining that
> >aren't quite compatible with DTLS 1.3, and so an additional revision
> >will be required.
> >
> >Section 5.4
> >
> >(1)
> >
> >     When sending the ServerHello message, the Key Distributor MUST insert
> >     its own unique identifier in the external_session_id extension. This
> >     value MUST also be conveyed back to the client via SDP as a tls-id
> >     attribute.
> >
> >In (D)TLS 1.3, the external_session_id extension goes in the
> >EncryptedExtensions message, not the ServerHello.  One way to handle
> >this scenario in a DTLS-version-agnostic manner would be
> >
> >NEW:
> >     The Key Distributor MUST report its own unique identifier in the
> >     "external_session_id" extension.  This extension is sent in the
> >     EncryptedExtensions message in DTLS 1.3, and the ServerHello in
> >     previous DTLS versions.  This value MUST also be conveyed back to
> >     the client via SDP as a tls-id attribute.
> 
> Thank you.  I made the changes as you suggest.
> 
> 
> >
> >
> >(2)
> >
> >     The Key Distributor MUST send a MediaKeys message to the Media
> >     Distributor as soon as a HBH encryption key is computed. The MediaKeys
> >     message includes the selected cipher (i.e. protection profile), MKI
> >     [RFC3711] value (if any), SRTP master keys, and SRTP master salt values.
> >     The Key Distributor MUST use the same association identifier in the
> >     MediaKeys message as is used in the TunneledDtls messages for the given
> >     endpoint.
> >
> >"As soon as a HBH encryption key is computed" is too soon.
> >The key is available before the endpoint is authenticated, and a
> >properly operating DTLS-SRTP session should not send media before the
> >mutual authentication has completed; sending the HBH encryption key "when
> >available" would allow the media distributor (which has no visibility
> >into when the DTLS handshake is completed) to send media even though the
> >authentication is not complete.  I think it would be more appropriate to
> >say that the MediaKeys message is sent when the DTLS handshake is
> >complete, which is unambiguous and a condition that is universally
> >applicable to all DTLS versions.  That might be written as something
> >like
> >
> >NEW:
> >     The Key Distributor MUST send a MediaKeys message to the Media
> >     Distributor immediately after the DTLS handshake completes. The MediaKeys
> >     message includes the selected cipher (i.e. protection profile), MKI
> >     [RFC3711] value (if any), SRTP master keys, and SRTP master salt values.
> >     The Key Distributor MUST use the same association identifier in the
> >     MediaKeys message as is used in the TunneledDtls messages for the given
> >     endpoint.
> 
> Good point.  Change made as suggested.
> 
> 
> >
> >
> >
> >----------------------------------------------------------------------
> >COMMENT:
> >----------------------------------------------------------------------
> >
> >A couple remarks on the -10:
> >
> >Section 5.4
> >
> >     The Key Distributor MUST match the certificate fingerprint [RFC4572] and
> >     external_session_id received from endpoint's ClientHello message with
> >     the values received from the SDP transmitted by the endpoint [RFC8122].
> >
> >As far as I can tell, the certificate fingerprint is in the
> >"external_id_hash" TLS extension in the ClientHello, but this document
> >does not mention that extension name in any location.  I strongly
> >suggest noting somewhere (possibly earlier) that the fingerprint hash
> >used here is conveyed in the "external_id_hash" extension.  (Also, 4752
> >is obsoleted by 8122, and does not cover the TLS conveyance of the
> >fingerprint at all.) One way to do that would be
> >
> >NEW:
> >
> >     The Key Distributor MUST match the certificate fingerprint [RFC8122]
> >     and unique session identifier received in the "external_id_hash"
> >     [RFC8844] and "external_session_id" [RFC8844] TLS extensions
> >     (respectively) of the endpoint's ClientHello message with the values
> >     received from the SDP transmitted by the endpoint [RFC8122].
> 
> Actually, that was not the intended behavior. The intent was for the Key 
> Distributor to match what it sees from the endpoint via DTLS with the 
> expected values received via SDP.

Hmm, okay.  I admite that I do not have all of WebRTC in my head, so I may
well just be wrong, but I had thought that the "tls-id" values from SDP
were themselves sent in a TLS extension per RFC 8844, as a way to
authenticate the binding between the SDP exchange and the TLS handshake.

> I modified the text as follows, including repeated references to 
> hopefully make this clearer:
> 
>      The Key Distributor **MUST** match the certificate fingerprint and
>      `external_session_id` [@!RFC8844] received from endpoint via DTLS 
> with the
>      expected fingerprint [@!RFC8122] and `tls-id` [@!RFC8842] values 
> received via
>      SDP.  It is through this process that the Key Distributor can be 
> sure to
>      deliver the correct conference key to the endpoint.
> 
> Hopefully this helps.  The certificate fingerprint is computed by the 
> KD, but using the same method as would have been performed in generating 
> the "fingerprint" SDP value described in RFC 8122.

This helps in that it removes mention of the ClientHello (if the
fingerprint isn't in an extension, it's not available from just the
ClientHello).  This formulation is still not very satisfying for me (in a
rather pedantic way that probably doesn't bother many people), since the
certificate is what's received via DTLS, and the fingerprint is computed
from the certificate.  If you're up for more changes, I would propose "MUST
match the fingerprint of the certificate, and the "external_session_id"
[RFC8844], received from the endpoint via DTLS".

> 
> >Section 5.5
> >
> >     Note that it is not necessary for the Media Distributor to
> >     understand the newer version of the protocol to understand that the
> >     first message received is UnsupportedVersion. The Media Distributor can
> >     determine from the first four octets received what the version number is
> >     and that the message is UnsupportedVersion.
> >
> >This would be great content for a "protocol invariants" section, though
> >given the lack of interest in changing the target status of this
> >document to Standards-Track I do not expect there to be much interest in
> >putting together a "protocol invariants" section.
> 
> If we ever see a second version, maybe. :)
> 
> 
> >
> >
> >=============== Ballot Comments from the -09 preserved below for posterity ===========
> >
> >I have a few general remarks before diving into the section-by-section
> >commentary (with nits split off into a final section).
> >
> >It seems like one of the key security-relevant aspects of this setup is
> >how the information in (unauthenticated) incoming DTLS messages at the
> >key distributor are mapped up to the existing (or in the process of
> >establishment?) SDP sessions that describe the expected DTLS
> >session construction (and the media to be carried over DTLS-SRTP).  It
> >seems that in the general case, a given Key Distributor will be engaged
> >in many active and pending sessions, and thus will need to be able to
> >look up across many clients and sessions which SDP state might be a
> >match for a given DTLS ClientHello, while avoiding DoS attacks and not
> >committing any given SDP session to a DTLS association prior to the
> >completion of the DTLS handshake.  My preference would be to see a lot
> >more discussion in the document about this type of considerations,
> >though for an Informational protocol I won't insist on it (this is a
> >non-blocking comment).
> 
> I can appreciate that, though I know this would lead to a lot of debate 
> on architecture that I don't think we have the luxury to do at this 
> point.
> 
> 
> >With the media distributor acting as an intermediary that is partially
> >trusted, the situation is more complicated than usual, and the key
> >distributor cannot use transport coordinates to identify DTLS
> >associations, and instead the only index available is the UUID assigned
> >by the media distributor.  To some extent we rely on the media
> >distributor to properly map DTLS packets to the UUID identifier, but
> >AFAICT if the media distributor fails to do so, the DTLS cryptographic
> >mechanisms will detect such errors and either abort the handshake or
> >(post-handshake) reject invalid messages.  It might be worth reiterating
> >that DTLS does provide this form of protection.
> 
> Indeed, this could be another attack vector the KD implementations 
> should consider.  I'll add a paragraph on that.
> 
> 
> >Since the UUID is the only index that the key distributor has for DTLS
> >associations, there does not seem to be any risk of having the media
> >distributor trick the key distributor into releasing HBH keys from the
> >"wrong" association -- keys should only be released if the DTLS
> >handshake will complete successfully (but see the Discuss point #1!),
> >and the completion of the handshake authenticates the overall exchange
> >so that it's safe to release keys via the channel that identifies the
> >handshake (i.e., the UUID).  There does seem to only be very
> >coarsed-grained "trusted or not" authorization for media servers to
> >receive keys at all, though -- a malicious-but-trusted media distributor
> >that had on-path access for some other DTLS flows could relay them to
> >the key distributor and have the DTLS handshake succeed along that path,
> >even if it was not the intended path, and would get the HBH keys as a
> >result.
> 
> I do not think this would be possible since the Key Distributor would 
> not accept a connection if it could not match the certificate and 
> tls_id.  That information would have been conveyed to the key 
> distributor via SDP and, if the key distributor could not perform that 
> match, the DTLS session would be rejected.
> 
> 
> >Does it only make sense to use this tunneling protocol with a "DOUBLE"
> >DTLS-SRTP profile?  If so, that might be worth mentioning somewhere more
> >explicitly.
> 
> I wish you were in the group when reviewing the entirety of the system, 
> because this is a better catch than this short paragraph suggests.  
> Indeed, only DOUBLE protection profiles are defined for PERC.  I did not 
> see any text that actually explains that the MediaKeys message only 
> contains the portion of the key used for HBH encryption/decryption.  if 
> you saw this stated elsewhere, let me know.  I propose fixing this 
> oversight with this text in the Key Distributor section:
> 
>      There are presently two SRTP protection profiles defined for PERC,
>      namely `DOUBLE_AEAD_AES_128_GCM_AEAD_AES_128_GCM` and
>      `DOUBLE_AEAD_AES_256_GCM_AEAD_AES_256_GCM` [!@RFC8723].  As 
> [!@RFC8723]
>      explains in Section 5.2, the Media Distributor is only given the 
> SRTP
>      master key for HBH operations.  As such, the SRTP master key
>      length advertised in the `MediaKeys` message is half the length of 
> the key
>      normally associated with selected "double" protection profile.
> 
> 
> >Section 3
> >
> >    The Key Distributor is a logical function that might be co-resident
> >    with a key management server operated by an enterprise, reside in one
> >    of the endpoints participating in the conference, or elsewhere that
> >    is trusted with E2E keying material.
> >
> >Do we want to say something about the Key Distributor acting at a higher
> >level of trust than the Media Distributor?  (Is that even always true?)
> 
> This is always true and explained in the PERC framework document (RFC 
> 8871).  We could add more text here, but I would personally prefer to 
> not add more than is strictly necessary for this piece of the larger 
> architecture.
> 
> 
> >Section 4
> >
> >Figure 2 seems to show the MediaKeys being delivered to the Media
> >Distributor after only a single message from the Endpoint (i.e., prior
> >to the completion of the DTLS handshake).  I don't think that is
> >accurate, and it seems like that arrow should be moved later in the time
> >sequence.
> 
> It was accurate, until you changed it in this email exchange. :)
> 
> I updated the diagram to put that at the bottom.  However, there is 
> nothing in the diagram that explicitly says the handshake completes in 
> the diagram, but I think it is hinted at now. It is explicitly stated 
> now in the body of the text now, though.

That makes sense to me, thanks.

> 
> >
> >Section 5.4
> >
> >    When processing an incoming endpoint association, the Key Distributor
> >    MUST extract the "external_session_id" value transmitted in the
> >    "ClientHello" message and match that against "tls-id" value the
> >    endpoint transmitted via SDP.  If the values in SDP and the
> >    "ClientHello" do not match, the DTLS association MUST be rejected.
> >
> >The Key Distributor might have multiple pending associations, and
> >potentially only weak bindings to endpoint identities prior to DTLS
> >establishment, so it's not clear that "match [external_session_id]
> >against 'tls-id' value the endpoint transmitted via SDP" is entirely
> >accurate.  I'm implicitly inserting a "the" before "tls-id" to make it
> >parse, but the implicit "the" is not a good fit since the definite
> >article implies there is a single one identified but there may be
> >multiple pending associations.  AFAICT at this point in processing the
> >only real identifier that the key distributor has for the pending DTLS
> >association is the UUID from the media distributor and there is no tight
> >association betwen that identifier and the "tld-id" value that (per the
> >following paragraph) is conveyed to the key distributor in some
> >unspecified manner.
> 
> Before the DTLS session is initiated, an SDP exchange would have 
> occurred.  After all, the endpoint would not even know where to send a 
> DTLS message otherwise. That is something outside the scope of this 
> document, though.  The Key Distributor would already have something to 
> pin this DTLS session against.
> 
> 
> >    The Key Distributor MUST match the certificate fingerprint and
> >    "external_session_id" received from endpoint's "ClientHello" message
> >    with the values received from the SDP transmitted by the endpoint.
> >
> >This sentence is rather confusing to me, since I don't know of a
> >certificate fingerprint conveyed in the ClientHello itself (as opposed
> >to the fingerprint of the certificate contained in the Certificate
> >message presented during the handshake).
> 
> Hopefully this is less confusing in the next draft given the changes I 
> mentioned above.  The fingerprint and "external_session_id" are both 
> discussed in RFC 8122.  The text should be clearer than before, but 
> perhaps another pass is needed to ensure that's true.
> 
> 
> >    It is through this process that the Key Distributor can be sure to
> >    deliver the correct conference key to the endpoint.
> >
> >Do we need to say anything about how the Key Distributor gets the
> >fingerprint and external_session_id values from SDP?  (I mean, I assume
> >that it's the same way that it gets the "tls-id", but the previous
> >paragraph just talked about "tls-id" and not the other stuff, so
> >formally it's ambiguous.)
> 
> That is one aspect of the solution that the WG explicitly did not want 
> to define.  The reason was that there is more than one possible protocol 
> that might be used depending on where the KD is situated and how the KD 
> interfaces with call control.  In cases where the KD is integrated with 
> an endpoint that is part of a decentralized model, for example, it would 
> be quite different than how this might work in a more complex, 
> centralized solution.  Maybe this might get addressed one day, but I 
> doubt it.  There seems to be a tendency these days to standardize the 
> least possible.  Even this draft is just _a_ solution to the MD/KD 
> interface problem.
> 
> 
> >    When sending the "ServerHello" message, the Key Distributor MUST
> >    insert its own unique identifier in the "external_session_id"
> >    extension.  This value MUST also be conveyed back to the client via
> >    SDP as a "tls-id" attribute.
> >
> >It's not really clear that the binding between the endpoint that is
> >supposedly presenting the DTLS data and the SDP data has been
> >established at all here, so the selection of what "tls-id" to use here
> >feels rather speculative.  I think we should discuss the security
> >considerations for what is leaked if the key distributor sends the
> >"wrong" values here...
> 
> I think this gets back to the issue of the call control / KD interface 
> that is not defined.  The KD _will_ get SDP from the endpoint before 
> DTLS happens.  It cannot work any other way.  The endpoint needs to 
> receive and SDP response with the address of the MD in order to initiate 
> DTLS.  In between these steps, somehow through magic not defined, yet 
> definitely outside the scope of this document, the KD will have been 
> party to this SDP exchange and have this data.
> 
> If the wrong values are transmitted, the DTLS session should fail since 
> either the KD or endpoint would detect a mismatch with SDP.
> 
> 
> >I'm also not sure if the sequencing of events is properly described
> >here.  Does the SDP need to complete before the DTLS handshake begins,
> >or can they proceed in parallel as described here?
> 
> SDP must happen first.
> 
> 
> >
> >Section 6
> >
> >                                                                 Tunnel
> >    messages are specified using the format described in [RFC5246]
> >    section 4.  [...]
> >
> >I think that §3 of RFC 8446 is probably a better reference for TLS
> >presentation language at this point.
> 
> This was updated in draft -10.
> 
> >
> >
> >Section 6.5
> >
> >I'm not sure what purpose sending an empty dtls_message would serve.
> >
> >    *  "dtls_message": the content of the DTLS message received by the
> >       endpoint or to be sent to the endpoint.
> >
> >I recommend saying something about "including record-layer framing" to
> >reiterate where the boundary is.
> 
> OK. I've added "This includes one or more complete  DTLS records."  I'm 
> happy to adjust the language as you suggest.
> 
> 
> >Section 9
> >
> >I strongly recommend upgrading the TLS version between media distributor
> >and key distributor to be TLS 1.3.  Whether or not to use DTLS 1.2 or
> >1.3 for the tunneled traffic between endpoint and key distributor is an
> >orthogonal topic.
> 
> I've upgraded all references to the latest drafts and RFCs, I think.  No 
> point referring to old stuff.
> 
> 
> >I'd also reiterate that the media distributor has access to metadata
> >about the endpoint/key distributor communications, even though the main
> >content and key information is encrypted.
> 
> OK, I added a sentence to the security considerations section on that.
> 
> >I'd also consider calling out that the media distributor could generate
> >false EndpointDisconnect messages, but that this is essentially the same
> >capability afforded by just not forwarding media anymore.
> 
> I'll add something about that, too.
> 
> 
> >    A requirement in this document is that a TLS connection between the
> >    Media Distributor and the Key Distributor be mutually authenticated.
> >    The reason for this requirement is to ensure that only an authorized
> >    Media Distributor receives the HBH keying material.  [...]
> >
> >Can we say anything about what the Key Distributor's authorization
> >policy might be, using the authenticated identity of the TLS peer as
> >input?  "Any authenticated identity is granted all access" is not a
> >great authorization policy :)
> 
> I think this gets into the "what is between the KD and the endpoint" 
> problem.  I do not know what the policy might be, how the KD decides who 
> is and is not allowed in a conference, etc.  Those things are outside 
> the scope of this document and never settled.
> 
> 
> >NITS
> 
> I think all of these below were addressed already in draft -10.  I did 
> change the syntax so that DTLS messages cannot be 0 octets in length (as 
> you suggested above).

Okay.  (If I remember correctly I did not even try to figure out which of
these bits had changed in the -10.)

Many thanks for all the discussion above, and the updates to the document
-- I really appreciate having the extra background.

-Ben

> 
> 
> 
> >
> >
> >Abstract
> >
> >    This document defines a DTLS tunneling protocol for use in multimedia
> >
> >I think the hyphenated "DTLS-tunneling" would clarify that DTLS is being
> >tunneled (as opposed to the mechanism used to tunnel other things).
> >A slightly more intrusive change would be "protocol for tunneling DTLS
> >traffic" but that might be confusing in the terse setting of the
> >Abstract.
> >
> >Section 1
> >
> >    By establishing this TLS tunnel between the Media Distributor and Key
> >    Distributor and implementing the protocol defined in this document,
> >    it is possible for the Media Distributor to facilitate the
> >    establishment of a secure DTLS association between an endpoint and
> >    the Key Distributor in order for the endpoint to receive E2E and HBH
> >    keying material.  [...]
> >
> >I think "receive" might not be the best word here, since the key
> >material should incorporate contributions from both parties; the "arrive
> >at" language used in the previous paragraph was good.
> >
> >Section 4
> >
> >    As DTLS messages are received from the endpoint by the Media
> >    Distributor, they are forwarded to the Key Distributor encapsulated
> >    inside a "TunneledDtls" message.  Likewise, as "TunneledDtls"
> >    messages are received by the Media Distributor from the Mey
> >    Distributor, the encapsulated DTLS packet is forwarded to the
> >    endpoint.
> >
> >s/Mey/Key/
> >
> >Section 5.1
> >
> >    The endpoint MUST include a unique identifier in the "tls-id" SDP
> >    [RFC4566] attribute sent by the endpoint in both offer and answer
> >    [RFC3264] messages as per [RFC8842].  Further, the endpoint MUST
> >    include this same unique identifier in the "external_session_id"
> >    extension [RFC8844] in the "ClientHello" message when establishing a
> >    DTLS association.
> >
> >Since this is the section about the endpoint procedures (the key
> >distributor's behavior is discussed later), I think we might avoid
> >phrasing that implies a linked offer/answer pair, and instead say
> >something like "in all offer and answer messages that it generates".
> >
> >Section 5.4
> >
> >    The Key Distributor MUST encapsulate any DTLS message it sends to an
> >    endpoint inside a "TunneledDtls" message (see Section 6).  The Key
> >    Distributor is not required to transmit all messages a given DTLS
> >    association through the same tunnel if more than one tunnel has been
> >    established between it and a Media Distributor.
> >
> >I suggest "a given Media Distributor", since the current phrasing seems
> >to allow sending to a different media distributor entirely, which seems
> >unlikely to work since the UUID identifying the DTLS association will
> >not be recognized there.
> >
> >    The Key Distributor MUST select a cipher that is supported by both
> >    the endpoint and the Media Distributor to ensure proper HBH
> >    operations.
> >
> >(It also has to pick a cipher that it itself supports...)
> >
> >Section 5.5
> >
> >    "UnsupportedVersion".  The Media Distributor can determine from the
> >    first two octets received what the version number is and that the
> >    message is "UnsupportedVersion".  The rest of the data received, if
> >
> >I think that the "two" should be either "one" or "four", as the actual
> >message structure has two octets of length between the message type and
> >the unsupported_version structure.  One octet is needed to determine
> >that it is an unsupported-version message, and four to determine the
> >highest supported version number.
> >
> >Section 6.2
> >
> >    struct {
> >        uint8 version;
> >        SRTPProtectionProfile protection_profiles<0..2^16-1>;
> >    } SupportedProfiles;
> >
> >The presentation language allows an empty list of profiles; is that
> >intended to be allowed?  (What happens if an empty list is sent?)
> >
> >    *  "version": indicates the version of the protocol to use (0x00).
> >
> >I suggest "this document specifies version 0x00" rather than the
> >parenthetical.
> >
> >
> >
> 


From nobody Sun Oct 31 10:42:00 2021
Return-Path: <paulej@packetizer.com>
X-Original-To: perc@ietfa.amsl.com
Delivered-To: perc@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 43DC03A101A; Sun, 31 Oct 2021 10:41:53 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.099
X-Spam-Level: 
X-Spam-Status: No, score=-2.099 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_PASS=-0.001, UNPARSEABLE_RELAY=0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=packetizer.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 qw13hXqpPjab; Sun, 31 Oct 2021 10:41:48 -0700 (PDT)
Received: from dublin.packetizer.com (dublin.packetizer.com [IPv6:2600:1f18:24d6:2e01:e842:9b2b:72a2:d2c6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 062893A1013; Sun, 31 Oct 2021 10:41:47 -0700 (PDT)
Received: from authuser (localhost [127.0.0.1]) 
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=packetizer.com; s=dublin; t=1635702100; bh=TjTdNbkwQoOPBKBqqrFPgph6MiWDDKThtClzr8Nc+RE=; h=From:To:Subject:Cc:Date:In-Reply-To:References:Reply-To; b=K4hv18sRvL8SoW35816SXrVyEuNSst6fPgJ2vR8qLJ5nNklbjUySGkagFObc0+qMB WnyQ+v1Ky8J2aNVCwui1WS6iXIm+oxje9dTSyAcZ9OpTucWkT7HRxClFVOjKwgOFAq OBgf6IAHkUii6qf0oBkFf3xLRtmDJ1QDfRhlBRjM=
From: "Paul E. Jones" <paulej@packetizer.com>
To: "Benjamin Kaduk" <kaduk@mit.edu>
Cc: "The IESG" <iesg@ietf.org>, draft-ietf-perc-dtls-tunnel@ietf.org, perc-chairs@ietf.org, perc@ietf.org, suhasietf@gmail.com
Date: Sun, 31 Oct 2021 17:41:36 +0000
Message-Id: <em10ad3111-5dbf-4e0b-a268-52f89eb923cb@sydney>
In-Reply-To: <20211028232213.GX54936@kduck.mit.edu>
References: <163423899560.11624.17767066695024804386@ietfa.amsl.com> <em3d81a846-2e4d-49b9-92d7-a4d651eff2e9@sydney> <20211028232213.GX54936@kduck.mit.edu>
Reply-To: "Paul E. Jones" <paulej@packetizer.com>
User-Agent: eM_Client/8.2.1659.0
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/perc/NSlngbnw8X_AqI_0G-8OXE7UNJ8>
Subject: Re: [Perc] Benjamin Kaduk's Discuss on draft-ietf-perc-dtls-tunnel-10: (with DISCUSS and COMMENT)
X-BeenThere: perc@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Privacy Enhanced RTP Conferencing <perc.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/perc>, <mailto:perc-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/perc/>
List-Post: <mailto:perc@ietf.org>
List-Help: <mailto:perc-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/perc>, <mailto:perc-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sun, 31 Oct 2021 17:41:53 -0000

Ben,

>>  >As far as I can tell, the certificate fingerprint is in the
>>  >"external_id_hash" TLS extension in the ClientHello, but this document
>>  >does not mention that extension name in any location.  I strongly
>>  >suggest noting somewhere (possibly earlier) that the fingerprint hash
>>  >used here is conveyed in the "external_id_hash" extension.  (Also, 475=
2
>>  >is obsoleted by 8122, and does not cover the TLS conveyance of the
>>  >fingerprint at all.) One way to do that would be
>>  >
>>  >NEW:
>>  >
>>  >     The Key Distributor MUST match the certificate fingerprint [RFC81=
22]
>>  >     and unique session identifier received in the "external_id_hash"
>>  >     [RFC8844] and "external_session_id" [RFC8844] TLS extensions
>>  >     (respectively) of the endpoint's ClientHello message with the val=
ues
>>  >     received from the SDP transmitted by the endpoint [RFC8122].
>>
>>  Actually, that was not the intended behavior. The intent was for the Ke=
y
>>  Distributor to match what it sees from the endpoint via DTLS with the
>>  expected values received via SDP.
>
>Hmm, okay.  I admite that I do not have all of WebRTC in my head, so I may
>well just be wrong, but I had thought that the "tls-id" values from SDP
>were themselves sent in a TLS extension per RFC 8844, as a way to
>authenticate the binding between the SDP exchange and the TLS handshake.

The "tls-id" is first sent in SDP from the endpoint as it tries to=20
establish a call or join a conference.  The endpoint will receive an=20
answer to that SDP containing, among other things, the transport=20
address(es) to which DTLS packets should be sent.  The initiating=20
endpoint then initiates a DTLS handshake and includes the "TLS ID" value=20
in the "external_session_id" extension.  This is how the Key Distributor=20
is able to differentiate between a plurality of "calls" that might be=20
initiated at or about the same time from the same endpoint.  (There are=20
perhaps other security benefits described in the associated RFCs, but=20
this is the primary benefit for the tunnel draft).  I think this is all=20
correct, but if you or others see a glaring hole or error, I'm happy to=20
correct it.  Maybe the language still is not clear enough.


>
>>  I modified the text as follows, including repeated references to
>>  hopefully make this clearer:
>>
>>       The Key Distributor **MUST** match the certificate fingerprint and
>>       `external_session_id` [@!RFC8844] received from endpoint via DTLS
>>  with the
>>       expected fingerprint [@!RFC8122] and `tls-id` [@!RFC8842] values
>>  received via
>>       SDP.  It is through this process that the Key Distributor can be
>>  sure to
>>       deliver the correct conference key to the endpoint.
>>
>>  Hopefully this helps.  The certificate fingerprint is computed by the
>>  KD, but using the same method as would have been performed in generatin=
g
>>  the "fingerprint" SDP value described in RFC 8122.
>
>This helps in that it removes mention of the ClientHello (if the
>fingerprint isn't in an extension, it's not available from just the
>ClientHello).  This formulation is still not very satisfying for me (in a
>rather pedantic way that probably doesn't bother many people), since the
>certificate is what's received via DTLS, and the fingerprint is computed
>from the certificate.  If you're up for more changes, I would propose "MUS=
T
>match the fingerprint of the certificate, and the "external_session_id"
>[RFC8844], received from the endpoint via DTLS".

I'm always open to improvements.  How is this?

     The Key Distributor **MUST** match the fingerprint of the=20
certificate and
     `external_session_id` [@!RFC8844] received from endpoint via DTLS=20
with the
     expected fingerprint [@!RFC8122] and `tls-id` [@!RFC8842] values=20
received via
     SDP.  It is through this process that the Key Distributor can be=20
sure to
     deliver the correct conference key to the endpoint.

Paul

