Using the SDP Offer/Answer Mechanism for DTLS
EricssonHirsalantie 11Jorvas02420Finlandchrister.holmberg@ericsson.comTurboBridge4905 Del Ray Avenue, Suite 300BethesdaMD20814USA+1 (240) 292-6632rshpount@turbobridge.com
RAI
This draft defines the SDP offer/answer procedures for negotiating and establishing
a DTLS association. The draft also defines the criteria for when a new DTLS association
must be established.
This draft defines a new SDP media-level attribute, 'dtls-id'.
defines SDP Offer/Answer
procedures for SRTP-DTLS.
defines SDP offer/answer procedures for UDPTL-DTLS. This specification
defines general offer/answer procedures for DTLS, based on the procedures in
. 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 .
As defined in , a new DTLS association
MUST be established when transport parameters are changed. Transport parameter change is not
well defined when Interactive Connectivity Establishment (ICE) is used. One possible way to determine a transport change is
based on ufrag change, but the ufrag value is changed both when ICE is negotiated
and when ICE restart occurs. These events
do not always require a new DTLS association to be established, but currently there is no way
to explicitly indicate in an SDP offer or answer whether a new DTLS association is required.
To solve that problem, this draft defines a new SDP attribute, 'dtls-id'. The attribute
contains a unique value associated with a DTLS association, and by providing a new value
in SDP offers and answers the attribute can be used to indicate whether a new DTLS
association is to be established/re-established.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in .
A new DTLS association MUST be established in the following cases:
The DTLS roles change;
One or more fingerprint values are modified, added
or removed; or
The intent to establish a new DTLS association is
explicitly signaled;
NOTE: The first two items list above are based on the procedures
in .
This specification adds the support for explicit signaling.
Whenever an entity determines, based on the criteria above, that a new DTLS association
is required, the entity MUST initiate an associated SDP offer/answer transaction, following the
procedures in .
The sections below describe typical cases where a new DTLS association needs to be established.
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 DTLS role, change its fingerprint value, and/or
use the SDP 'dtls-id' attribute with a new value .
If the underlying transport explicitly prohibits a DTLS association to span multiple transports, and if
the transport is changed, a new value MUST be assigned to the the SDP 'dtls-id' attribute.
An example of such case is when DTLS is carried over SCTP, as described in .
If an endpoint uses ICE, and modifies a local ufrag value, and if the modification
requires a new DTLS association, the endpoint MUST either change its DTLS role, a fingerprint value and/or
assign a new value to the SDP 'dtls-id' attribute .
The SDP 'dtls-id' attribute contains a unique value associated with a
DTLS association.
A 'dtls-id' attribute that contains a new value indicates an intention
to establish a new DTLS association. A 'dtls-id' attribute
that contains a previously assigned value indicates an intention to reuse an existing
association.
There is no default value defined for the SDP 'dtls-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 an
attribute (this could happen if the offerer or answerer represents an
existing implementation that has not been updated to support the attribute
defined in this specification or an implementation which allocates a new
temporary certificate for each association and uses change in fingerprint
to indicate new association), other means needs to be used in order for
endpoints to determine whether an offer or answer is associated with an
event that requires the DTLS association to be re-established.
The mux category
for the 'dtls-id' attribute is 'IDENTICAL', which means that
the attribute value must be identical across all media descriptions
being multiplexed .
For RTP-based media, the 'dtls-id' attribute apply to whole associated
media description. The attribute MUST NOT be defined per source (using the
SDP 'ssrc' attribute ).
The SDP offer/answer
procedures associated with the attribute are defined in
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. SRTP-DTLS) are outside the scope
of this specification, and need to be specified in a usage specific specification.
NOTE: The procedures in this section are generalizations of procedures first
specified in SRTP-DTLS ,
with the addition of usage of the SDP 'dtls-id' attribute. That document is
herein revised to make use of these new procedures.
The procedures in this section apply to an SDP media description ("m=" line) associated
a DTLS-protected media/data.
When an offerer needs to establish a new DTLS association, and if an unreliable transport (e.g. UDP)
is used, the offerer MUST allocate a new transport 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 ), which were
not recently used for any other DTLS association.
When an answerer needs to establish a new DTLS association, if unreliable transport is used, and if
the offerer did not allocate a new transport, the answerer MUST allocate a new transport for the offer
in answer a way that it can disambiguate any packets associated with 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 ),
which were not recently used for any other DTLS association.
In order to negotiate a DTLS association, the following SDP attributes are used:
The SDP 'setup' attribute, defined in , is used to negotiate the DTLS roles;
The SDP 'fingerprint' attribute, defined in , is used to provide a fingerprint
value; and
The SDP 'dtls-id' attribute, defined in this specification, indicates
a unique value associated with the DTLS association. The attribute value can
be used to explicitly indicate the intention of establishing a new DTLS association.
This specification does not define the usage of the SDP 'connection' attribute
for negotiating a DTLS
connection. 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.
Unlike for TCP and TLS connections, endpoints MUST NOT use the
SDP 'setup' attribute 'holdconn' value when negotiating a DTLS association.
Endpoints MUST support SHA-256 for generating and verifying any fingerprint
value associated with the DTLS association. The use of SHA-256 is preferred.
Endpoints MUST, at a minimum, support TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
and MUST support TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256. UDPTL over DTLS MUST
prefer TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 and any other Perfect Forward Secrecy
(PFS) cipher suites over non-PFS cipher suites. Implementations SHOULD disable
TLS-level compression.
The certificate received during the DTLS handshake MUST match at least
one of the certificate fingerprints received in SDP 'fingerprint' attributes.
If no fingerprint matches the hashed certificate, then an endpoint MUST tear
down the media session immediately. Note that it is permissible to wait until
the other side's fingerprint has been received before establishing the connection;
however, this may have undesirable latency effects.
SDP offerers and answerers might reuse certificates across multiple DTLS
associations, and provide identical fingerprint values for each DTLS
association. It MUST be ensured that the combination of the fingerprint values
and the SDP 'dtls-id' attribute value is unique across all
DTLS associations.
If an SDP offerer or answerer generates a new temporary self-signed certificate for
each new DTLS association, they can omit the SDP 'dtls-id' attribute.
When the offerer sends the initial offer, and the offerer wants to establish a
DTLS association, it MUST insert an SDP 'dtls-id' attribute with a new value
in the offer. In addition, the offerer MUST insert an SDP 'setup' attribute according
to the procedures in , and
one or more SDP 'fingerprint' attributes according to the procedures in , in the offer.
If the offerer inserts the SDP 'setup' attribute with an 'actpass' or 'passive' value, the
offerer MUST be prepared to receive a DTLS ClientHello message (if a new DTLS association
is established by the answerer) from the answerer before it receives the SDP answer.
If an answerer receives an offer that contains an SDP 'dtls-id' attribute with a new
value, or if the answerer receives an offer that contains an 'dtls-id' attribute with a
previously assigned value and the answerer determines (based on the criteria for establishing
a new DTLS association) that a new DTLS association is to be established, the answerer MUST
insert a new value in the associated answer. In addition, the answerer MUST insert an
SDP 'setup' attribute according to the procedures in , and one or more SDP 'fingerprint' attributes according to the procedures in
, in the answer.
If an answerer receives an offer that contains an SDP 'dtls-id' attribute with a new
value, 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
.
If an answerer receives an offer that contains a 'dtls-id' attribute with a previously assigned value,
and if the answerer determines that a new DTLS association is not to be established,
the answerer MUST insert a 'dtls-id' attribute with the previously assigned value in the
associated answer. In addition, the answerer MUST insert an SDP 'setup' attribute with a
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 fingerprints, in the answer.
If the answerer receives an offer that does not contain an SDP 'dtls-id' attribute,
the answerer MUST NOT insert a 'dtls-id' attribute in the answer.
If a new DTLS association is to be established, and if the answerer inserts an SDP 'setup'
attribute with an 'active' value in the answer, the answerer MUST initiate a DTLS handshake by
sending a DTLS ClientHello message towards the offerer.
When an offerer receives an answer that contains an SDP 'dtls-id' attribute with
a new value, and if the offerer becomes DTLS client (based on the value of the SDP 'setup'
attribute value ), the offerer MUST
establish a DTLS association. If the offerer becomes DTLS server, it MUST wait for the answerer
to establish the DTLS association.
If the answer contains an SDP 'dtls-id' attribute with a previously assigned value, the offerer
will continue using the previously established DTLS association. It is considered an error
case if the answer contains a 'dtls-id' attribute with a previously assigned value, and a DTLS
association does not exist.
An offerer needs to be able to handle error conditions that can occur during an offer/answer
transaction, e.g. if an answer contains an SDP 'dtls-id' attribute with a previosuly assigned value even
if no DTLS association exists, or if the answer contains one or more new fingerprint values for an existing DTLS association.
If such error case occurs, the offerer SHOULD terminate the associated DTLS association (if it exists) and send
a new offer in order to terminate each media stream using the DTLS association, by setting the associated
port value to zero .
When the offerer sends a subsequent offer, and if the offerer wants to establish a new
DTLS association, the offerer MUST insert an SDP 'dtls-id' attribute with a new
value in the offer. In addition, the offerer MUST insert an SDP 'setup' attribute
according to the procedures in ,
and one or more SDP 'fingerprint' attributes according to the procedures in , in the offer.
when the 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 'dtls-id' attribute with a previously assigned value in the offer.
In addition, the offerer MUST insert an SDP 'setup' attribute with a value that does
not change the previously negotiated DTLS roles, and one or more SDP 'fingerprint' attributes with
values that do not change the previously sent fingerprints, in the offer.
NOTE: When a new DTLS association is established, each endpoint needs to be prepared to receive
data on both the new and old DTLS associations as long as both are alive.
When ICE 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.
NOTE: Aggressive nomination has been deprecated from ICE, but must still be
supported for backwards compatibility reasons.
When new DTLS association is established over an unreliable transport, in order to
disambiguate any packets associated with 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 that answerer
cannot initiate a new DTLS association unless the offerer initiated ICE restart
. If the answerer wants
to initiate a new DTLS association, it needs to initiate an ICE restart
on its own. However, an ICE restart does not by default require a new DTLS association
to be established.
NOTE: Simple Traversal of the UDP Protocol through NAT (STUN) packets are sent directly
over UDP, not over DTLS. describes
how to demultiplex STUN packets from DTLS packets and SRTP packets.
As defined in ,
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.
If DTLS is transported on top of a connection-oriented transport protocol (e.g. TCP or SCTP),
where all IP packets are acknowledged, all DTLS packets associated with a previous
DTLS association MUST be acknowledged (or timed out) before a new DTLS association
can be established on the same transport.
When the Session Initiation Protocol (SIP) is used as the signal protocol for establishing a multimedia
session, dialogs might be
established between the caller and multiple callees. This is referred to as forking.
If forking occurs, separate DTLS associations MUST be established between the caller
and each callee.
It is possible to send an INVITE request which does not contain an SDP offer. Such
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 associated with the
response. When the endpoint generates such SDP offer, if a previously established
DTLS association exists, the offerer SHOULD insert an SDP 'dtls-id'
attribute, and one or more SDP 'fingerprint' attributes, with previously assigned
attribute values. If a previously established DTLS association did not exists
offer SHOULD be generated based on the same rules as new offer .
Regardless of the previous existence of DTLS association, the SDP 'setup' attribute
MUST be included according to rules defiend in and if ICE is used, ICE restart MUST be initiated as defined in
.
This section updates specifications that use DTLS-protected media, in
order to reflect the procedures defined in this specification.
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
'dtls-id' attribute, the specification simply clarifies the procedures for
negotiating and establishing a DTLS association.
This document updates the "Session Description Protocol Parameters" registry
as specified in Section 8.2.2 of .
Specifically, it adds the SDP dtls-id attribute to the table for SDP
media level attributes.
Thanks to Justin Uberti, Martin Thomson, Paul Kyzivat, Jens Guballa,
Charles Eckel and Gonzalo Salgueiro for providing comments and
suggestions on the draft.
[RFC EDITOR NOTE: Please remove this section when publishing]Changes from draft-ietf-mmusic-sdp-dtls-11
Attribute name changed to dtls-idAdditional text based on comments from Roman Shpount.Changes from draft-ietf-mmusic-sdp-dtls-10
Modified document to use dtls-id instead of dtls-connectionChanges are based on comments from Eric Rescorla, Justin Uberti, and Paul Kyzivat.Changes from draft-ietf-mmusic-sdp-dtls-08
Offer/Answer section modified in order to allow sending of multiple SDP 'fingerprint' attributes.Terminology made consistent: 'DTLS connection' replaced with 'DTLS association'.Editorial changes based on comments from Paul Kyzivat.Changes from draft-ietf-mmusic-sdp-dtls-07
Reference to RFC 7315 replaced with reference to RFC 7345.Changes from draft-ietf-mmusic-sdp-dtls-06
Text on restrictions regarding spanning a DTLS association over multiple transports added.Mux category added to IANA Considerations.Normative text regarding mux category and source-specific applicability added.Reference to RFC 7315 added.Clarified that offerer/answerer that has not been updated to support this specification will
not include the dtls-id attribute in offers and answers.Editorial corrections based on WGLC comments from Charles Eckel.Changes from draft-ietf-mmusic-sdp-dtls-05
Text on handling offer/answer error conditions added.Changes from draft-ietf-mmusic-sdp-dtls-04
Editorial nits fixed based on comments from Paul Kyzivat:Changes from draft-ietf-mmusic-sdp-dtls-03
Changes based on comments from Paul Kyzivat:- Modification of dtls-id attribute section.- Removal of IANA considerations subsection.- Making note into normative text in o/a section.Changes based on comments from Martin Thompson:- Abbreviations section removed.- Clarify that a new DTLS association requires a new o/a transaction.Changes from draft-ietf-mmusic-sdp-dtls-02
- Updated RFCs added to boilerplate.Changes from draft-ietf-mmusic-sdp-dtls-01
- Annex regarding 'dtls-id-id' attribute removed.- Additional SDP offer/answer procedures, related to certificates, added.- Updates to RFC 5763 and RFC 7345 added.- Transport protocol considerations added.Changes from draft-ietf-mmusic-sdp-dtls-00
- SDP 'connection' attribute replaced with new 'dtls-id' attribute.- IANA Considerations added.- E-mail regarding 'dtls-id-id' attribute added as Annex.Changes from draft-holmberg-mmusic-sdp-dtls-01
- draft-ietf-mmusic version of draft submitted.- Draft file name change (sdp-dtls -> dtls-sdp) due to collision with another expired draft.- Clarify that if ufrag in offer is unchanged, it must be unchanged in associated answer.- SIP Considerations section added.- Section about multiple SDP fingerprint attributes added.Changes from draft-holmberg-mmusic-sdp-dtls-00
- Editorial changes and clarifications.