<?xml version="1.0" encoding="iso-8859-1"?>
<!-- comment -->
<!DOCTYPE rfc SYSTEM "rfc2629.dtd"[]>
<?rfc toc="yes" ?>
<?rfc compact="yes" ?>
<?rfc sortrefs="no" ?>
<rfc ipr="trust200902" category="std" docName="draft-ietf-mmusic-dtls-sdp-30.txt" updates="5763,7345" submissionType="IETF" xml:lang="en">
  <front>
    <title>
        Session Description Protocol (SDP) Offer/Answer Considerations for Datagram Transport Layer Security (DTLS)
        and Transport Layer Security (TLS)
    </title>
    <author fullname="Christer Holmberg" initials="C.H." surname="Holmberg">
        <organization abbrev="Ericsson">Ericsson</organization>
        <address>
            <postal>
                <street>Hirsalantie 11</street>
                <city>Jorvas</city>
                <region></region>
                <code>02420</code>
                <country>Finland</country>
            </postal>
            <phone></phone>
            <email>christer.holmberg@ericsson.com</email>
        </address>
    </author>
    <author fullname="Roman Shpount" initials="R.S." surname="Shpount">
        <organization abbrev="TurboBridge">TurboBridge</organization>
        <address>
            <postal>
                <street>4905 Del Ray Avenue, Suite 300</street>
                <city>Bethesda</city>
                <region>MD</region>
                <code>20814</code>
                <country>USA</country>
            </postal>
            <phone>+1 (240) 292-6632</phone>
            <email>rshpount@turbobridge.com</email>
        </address>
    </author>

    <date year="2017" />
    <area>RAI</area>
    <abstract>
        <t>
            This document defines the Session Description Protocol (SDP) offer/answer procedures for
            negotiating and establishing a Datagram Transport Layer Security (DTLS) association.
            The document also defines the criteria for when a new DTLS association must be established.
            The document updates RFC 5763 and RFC 7345, by replacing common SDP offer/answer procedures
            with a reference to this specification.
        </t>
        <t>
            This document defines a new SDP media-level attribute, 'tls-id'.
        </t>
        <t>
            This document also defines how the 'tls-id' attribute can be used for negotiating
            and establishing a Transport Layer Security (TLS) connection, in conjunction with
            the procedures in RFC 4145 and RFC 8122.
        </t>
    </abstract>
</front>
<middle>
    <section title="Introduction">
            <t>
                <xref format="default" pageno="false" target="RFC5763"/> defines Session Description Protocol (SDP)
                offer/answer procedures for Secure Realtime Transport Protocol Using Datagram Transport Layer Security (DTLS-SRTP).
                <xref format="default" pageno="false" target="RFC7345"/> defines SDP offer/answer procedures for
                UDP Transport Layer over Datagram Transport Layer Security (UDPTL-DTLS). This specification
                defines general offer/answer procedures for DTLS, based on the procedures in <xref format="default" pageno="false" target="RFC5763"/>.
                Other specifications, defining specific DTLS usages, can then reference this specification,
                in order to ensure that the DTLS aspects are common among all usages. Having common
                procedures is essential when multiple usages share the same
                DTLS association <xref target="I-D.ietf-mmusic-sdp-bundle-negotiation"/>.
                The document updates <xref format="default" pageno="false" target="RFC5763"/>
                and <xref format="default" pageno="false" target="RFC7345"/>, by replacing common
                SDP offer/answer procedures with a reference to this specification.
            </t>
            <t>
                NOTE: Since the publication of <xref format="default" pageno="false" target="RFC5763"/>,
                <xref format="default" pageno="false" target="RFC4474"/> has been obsoleted by
                <xref format="default" pageno="false" target="I-D.ietf-stir-rfc4474bis"/>. The updating
                of the references (and the associated procedures) within <xref format="default" pageno="false"
                target="RFC5763"/> is outside the scope of this document. However, implementers of
                <xref format="default" pageno="false" target="RFC5763"/> applications are encouraged to
                implement <xref format="default" pageno="false" target="I-D.ietf-stir-rfc4474bis"/> instead
                of <xref format="default" pageno="false" target="RFC4474"/>.
             </t>
            <t>
                As defined in <xref format="default" pageno="false" target="RFC5763"/>, a new DTLS association
                MUST be established when transport parameters are changed. Transport parameter change is not
                well defined when Interactive Connectivity Establishment (ICE) <xref format="default"
                pageno="false" target="I-D.ietf-ice-rfc5245bis"/> is used. One possible way to determine a transport change is
                based on ufrag <xref format="default" pageno="false" target="I-D.ietf-ice-rfc5245bis"/> change,
                but the ufrag value is changed both when ICE is negotiated
                and when ICE restart <xref format="default" pageno="false" target="I-D.ietf-ice-rfc5245bis"/> occurs. These events
                do not always require a new DTLS association to be established, but previously there was no way
                to explicitly indicate in an SDP offer or answer whether a new DTLS association is required.
                To solve that problem, this document defines a new SDP attribute, 'tls-id'. The pair of
                SDP 'tls-id' attribute values (the attribute values of the offerer and the answerer)
                uniquely identifies the DTLS association. Providing a new value of the 'tls-id' attribute in an SDP offer
                or answers can be used to indicate whether a new DTLS association is to be established.
            </t>
            <t>
                The SDP 'tls-id' attribute can be specified when negotiating a Transport Layer Security (TLS) connection, using
                the procedures in this document in conjunction with the procedures in <xref format="default"
                pageno="false" target="RFC5763"/> and <xref format="default" pageno="false" target="RFC8122"/>.
                The unique combination of SDP 'tls-id' attribute values can be used to identity the negotiated
                TLS connection. The unique value can be used, for example, within TLS protocol extensions to
                differentiate between multiple TLS connections and correlate those connections with specific
                offer/answer exchanges.  The TLS specific considerations are described in <xref format="default"
                pageno="false" target="sec-tls-cons"/>.
            </t>
    </section>

    <section title="Conventions">
        <t>
            The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
            "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
            "OPTIONAL" in this document are to be interpreted as described in
            BCP 14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only
            when, they appear in all capitals, as shown here.
        </t>
    </section>

    <section title="Establishing a new DTLS Association">
        <section title="General" anchor="sec-dtls-gen">
            <t>
                A new DTLS association must be established between two endpoints after a
                successful SDP offer/answer exchange in the following cases:
                <list style="symbols">
                        <t>
                            The negotiated DTLS setup roles change; or
                        </t>
                        <t>
                            One or more fingerprint values are modified, added
                            or removed in either an SDP offer or answer; or
                        </t>
                        <t>
                            The intent to establish a new DTLS association is
                            explicitly signaled using SDP, by changing the value of the
                            SDP 'tls-id' attribute defined in this document;
                        </t>
                </list>
            </t>
            <t>
                NOTE: The first two items above are based on the procedures
                in <xref format="default" pageno="false" target="RFC5763"/>.
                This specification adds the support for explicit signaling using the SDP 'tls-id' attribute.
            </t>
            <t>
                A new DTLS association can only be established as a result of the successful SDP offer/answer exchange.
                Whenever an entity determines that a new DTLS association is required, the entity MUST initiate an
                SDP offer/answer exchange, following the procedures in <xref target="sec-oa"/>.
            </t>
            <t>
                The sections below describe typical cases where a new DTLS association needs to be established.
            </t>
            <t>
                In this document, a "new DTLS association" between two endpoints refers to either
                an initial DTLS association (when no DTLS association is currently established between
                the endpoints) or an DTLS association replacing a previously established DTLS association.
            </t>
        </section>
        <section title="Change of Local Transport Parameters" anchor="sec-dtls-transport">
            <t>
                If an endpoint modifies its local transport parameters (address and/or port), and if the modification
                requires a new DTLS association, the endpoint must change its local SDP 'tls-id'
                attribute value (see <xref target="sec-dcon-attr"/>).
            </t>
            <t>
                If the underlying transport prohibits a DTLS association from spanning multiple transports, and if
                the transport is changed, the endpoint must change its local SDP 'tls-id'
                attribute value (see <xref target="sec-dcon-attr"/>).
                An example of such a case is when DTLS is carried over the Stream Control Transmission Protocol (SCTP),
                as described in <xref format="default" pageno="false" target="RFC6083"/>.
            </t>
        </section>
        <section title="Change of ICE ufrag value" anchor="sec-dtls-ufrag">
            <t>
                If an endpoint uses ICE, and modifies a local ufrag value, and if the modification
                requires a new DTLS association, the endpoint MUST change its local SDP 'tls-id'
                attribute value (see <xref target="sec-dcon-attr"/>).
            </t>
        </section>
    </section>
    <section title="SDP tls-id Attribute" anchor="sec-dcon-attr">
        <t>
            The pair of SDP 'tls-id' attribute values (the attribute values of the offerer and the answerer)
            uniquely identifies the DTLS association or TLS connection.
        </t>
        <figure>
            <artwork align="left"><![CDATA[

       Name: tls-id

       Value: tls-id-value

       Usage Level: media

       Charset Dependent: no

       Default Value: N/A

       Syntax:

           tls-id-value = 20*255(tls-id-char)
           tls-id-char = ALPHA / DIGIT / "+" / "/" / "-" / "_"

           <ALPHA and DIGIT defined in [RFC4566]>


       Example:

           a=tls-id:abc3de65cddef001be82

            ]]></artwork>
        </figure>
        <t>
            Every time an endpoint requests to establish a new DTLS association, the endpoint MUST
            generate a new local 'tls-id' attribute value. A non-changed local 'tls-id' attribute
            value, in combination with non-changed fingerprints, indicates that the endpoint
            intends to reuse the existing DTLS association.
        </t>
        <t>
            The 'tls-id' attribute value MUST be generated using a strong random function
            and include at least 120 bits of randomness.
        </t>
        <t>
            No default value is defined for the SDP 'tls-id' attribute.
            Implementations that wish to use the attribute MUST explicitly
            include it in SDP offers and answers. If an offer or answer does not
            contain a 'tls-id' attribute (this could happen if the offerer or
            answerer represents an existing implementation that has not been
            updated to support the 'tls-id' attribute), unless there is
            another mechanism to explicitly indicate that a new DTLS association
            is to be established, a modification of one or more of the following
            characteristics MUST be treated as an indication that an endpoint
            wants to establish a new DTLS association:
            <list style="symbols">
                    <t>
                        DTLS setup role; or
                    </t>
                    <t>
                        fingerprint set; or
                    </t>
                    <t>
                        local transport parameters
                    </t>
            </list>
        </t>
        <t>
            NOTE: A modification of the ufrag value is not treated as an indication
            that an endpoint wants to establish a new DTLS assocation. In order to
            indicate that a new DTLS association is to be established, one or more 
            of the characteristics listed above have to be modified.
        </t>
        <t>
            The mux category <xref target="I-D.ietf-mmusic-sdp-mux-attributes"/>
            for the 'tls-id' attribute is 'IDENTICAL', which means that
            the attribute value applies to all media descriptions
            being multiplexed <xref target="I-D.ietf-mmusic-sdp-bundle-negotiation"/>.
            However, as described in <xref target="I-D.ietf-mmusic-sdp-bundle-negotiation"/>,
            in order to avoid duplication the attribute is only associated with the "m=" line
            representing the offerer/answerer BUNDLE-tag.
        </t>
        <t>
            For RTP-based media, the 'tls-id' attribute applies to the whole associated
            media description. The attribute MUST NOT be defined per source (using the
            SDP 'ssrc' attribute <xref format="default" pageno="false" target="RFC5576"/>).
        </t>
        <t>
            The SDP offer/answer <xref format="default" pageno="false" target="RFC3264"/>
            procedures associated with the attribute are defined in <xref target="sec-oa"/>.
        </t>
    </section>

    <section title="SDP Offer/Answer Procedures" anchor="sec-oa">
        <section title="General">
            <t>
                This section defines the generic SDP offer/answer procedures for negotiating
                a DTLS association. Additional procedures (e.g., regarding usage of specific SDP
                attributes etc.) for individual DTLS usages (e.g., DTLS-SRTP) are outside the scope
                of this specification, and need to be specified in a usage specific specification.
            </t>
            <t>
                NOTE: The procedures in this section are generalizations of procedures first
                specified in DTLS-SRTP <xref format="default" pageno="false" target="RFC5763"/>,
                with the addition of usage of the SDP 'tls-id' attribute. That document is
                herein updated to make use of these new procedures.
            </t>
            <t>
                The procedures in this section apply to an SDP media description ("m=" line) associated
                with DTLS-protected media/data.
           </t>
            <t>
                When an offerer or answerer indicates that it wants to establish a new DTLS association, it needs to make sure that
                media packets associated with any previously established DTLS association and the new DTLS association can be de-multiplexed. In case
                of an ordered transport (e.g., SCTP) this can be done simply by sending packets for the new DTLS association
                after all packets associated with a previously established DTLS association has been sent. In case of an unordered transport, such as
                UDP, packets associated with a previously established DTLS association can arrive after the answer SDP was received and after the first
                packets associated with the new DTLS association were received. The only way to de-multiplex packets associated with
                with a previously established DTLS association and the new DTLS association is on the basis of transport 5-tuple. Because of this, if an unordered transport
                is used for the DTLS association, a new transport (3-tuple) must be allocated by at least one of the endpoints
                so that DTLS packets can be de-multiplexed.
            </t>
            <t>
                When an offerer needs to establish a new DTLS association, and if an unordered transport (e.g., UDP)
                is used, the offerer MUST allocate a new transport (3-tuple) for the offer in such a way that the offerer can
                disambiguate any packets associated with the new DTLS association from any packets associated with
                any other DTLS association. This typically means using a local address and/or port, or a set of
                ICE candidates (see <xref format="default" pageno="false" target="sec-dtls-reest-ice"/>), which were
                not recently used for any other DTLS association.
            </t>
            <t>
                When an answerer needs to establish a new DTLS association, if an unordered transport is used, and if
                the offerer did not allocate a new transport, the answerer MUST allocate a new transport for the
                answer in such a way that it can disambiguate any packets associated with the new DTLS association from any
                packets associated with any other DTLS association. This typically means using a local address and/or
                port, or a set of ICE candidates (see <xref format="default" pageno="false" target="sec-dtls-reest-ice"/>),
                which were not recently used for any other DTLS association.
            </t>
            <t>
                In order to negotiate a DTLS association, the following SDP attributes are used:
                <list style="symbols">
                    <t>
                        The SDP 'setup' attribute, defined in <xref target="RFC4145" pageno="false"
                        format="default" />, is used to negotiate the DTLS roles;
                    </t>
                    <t>
                        The SDP 'fingerprint' attribute, defined in <xref format="default"
                        pageno="false" target="RFC8122"/>, is used to
                        provide one or more fingerprint values; and
                    </t>
                    <t>
                        The SDP 'tls-id' attribute, defined in this specification, is used to identity
                        the DTLS association.
                    </t>
                </list>
            </t>
            <t>
                This specification does not define the usage of the SDP 'connection' attribute
                <xref target="RFC4145" pageno="false" format="default" /> for negotiating a DTLS
                association. However, the attribute MAY be used if the DTLS association is used
                together with another protocol (e.g., SCTP or TCP) for which the usage of the
                attribute has been defined.
            </t>
            <t>
                Unlike for TCP and TLS connections, endpoints MUST NOT use the
                SDP 'setup' attribute 'holdconn' value when negotiating a DTLS association.
            </t>
            <t>
                Endpoints MUST support the hash functions as defined in
                <xref format="default" pageno="false" target="RFC8122"/>.
            </t>
            <t>
                The certificate received during the DTLS handshake <xref format="default"
                pageno="false" target="RFC6347"/> MUST match a certificate
                fingerprint received in SDP 'fingerprint' attributes according to the procedures
                defined in <xref format="default" pageno="false" target="RFC8122"/>.
                If fingerprints do not match the hashed certificate, then an endpoint MUST tear
                down the media session immediately (see <xref format="default" pageno="false"
                target="RFC8122"/>). Note that it is permissible to wait until
                the other side's fingerprint(s) has been received before establishing the connection;
                however, this may have undesirable latency effects.
            </t>
            <t>
                SDP offerers and answerers might reuse certificates across multiple DTLS
                associations, and provide identical fingerprint values for each DTLS
                association. The combination of the SDP 'tls-id' attribute values of the SDP
                offerer and answerer identifies each individual DTLS association.
            </t>
            <t>
                NOTE: There are cases where the SDP 'tls-id' attribute value generated by the
                offerer will end up being used for multiple DTLS associations. For that reason
                the combination of the attribute values of the offerer and answerer is needed
                in order to identity a DTLS association. An example of such case is where the
                offerer sends an updated offer (<xref target="sec-oa-mod"/>), without modifying its
                attribute value, but the answerer determines that a new DTLS association is to
                be created. The answerer will generate a new local attribute value for the new
                DTLS association (<xref target="sec-oa-answer"/>), while the offerer will use the
                same attribute value that it used for the current association. Another example is
                when the Session Initiation Protocol (SIP) <xref format="default" pageno="false"
                target="RFC3261"/> is used for signalling, and an offer is forked to multiple answerers.
                The attribute value generated by the offerer will be used for DTLS associations
                established by each answerer.
            </t>
        </section>

        <section title="Generating the Initial SDP Offer" anchor="sec-oa-offer">
            <t>
                When an offerer sends the initial offer, the offerer MUST insert an SDP 'setup' attribute
                <xref format="default" pageno="false" target="RFC4145"/> with an 'actpass' attribute value, and
                one or more SDP 'fingerprint' attributes according to the procedures in <xref format="default"
                pageno="false" target="RFC8122"/>. In addition, the offerer MUST insert in the offer an SDP
                'tls-id' attribute with a unique attribute value.
            </t>
            <t>
                As the offerer inserts the SDP 'setup' attribute with an 'actpass' attribute value, the
                offerer MUST be prepared to receive a DTLS ClientHello message <xref format="default" pageno="false"
                target="RFC6347"/> (if a new DTLS association is established by the answerer) from the answerer
                before the offerer receives the SDP answer.
            </t>
            <t>
                If the offerer receives a DTLS ClientHello message, and a DTLS association is established,
                before the offerer receives the SDP Answer carrying the fingerprint associated with the DTLS
                association, any data received on the DTLS association before the fingerprint MUST be
                considered coming from an unverified source. The processing of such data, and sending of data
                by the offerer to the unverified source, is outside the scope of this document.
            </t>
        </section>
        <section title="Generating the Answer" anchor="sec-oa-answer">
            <t>
                When an answerer sends an answer, the answerer MUST insert in the answer an SDP 'setup' attribute
                according to the procedures in <xref format="default" pageno="false" target="RFC4145"/>, and one
                or more SDP 'fingerprint' attributes according to the procedures in <xref format="default"
                pageno="false" target="RFC8122"/>.
                If the answerer determines, based on the criteria specified in <xref target="sec-dtls-gen"/>,
                that a new DTLS association is to be established, the answerer MUST insert in the associated answer
                an SDP 'tls-id' attribute with a new unique attribute value. Note that the offerer and answerer generate
                their own local 'tls-id' attribute values, and the combination of both values identify the
                DTLS association.
            </t>
            <t>
                If the answerer receives an offer that requires establishment of a new DTLS association, and if the
                answerer does not accept the establishment of a new DTLS association, the answerer MUST reject
                the "m=" lines associated with the suggested DTLS association
                <xref format="default" pageno="false" target="RFC3264"/>.
            </t>
            <t>
                If an answerer receives an offer that does not require the establishment of a new DTLS association,
                and if the answerer determines that a new DTLS association is not to be established,
                the answerer MUST insert an SDP 'tls-id' attribute with the previously assigned attribute value in the
                associated answer. In addition, the answerer MUST insert an SDP 'setup' attribute with an
                attribute value that does not change the previously negotiated DTLS roles, and one or more SDP 'fingerprint'
                attributes values that do not change the previously sent fingerprint set, in the associated answer.
            </t>
            <t>
                If the answerer receives an offer that does not contain an SDP 'tls-id' attribute,
                the answerer MUST NOT insert a 'tls-id' attribute in the answer.
            </t>
            <t>
                If a new DTLS association is to be established, and if the answerer inserts an SDP 'setup'
                attribute with an 'active' attribute value in the answer, the answerer MUST initiate a DTLS handshake by
                sending a DTLS ClientHello message towards the offerer.
            </t>
            <t>
                Even though an offerer is required to insert an 'SDP' setup attribute with an 'actpass' attribute value
                in initial offers (<xref target="sec-oa-offer"/>) and subsequent offers (<xref target="sec-oa-mod"/>),
                the answerer MUST be able to receive initial and subsequent offers with other attribute values, in order
                to be backward compatible with older implementations that might insert other attribute values in initial and
                subsequent offers.
            </t>
        </section>
        <section title="Offerer Processing of the SDP Answer">
            <t>
                When an offerer receives an answer that establishes a new DTLS association based on
                criteria defined in <xref target="sec-dtls-gen"/>, and if the offerer
                becomes DTLS client (based on the value of the SDP 'setup' attribute value
                <xref format="default" pageno="false" target="RFC4145"/>), the offerer MUST
                establish a DTLS association. If the offerer becomes DTLS server, it MUST wait for the answerer
                to establish the DTLS association.
            </t>
            <t>
                If the offerer indicated a desire to reuse an existing DTLS association and the
                answerer does not request the establishment of a new DTLS association, the offerer will
                continue to use the previously established DTLS association.
            </t>
            <t>
                A new DTLS association can be established based on changes in either an SDP offer or answer.
                When communicating with legacy endpoints, an offerer can receive an answer that includes the same
                fingerprint set and setup role. A new DTLS association will still be established if such an answer
                was received as a response to an offer which requested the establishment of a new DTLS association,
                as the transport parameters would have been changed in the offer.
            </t>
        </section>
        <section title="Modifying the Session" anchor="sec-oa-mod">
            <t>
                When an offerer sends a subsequent offer, and if the offerer wants to establish a new
                DTLS association, the offerer MUST insert an SDP 'setup' attribute <xref format="default"
                pageno="false" target="RFC4145"/> with an 'actpass' attribute value, and one or more SDP 'fingerprint'
                attributes according to the procedures in <xref format="default" pageno="false" target="RFC8122"/>.
                In addition, the offerer MUST insert in the offer an SDP 'tls-id' attribute with a new unique
                attribute value.
            </t>
            <t>
                When an offerer sends a subsequent offer, and the offerer does not want to establish
                a new DTLS association, and if a previously established DTLS association exists,
                the offerer MUST insert an SDP 'setup' attribute with an 'actpass' attribute value, and
                one or more SDP 'fingerprint' attributes with attribute values that do not change the previously
                sent fingerprint set, in the offer. In addition, the offerer MUST insert an SDP 'tls-id'
                attribute with the previously assigned attribute value in the offer.
            </t>
            <t>
                NOTE: When a new DTLS association is being established, each endpoint needs to be prepared to receive
                data on both the new and old DTLS associations as long as both are alive.
            </t>
        </section>
    </section>

    <section title="ICE Considerations" anchor="sec-dtls-reest-ice">
        <t>
            When the Interactive Connectivity Establishment (ICE) mechanism
            <xref format="default" pageno="false" target="I-D.ietf-ice-rfc5245bis"/> is used, the
            ICE connectivity checks are performed before the DTLS
            handshake begins. Note that if aggressive nomination mode is used,
            multiple candidate pairs may be marked valid before ICE finally
            converges on a single candidate pair.
        </t>
        <t>
            NOTE: Aggressive nomination has been deprecated from ICE, but must still be
            supported for backwards compatibility reasons <xref format="default" pageno="false"
            target="I-D.ietf-ice-rfc5245bis"/>.
        </t>
        <t>
            When a new DTLS association is established over an unordered transport, in order to
            disambiguate any packets associated with the newly established DTLS association, at least
            one of the endpoints MUST allocate a completely new set of ICE candidates which
            were not recently used for any other DTLS association. This means the answerer
            cannot initiate a new DTLS association unless the offerer initiated ICE restart
            <xref format="default" pageno="false" target="I-D.ietf-ice-rfc5245bis"/>. If the answerer wants
            to initiate a new DTLS association, it needs to initiate an ICE restart
            and a new offer/answer exchange on its own. However, an ICE restart does not by
            default require a new DTLS association
            to be established.
        </t>
        <t>
            NOTE: Simple Traversal of the UDP Protocol through NAT (STUN) packets are sent directly
            over UDP, not over DTLS. <xref format="default" pageno="false" target="RFC7983"/> describes
            how to demultiplex STUN packets from DTLS packets and SRTP packets.
        </t>
        <t>
            Each ICE candidate associated with a component is treated as being part of the
            same DTLS association. Therefore, from a DTLS perspective it is not considered
            a change of local transport parameters when an endpoint switches between those
            ICE candidates.
        </t>
    </section>

    <section title="TLS Considerations" anchor="sec-tls-cons">
        <t>
            The procedures in this document can also be used for negotiating and
            establishing a TLS connection, with the restriction described below.
        </t>
        <t>
            As specified in <xref format="default" pageno="false" target="RFC4145"/>,
            the SDP 'connection' attribute is used to indicate whether to establish a new
            TLS connection. An offerer and answerer MUST ensure that the 'connection'
            attribute value and the 'tls-id' attribute value does not cause a conflict
            regarding whether a new TLS connection is to be established or not.
        </t>
        <t>
            NOTE: Even though the SDP 'connection' attribute can be used to indicate
            whether a new TLS connection is to be established, the unique combination
            of SDP 'tls-id' attribute values can be used to identity a TLS connection.
            The unique value can be used e.g., within TLS protocol extensions to differentiate
            between multiple TLS connections and correlate those connections with specific
            offer/answer exchanges. One such extension is defined in
            <xref format="default" pageno="false" target="I-D.ietf-mmusic-sdp-uks"/>.

        </t>
        <t>
            If an offerer or answerer inserts an SDP 'connection' attribute with a 'new'
            value in the offer/answer and also inserts an SDP 'tls-id' attribute,
            the value of tls-id' attribute MUST be new and unique.
        </t>
        <t>
            If an offerer or answerer inserts an SDP 'connection' attribute with a 'existing'
            value in the offer/answer, if a previously established TLS connection exists, and
            if the offerer/answerer previously inserted an SDP 'tls-id' attribute associated with
            the same TLS connection in an offer/answer, the offerer/answerer MUST also insert
            an SDP 'tls-id' attribute with the previously assigned value in the offer/answer.
        </t>
        <t>
            If an offerer or answerer receives an offer/answer with conflicting attribute values,
            the offerer/answerer MUST process the offer/answer as misformed.
        </t>
        <t>
            An endpoint must not make assumptions regarding the support of the SDP 'tls-id'
            attribute by the peer. Therefore, to avoid ambiguity, both offerers and answerers
            MUST always use the 'connection' attribute in conjunction with the 'tls-id' attribute.
        </t>
        <t>
            NOTE: As defined in <xref format="default" pageno="false" target="RFC4145"/>, if the
            SDP 'connection' attribute is not explicitly present, the implicit default value is 'new'.
        </t>
        <t>
            The SDP example below is based on the example in section 3.4 of
            <xref format="default" pageno="false" target="RFC8122"/>, with the addition of
            the SDP 'tls-id' attribute.
        </t>
        <figure>
            <artwork align="left"><![CDATA[

 m=image 54111 TCP/TLS t38
 c=IN IP4 192.0.2.2
 a=tls-id:abc3de65cddef001be82
 a=setup:passive
 a=connection:new
 a=fingerprint:SHA-256 \
  12:DF:3E:5D:49:6B:19:E5:7C:AB:4A:AD:B9:B1:3F:82:18:3B:54:02:12:DF: \
  3E:5D:49:6B:19:E5:7C:AB:4A:AD
 a=fingerprint:SHA-1 \
  4A:AD:B9:B1:3F:82:18:3B:54:02:12:DF:3E:5D:49:6B:19:E5:7C:AB

            ]]></artwork>
        </figure>
    </section>

    <section title="SIP Considerations">
        <t>
            When the Session Initiation Protocol (SIP) <xref format="default" pageno="false"
            target="RFC3261"/> is used as the signal protocol for establishing a multimedia
            session, dialogs <xref format="default" pageno="false" target="RFC3261"/> might be
            established between the caller and multiple callees. This is referred to as forking.
            If forking occurs, separate DTLS associations will be established between the caller
            and each callee.
        </t>
        <t>
            When forking occurs, an SDP offerer can receive DTLS ClientHello messages and SDP
            answerers from multiple remote locations. Because of this, the offerer might have to
            wait for multiple SDP answers (from different remote locations) until it receives
            a certificate fingerprint that matches the certificate associated with a specific
            DTLS handshake. The offerer MUST NOT declare a fingerprint mismatch until it
            determines that it will not receive SDP answers from any additional remote locations.
        </t>
        <t>
            It is possible to send an INVITE request which does not contain an SDP offer. Such
            an INVITE request is often referred to as an 'empty INVITE', or an 'offer-less INVITE'.
            The receiving endpoint will include the SDP offer in a response to the request.
            When the endpoint generates such SDP offer, if a previously established
            DTLS association exists, the offerer MUST insert an SDP 'tls-id'
            attribute, and one or more SDP 'fingerprint' attributes, with previously assigned
            attribute values. If a previously established DTLS association did not exist,
            the offer MUST be generated based on the same rules as a new offer (see <xref target="sec-oa-offer"/>).
            Regardless of the previous existence of a DTLS association, the SDP 'setup' attribute
            MUST be included according to the rules defined in <xref format="default" pageno="false"
            target="RFC4145"/> and if ICE is used, ICE restart MUST be initiated. This is needed in
            order to support third party call control, as described in <xref target="I-D.ietf-mmusic-ice-sip-sdp"/>.
        </t>
    </section>

    <section title="RFC Updates">
        <section title="General">
            <t>
                This section updates specifications that use DTLS-protected media, in
                order to reflect the procedures defined in this specification.
            </t>
        </section>
        <section title="Update to RFC 5763">
          <section title="Update to section 1">
            <t>The reference to <xref format="default" pageno="false" target="RFC4572"/> is replaced
            with a reference to <xref format="default" pageno="false" target="RFC8122"/>.</t>
          </section>
          <section title="Update to section 5">
            <t>The text in section 5 (Establishing a Secure Channel) is modified by replacing generic
            SDP offer/answer procedures for DTLS with a reference to this specification:
            </t>
            <figure>
                <artwork align="left" alt="" height="" name="" type="" width="" xml:space="preserve"><![CDATA[

NEW TEXT:

   The two endpoints in the exchange present their identities as part of
   the DTLS handshake procedure using certificates. This document uses
   certificates in the same style as described in "Connection-Oriented
   Media Transport over the Transport Layer Security (TLS) Protocol in
   the Session Description Protocol (SDP)" [RFC8122].

   If self-signed certificates are used, the content of the
   subjectAltName attribute inside the certificate MAY use the uniform
   resource identifier (URI) of the user. This is useful for debugging
   purposes only and is not required to bind the certificate to one of
   the communication endpoints.  The integrity of the certificate is
   ensured through the fingerprint attribute in the SDP.

   The generation of public/private key pairs is relatively expensive.
   Endpoints are not required to generate certificates for each session.

   The offer/answer model, defined in [RFC3264], is used by protocols
   like the Session Initiation Protocol (SIP) [RFC3261] to set up
   multimedia sessions.

   When an endpoint wishes to set up a secure media session with another
   endpoint, it sends an offer in a SIP message to the other endpoint.
   This offer includes, as part of the SDP payload, a fingerprint of
   a certificate that the endpoint wants to use. The endpoint SHOULD
   send the SIP message containing the offer to the offerer's SIP proxy
   over an integrity protected channel. The proxy SHOULD add an
   Identity header field according to the procedures outlined in
   [RFC4474]. When the far endpoint receives the SIP message, it can
   verify the identity of the sender using the Identity header field.
   Since the Identity header field is a digital signature across several
   SIP header fields, in addition to the body of the SIP message, the
   receiver can also be certain that the message has not been tampered
   with after the digital signature was applied and added to the SIP
   message.

   The far endpoint (answerer) may now establish a DTLS association with
   the offerer. Alternately, it can indicate in its answer that the
   offerer is to initiate the DTLS association. In either case, mutual
   DTLS certificate-based authentication will be used. After completing
   the DTLS handshake, information about the authenticated identities,
   including the certificates, are made available to the endpoint
   application. The answerer is then able to verify that the offerer's
   certificate used for authentication in the DTLS handshake can be
   associated to a certificate fingerprint contained in the offer in
   the SDP. At this point, the answerer may indicate to the end user
   that the media is secured. The offerer may only tentatively accept
   the answerer's certificate since it may not yet have the answerer's
   certificate fingerprint.

   When the answerer accepts the offer, it provides an answer back to
   the offerer containing the answerer's certificate fingerprint. At
   this point, the offerer can accept or reject the peer's certificate
   and the offerer can indicate to the end user that the media is
   secured.

   Note that the entire authentication and key exchange for securing
   the media traffic is handled in the media path through DTLS. The
   signaling path is only used to verify the peers' certificate
   fingerprints.

   The offerer and answerer MUST follow the SDP offer/answer procedures
   defined in [RFCXXXX].

          ]]></artwork>
        </figure>
     </section>
     <section title="Update to section 6.6">
         <t>The text in section 6.6 (Session Modification) is modified by replacing replacing generic
            SDP offer/answer procedures for DTLS with a reference to this specification:
         </t>
       <figure>
           <artwork align="left" alt="" height="" name="" type="" width="" xml:space="preserve"><![CDATA[

NEW TEXT:

   Once an answer is provided to the offerer, either endpoint MAY
   request a session modification that MAY include an updated offer.
   This session modification can be carried in either an INVITE or
   UPDATE request. The peers can reuse an existing DTLS association,
   or establish a new one, following the procedures in [RFCXXXX].

   ]]></artwork>
 </figure>
</section>
<section title="Update to section 6.7.1">
    <t>The text in section 6.7.1 (ICE Interaction) is modified by replacing the ICE procedures with
    a reference to this specification:
    </t>
<figure>
    <artwork align="left" alt="" height="" name="" type="" width="" xml:space="preserve"><![CDATA[

NEW TEXT:

   The Interactive Connectivity Establishment (ICE)
   [I-D.ietf-ice-rfc5245bis] considerations for DTLS-protected media
   are described in [RFCXXXX].
                ]]></artwork>
            </figure>
          </section>
        </section>
        <section title="Update to RFC 7345">
          <section title="Update to section 4">
              <t>The subsections (4.1.-4.5.) in section 4 (SDP Offerer/Answerer Procedures) are removed, and replaced with the new text below:</t>
            <figure>
                <artwork align="left" alt="" height="" name="" type="" width="" xml:space="preserve"><![CDATA[

NEW TEXT:

   An endpoint (i.e., both the offerer and the answerer) MUST create an
   SDP media description ("m=" line) for each UDPTL-over-DTLS media
   stream and MUST assign a UDP/TLS/UDPTL value (see Table 1) to the
   "proto" field of the "m=" line.

   The offerer and answerer MUST follow the SDP offer/answer procedures
   defined in [RFCXXXX] in order to negotiate the DTLS association
   associated with the UDPTL-over-DTLS media stream. In addition,
   the offerer and answerer MUST use the SDP attributes defined for
   UDPTL over UDP, as defined in [ITU.T38.2010].

   ]]></artwork>
 </figure>
</section>
<section title="Update to section 5.2.1">
    <t>The text in section 5.2.1 (ICE Usage) is modified by replacing the ICE procedures with
    a reference to this specification:
    </t>
<figure>
    <artwork align="left" alt="" height="" name="" type="" width="" xml:space="preserve"><![CDATA[

NEW TEXT:

   The Interactive Connectivity Establishment (ICE)
   [I-D.ietf-ice-rfc5245bis] considerations for DTLS-protected media
   are described in [RFCXXXX].

   [RFC EDITOR NOTE: Throughout the document, please replace RFCXXXX
   with the RFC number of this document.]

                ]]></artwork>
            </figure>
          </section>
          <section title="Update to section 10.1">
              <t>A reference to <xref format="default" pageno="false" target="RFC8122"/> is added to section 10.1 (Normative References):</t>
            <figure>
                <artwork align="left" alt="" height="" name="" type="" width="" xml:space="preserve"><![CDATA[

NEW TEXT:

[RFC8122]  Lennox, J. and C. Holmberg, "Connection-Oriented Media
           Transport over the Transport Layer Security (TLS) Protocol
           in the Session Description Protocol (SDP)", RFC 8122,
           DOI 10.17487/RFC8122, March 2017,
           <http://www.rfc-editor.org/info/rfc8122>.

          ]]></artwork>
        </figure>
     </section>
        </section>
    </section>

    <section title="Security Considerations">
        <t>
            This specification does not modify the security considerations associated with DTLS, or
            the SDP offer/answer mechanism. In addition to the introduction of the SDP
            'tls-id' attribute, the specification simply clarifies the procedures for
            negotiating and establishing a DTLS association.
        </t>
        <t>
            This specification does not modify the actual TLS connection setup procedures. The
            SDP 'tls-is' attribute as such cannot be used to correlate an SDP Offer/Answer exchange with a
            TLS connection setup. Thus, this draft does not introduce new security considerations
            related to correlating an SDP Offer/Answer exchange with a TLS connection setup.
        </t>
    </section>

    <section anchor="section.iana" title="IANA Considerations">
        <t>
            This document updates the "Session Description Protocol Parameters" registry
            as specified in Section 8.2.2 of <xref target="RFC4566" pageno="false" format="default"/>.
            Specifically, it adds the SDP 'tls-id' attribute to the table for SDP
            media level attributes.
        </t>
        <figure>
            <artwork align="left"><![CDATA[

    Attribute name: tls-id
    Type of attribute: media-level
    Subject to charset: no
    Purpose: Indicates whether a new DTLS association or TLS connection
     is to be established/re-established.
    Appropriate Values: see Section 4
    Contact name: Christer Holmberg
    Mux Category: IDENTICAL

            ]]></artwork>
        </figure>
    </section>

    <section title="Acknowledgements">
        <t>
            Thanks to Justin Uberti, Martin Thomson, Paul Kyzivat, Jens Guballa,
            Charles Eckel, Gonzalo Salgueiro and Paul Jones for providing comments and
            suggestions on the document. Ben Campbell performed an AD review. Paul
            Kyzivat performed a gen-art review.
        </t>
    </section>
    <section title="Change Log">
        <t>[RFC EDITOR NOTE: Please remove this section when publishing]</t>
        <t>Changes from draft-ietf-mmusic-sdp-dtls-29
            <list style="symbols">
                <t>Removal of ufrag value change as a trigger for a new DTLS association</t>
            </list>
        </t>
        <t>Changes from draft-ietf-mmusic-sdp-dtls-28
            <list style="symbols">
                <t>Changes based on IESG review by Adam Roach, Eric Rescorla, Alexey Melnikov and Mirja Kuhlewind:</t>
                <t>- Document title changed</t>
                <t>- Transport Protocol Considerations section removed</t>
                <t>- Additional text to Security Considerations section</t>
                <t>- Editorial changes</t>
            </list>
        </t>
        <t>Changes from draft-ietf-mmusic-sdp-dtls-27
            <list style="symbols">
                <t>Reference fixes based on Gen-ART review by Paul Kyzivat.</t>
            </list>
        </t>
        <t>Changes from draft-ietf-mmusic-sdp-dtls-26
            <list style="symbols">
                <t>Editorial fixes based on Gen-ART review by Paul Kyzivat.</t>
            </list>
        </t>
        <t>Changes from draft-ietf-mmusic-sdp-dtls-25
            <list style="symbols">
                <t>Minor editorial nits.</t>
            </list>
        </t>
        <t>Changes from draft-ietf-mmusic-sdp-dtls-24
            <list style="symbols">
                <t>Changes based on 2nd WGLC comments from Roman S and Martin T:</t>
                <t>- RFC update structure shortened (old text removed).</t>
                <t>- Guidance regarding receiving ClientHello before SDP answer added.</t>
                <t>- Additional SIP condierations regarding forking.</t>
                <t>- SDP setup attribute value restriction in initial and subsequent offers based on comment from Ekr.</t>
            </list>
        </t>
        <t>Changes from draft-ietf-mmusic-sdp-dtls-23
            <list style="symbols">
                <t>Editrial change to make it clear that the document does not
                   modify the procedures in RFC 8122.</t>
            </list>
        </t>
        <t>Changes from draft-ietf-mmusic-sdp-dtls-22
            <list style="symbols">
                <t>Support for TLS added.</t>
                <t>Editorial changes based on sec-dir review by Rich Salz.</t>
                <t>Editorial changes based on gen-art review by Paul Kyzivat.</t>
                <t>Editorial changes based on ops-dir review by Carlos Pignataro.</t>
            </list>
        </t>
        <t>Changes from draft-ietf-mmusic-sdp-dtls-21
            <list style="symbols">
                <t>Changes based on AD review by Ben Campbell.</t>
                <t>(https://www.ietf.org/mail-archive/web/mmusic/current/msg17707.html)</t>
            </list>
        </t>
        <t>Changes from draft-ietf-mmusic-sdp-dtls-20
            <list style="symbols">
                <t>Change to length and randomness of tls-id attribute value.</t>
            </list>
        </t>
        <t>Changes from draft-ietf-mmusic-sdp-dtls-19
            <list style="symbols">
                <t>Change based on comment from Roman.</t>
            </list>
        </t>
        <t>Changes from draft-ietf-mmusic-sdp-dtls-18
            <list style="symbols">
                <t>Changes based on comments from Flemming.</t>
                <t>- Change in tls-id value definition.</t>
                <t>- Editorial fixes.</t>
            </list>
        </t>
        <t>Changes from draft-ietf-mmusic-sdp-dtls-17
            <list style="symbols">
                <t>Reference fix.</t>
            </list>
        </t>
        <t>Changes from draft-ietf-mmusic-sdp-dtls-16
            <list style="symbols">
                <t>Editorial changes based on 2nd WGLC comments
                from Christian Groves and Nevenka Biondic.</t>
            </list>
        </t>
        <t>Changes from draft-ietf-mmusic-sdp-dtls-15
            <list style="symbols">
                <t>tls-id attribute value made globally unique</t>
            </list>
        </t>
        <t>Changes from draft-ietf-mmusic-sdp-dtls-14
            <list style="symbols">
                <t>Changes based on comments from Flemming:</t>
                <t>- Additional dtls-is clarifiations</t>
                <t>- Editorial fixes</t>
            </list>
        </t>
        <t>Changes from draft-ietf-mmusic-sdp-dtls-13
            <list style="symbols">
                <t>Text about the updated RFCs added to Abstract and Introduction</t>
                <t>Reference to RFC 5763 removed from section 6 (ICE Considerations)</t>
                <t>Reference to RFC 5763 removed from section 8 (SIP Considerations)</t>
            </list>
        </t>
        <t>Changes from draft-ietf-mmusic-sdp-dtls-12
            <list style="symbols">
                <t>"unreliable" changed to "unordered"</t>
            </list>
        </t>
        <t>Changes from draft-ietf-mmusic-sdp-dtls-11
            <list style="symbols">
                <t>Attribute name changed to tls-id</t>
                <t>Additional text based on comments from Roman Shpount.</t>
            </list>
        </t>
        <t>Changes from draft-ietf-mmusic-sdp-dtls-10
            <list style="symbols">
                <t>Modified document to use tls-id instead of dtls-connection</t>
                <t>Changes are based on comments from Eric Rescorla, Justin Uberti, and Paul Kyzivat.</t>
            </list>
        </t>
        <t>Changes from draft-ietf-mmusic-sdp-dtls-08
            <list style="symbols">
                <t>Offer/Answer section modified in order to allow sending of multiple SDP 'fingerprint' attributes.</t>
                <t>Terminology made consistent: 'DTLS connection' replaced with 'DTLS association'.</t>
                <t>Editorial changes based on comments from Paul Kyzivat.</t>
            </list>
        </t>
        <t>Changes from draft-ietf-mmusic-sdp-dtls-07
            <list style="symbols">
                <t>Reference to RFC 7315 replaced with reference to RFC 7345.</t>
            </list>
        </t>
        <t>Changes from draft-ietf-mmusic-sdp-dtls-06
            <list style="symbols">
                <t>Text on restrictions regarding spanning a DTLS association over multiple transports added.</t>
                <t>Mux category added to IANA Considerations.</t>
                <t>Normative text regarding mux category and source-specific applicability added.</t>
                <t>Reference to RFC 7315 added.</t>
                <t>Clarified that offerer/answerer that has not been updated to support this specification will
                not include the tls-id attribute in offers and answers.</t>
                <t>Editorial corrections based on WGLC comments from Charles Eckel.</t>
            </list>
        </t>
        <t>Changes from draft-ietf-mmusic-sdp-dtls-05
            <list style="symbols">
                <t>Text on handling offer/answer error conditions added.</t>
            </list>
        </t>
        <t>Changes from draft-ietf-mmusic-sdp-dtls-04
            <list style="symbols">
                <t>Editorial nits fixed based on comments from Paul Kyzivat:</t>
            </list>
        </t>
        <t>Changes from draft-ietf-mmusic-sdp-dtls-03
            <list style="symbols">
                <t>Changes based on comments from Paul Kyzivat:</t>
                <t>- Modification of tls-id attribute section.</t>
                <t>- Removal of IANA considerations subsection.</t>
                <t>- Making note into normative text in o/a section.</t>
                <t>Changes based on comments from Martin Thompson:</t>
                <t>- Abbreviations section removed.</t>
                <t>- Clarify that a new DTLS association requires a new o/a transaction.</t>
            </list>
        </t>
        <t>Changes from draft-ietf-mmusic-sdp-dtls-02
            <list style="symbols">
                <t>- Updated RFCs added to boilerplate.</t>
            </list>
        </t>
        <t>Changes from draft-ietf-mmusic-sdp-dtls-01
            <list style="symbols">
                <t>- Annex regarding 'tls-id-id' attribute removed.</t>
                <t>- Additional SDP offer/answer procedures, related to certificates, added.</t>
                <t>- Updates to RFC 5763 and RFC 7345 added.</t>
                <t>- Transport protocol considerations added.</t>
            </list>
        </t>
        <t>Changes from draft-ietf-mmusic-sdp-dtls-00
            <list style="symbols">
                <t>- SDP 'connection' attribute replaced with new 'tls-id' attribute.</t>
                <t>- IANA Considerations added.</t>
                <t>- E-mail regarding 'tls-id-id' attribute added as Annex.</t>
            </list>
        </t>
        <t>Changes from draft-holmberg-mmusic-sdp-dtls-01
            <list style="symbols">
                <t>- draft-ietf-mmusic version of draft submitted.</t>
                <t>- Draft file name change (sdp-dtls -> dtls-sdp) due to collision with another expired draft.</t>
                <t>- Clarify that if ufrag in offer is unchanged, it must be unchanged in associated answer.</t>
                <t>- SIP Considerations section added.</t>
                <t>- Section about multiple SDP fingerprint attributes added.</t>
            </list>
        </t>
        <t>Changes from draft-holmberg-mmusic-sdp-dtls-00
            <list style="symbols">
                <t>- Editorial changes and clarifications.</t>
            </list>
        </t>

    </section>
</middle>

<back>
    <references title="Normative References">
        <?rfc include="reference.RFC.2119"?>
        <?rfc include="reference.RFC.3261"?>
        <?rfc include="reference.RFC.3264"?>
        <?rfc include="reference.RFC.4145"?>
        <?rfc include="reference.RFC.4566"?>
        <?rfc include="reference.RFC.5763"?>
        <?rfc include="reference.RFC.6347"?>
        <?rfc include="reference.RFC.7345"?>
        <?rfc include="reference.RFC.8122"?>
        <?rfc include="reference.RFC.8174"?>
        <?rfc include="reference.I-D.draft-ietf-ice-rfc5245bis-10"?>
        <?rfc include="reference.I-D.draft-ietf-mmusic-sdp-mux-attributes-16"?>
        <?rfc include="reference.I-D.draft-ietf-mmusic-sdp-bundle-negotiation-38"?>
    </references>
    <references title="Informative References">
        <?rfc include="reference.RFC.4474"?>
        <?rfc include="reference.RFC.4572"?>
        <?rfc include="reference.RFC.5576"?>
        <?rfc include="reference.RFC.6083"?>
        <?rfc include="reference.RFC.7983"?>
        <?rfc include="reference.I-D.draft-ietf-stir-rfc4474bis-16"?>
        <?rfc include="reference.I-D.draft-ietf-mmusic-ice-sip-sdp-13"?>
        <?rfc include="reference.I-D.draft-ietf-mmusic-sdp-uks-00"?>
        <reference anchor="ITU.T38.2010">
          <front>
          <title>Procedures for real-time Group 3 facsimile communication over IP networks</title>
          <author>
          <organization>International Telecommunications Union</organization>
          </author>
          <date year="2010" month="September"/>
          </front>
          <seriesInfo value="Recommendation T.38" name="ITU-T"/>
        </reference>
    </references>

</back>
</rfc>
