SDES RFC 4568 - Session Description Protocol (SDP) Security Descriptions For Media Streams
SDES RFC 4568 - Session Description Protocol (SDP) Security Descriptions For Media Streams
PROPOSED STANDARD
Copyright Notice
Abstract
Table of Contents
1. Introduction ....................................................3
2. Notational Conventions ..........................................5
3. Applicability ...................................................5
4. SDP "Crypto" Attribute and Parameters ...........................5
4.1. Tag ........................................................6
4.2. Crypto-Suite ...............................................6
4.3. Key Parameters .............................................7
4.4. Session Parameters .........................................8
4.5. Example ....................................................8
5. General Use of the crypto Attribute .............................9
5.1. Use with Offer/Answer ......................................9
5.1.1. Generating the Initial Offer - Unicast Streams ......9
1. Introduction
SDP, however, was not designed to provide AKE services, and the media
security descriptions defined in this document do not add AKE
services to SDP. This specification is no replacement for a key
management protocol or for the conveyance of key management messages
in SDP [keymgt]. The SDP security descriptions defined here are
suitable for restricted cases only where IPsec, TLS, or some other
encapsulating data-security protocol (e.g., SIP S/MIME) protects the
SDP message. This document adds security descriptions to those
encrypted and/or authenticated SDP messages through the new SDP
"crypto" attribute, which provides the cryptographic parameters of a
media stream.
The "crypto" attribute can be adapted to any media transport, but its
precise definition is unique to a particular transport.
2. Notational Conventions
The key words "MUST", "MUST NOT", "REQUIRED", "SHOULD", "SHOULD NOT",
"RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be
interpreted as described in [RFC2119]. The terminology in this
document conforms to [RFC2828], "Internet Security Glossary".
3. Applicability
a=crypto:1 AES_CM_128_HMAC_SHA1_80
inline:PS1uQCVeeCFCanVmcjkpPywjNWhcYD0mXXtxaVBR|2^20|1:32
4.1. Tag
4.2. Crypto-Suite
The key-params field provides one or more sets of keying material for
the crypto-suite in question. The field consists of a method
indicator followed by a colon, and the actual keying information as
shown below (the formal grammar is provided in Section 9.1):
4.5. Example
This example shows use of the crypto attribute for the "RTP/SAVP"
media transport type (as defined in Section 5). The "a=crypto" line
is actually one long line; it is shown as two lines due to page
formatting.
v=0
o=jdoe 2890844526 2890842807 IN IP4 10.47.16.5
s=SDP Seminar
i=A Seminar on the session description protocol
u=http://www.example.com/seminars/sdp.pdf
[email protected] (Jane Doe)
c=IN IP4 161.44.17.12/127
t=2873397496 2873404696
m=video 51372 RTP/SAVP 31
a=crypto:1 AES_CM_128_HMAC_SHA1_80
inline:d0RmdmcmVCspeEc3QGZiNWpVLFJhQX1cfHAwJSoj|2^20|1:32
m=audio 49170 RTP/SAVP 0
a=crypto:1 AES_CM_128_HMAC_SHA1_32
inline:NzB4d1BINUAvLEw6UzF3WSJ+PSdFcGdUJShpX1Zj|2^20|1:32
m=application 32416 udp wb
a=orient:portrait
This SDP message describes three media streams, two of which use the
"RTP/SAVP" transport. Each has a crypto attribute for the "RTP/SAVP"
transport. These secure-RTP specific descriptions are defined in
Section 6.
The offer may include session parameters. There are no general offer
rules for the session parameters; instead, specific rules may be
provided as part of the transport-specific definitions of any session
parameters.
When the answerer receives the initial offer with one or more crypto
attributes for a given unicast media stream, the answerer MUST either
accept exactly one of the offered crypto attributes, or the offered
stream MUST be rejected.
If there are one or more crypto attributes in the offer, but none of
them are valid or none of the valid ones are supported, the offered
media stream MUST be rejected.
* The tag and crypto-suite from the accepted crypto attribute in the
offer (the same crypto-suite MUST be used in the send and receive
direction).
* The key(s) the answerer will be using for media sent to the
offerer. Note that a key MUST be provided, irrespective of any
direction attributes in the offer or answer.
Once the answerer has accepted one of the offered crypto attributes,
the answerer MAY begin sending media to the offerer in accordance
with the selected crypto attribute. Note, however, that the offerer
may not be able to process such media packets correctly until the
answer has been received.
When the offerer receives the answer, the offerer MUST verify that
one of the initially offered crypto suites and its accompanying tag
were accepted and echoed in the answer. Also, the answer MUST
include one or more keys, which will be used for media sent from the
answerer to the offerer.
receive the associated stream. The sender SHOULD select the security
description that it deems most secure for its purposes.
Similar issues exist when security descriptions are used outside the
offer/answer model. But the source of a non-negotiated security
description has no indication that the receiver has ignored the
crypto attribute.
SRTP security descriptions MUST only be used with the SRTP transport
(e.g., "RTP/SAVP" or "RTP/SAVPF"). The following specifies security
descriptions for the "RTP/SAVP" profile, defined in [RFC3711].
However, it is expected that other secure RTP profiles (e.g.,
"RTP/SAVPF") can use the same descriptions, which are in accordance
with the SRTP protocol specification [RFC3711].
settings for many of the SRTP parameters, such as salt length and
pseudo-random function (PRF). Thus, it is possible to simplify the
list of parameters by defining "cryptographic suites" that fix a set
of SRTP parameter values for the security session. This approach is
followed by the SRTP security descriptions, which uses the general
security description parameters as follows:
SRTP security descriptions define the use of the "inline" key method
as described in the following. Use of any other keying method (e.g.,
URL) for SRTP security descriptions is for further study.
The "inline" type of key contains the keying material (master key and
salt) and all policy related to that master key, including how long
it can be used (lifetime) and whether it uses a master key identifier
(MKI) to associate an incoming SRTP packet with a particular master
key. Compliant implementations obey the policies associated with a
master key and MUST NOT accept incoming packets that violate the
policy (e.g., after the master key lifetime has expired).
value with respect to other master keys in the entire SDP message
(i.e., including master keys for other streams). Each key follows
the format (the formal definition is provided in Section 9.2):
inline:d0RmdmcmVCspeEc3QGZiNWpVLFJhQX1cfHAwJSoj|2^20|1:4
colon, whereas the third field always does). This is convenient when
the SRTP cryptographic key lifetime is the default value. As a
shortcut to avoid long decimal values, the syntax of the lifetime
allows using the literal "2^", which indicates "two to the power of".
The example above shows a case where the lifetime is specified as
2^20. The following example, which is for the
AES_CM_128_HMAC_SHA1_80 crypto-suite, has a default for the lifetime
field, which means that SRTP's and SRTCP's default values will be
used (see [RFC3711]):
inline:YUJDZGVmZ2hpSktMbW9QUXJzVHVWd3l6MTIzNDU2|1066:4
The example shows a 30-octet key and concatenated salt that is base64
encoded: The 30-octet key/salt concatenation is expanded to 40
characters (octets) by the three-in-four encoding of base64.
The third field, which is also OPTIONAL, is the Master Key Identifier
(MKI) and its byte length.
"MKI" is the master key identifier associated with the SRTP master
key. The MKI is here defined as a positive decimal integer that is
encoded as a big-endian integer in the actual SRTP packets; leading
zeroes MUST NOT be used in the integer representation. If the MKI is
given, then the length of the MKI MUST also be given and separated
from the MKI by a colon (":"). The MKI length is the size of the MKI
field in the SRTP packet, specified in bytes as a decimal integer;
leading zeroes MUST NOT be used. If the MKI length is not given or
its value exceeds 128 (bytes), then the entire crypto attribute MUST
be considered invalid. The substring "1:4" in the first example
assigns to the key a master key identifier of 1 that is 4 bytes long,
and the second example assigns a 4-byte master key identifier of 1066
to the key. One or more master keys with their associated MKI can be
initially defined, and then later updated, or deleted and new ones
defined.
As mentioned above, the key parameter can contain one or more master
keys. When the key parameter contains more than one master key, all
the master keys in that key parameter MUST include an MKI value.
When using the MKI, the MKI length MUST be the same for all keys in a
given crypto attribute.
6.2. Crypto-Suites
+---------------------+-------------+--------------+---------------+
| |AES_CM_128_ | AES_CM_128_ | F8_128_ |
| |HMAC_SHA1_80 | HMAC_SHA1_32 | HMAC_SHA1_80 |
+---------------------+-------------+--------------+---------------+
| Master key length | 128 bits | 128 bits | 128 bits |
| Master salt length | 112 bits | 112 bits | 112 bits |
| SRTP lifetime | 2^48 packets| 2^48 packets | 2^48 packets |
| SRTCP lifetime | 2^31 packets| 2^31 packets | 2^31 packets |
| Cipher | AES Counter | AES Counter | AES F8 Mode |
| | Mode | Mode | |
| Encryption key | 128 bits | 128 bits | 128 bits |
| MAC | HMAC-SHA1 | HMAC-SHA1 | HMAC-SHA1 |
| SRTP auth. tag | 80 bits | 32 bits | 80 bits |
| SRTCP auth. tag | 80 bits | 80 bits | 80 bits |
| SRTP auth. key len. | 160 bits | 160 bits | 160 bits |
| SRTCP auth. key len.| 160 bits | 160 bits | 160 bits |
+---------------------+-------------+--------------+---------------+
6.2.1. AES_CM_128_HMAC_SHA1_80
The SRTP and SRTCP encryption key lengths are 128 bits. The SRTP and
SRTCP authentication key lengths are 160 bits (see Security
Considerations in Section 8). The master salt value is 112 bits in
length and the session salt value is 112 bits in length. The
pseudo-random function (PRF) is the default SRTP pseudo-random
function that uses AES Counter Mode with a 128-bit key length.
The length of the base64-decoded key and salt value for this crypto-
suite MUST be 30 characters (i.e., 240 bits); otherwise, the crypto
attribute is considered invalid.
6.2.2. AES_CM_128_HMAC_SHA1_32
The length of the base64-decoded key and salt value for this crypto-
suite MUST be 30 octets i.e., 240 bits; otherwise, the crypto
attribute is considered invalid.
6.2.3. F8_128_HMAC_SHA1_80
The length of the base64-decoded key and salt value for this crypto-
suite MUST be 30 octets, i.e., 240 bits; otherwise the crypto
attribute is considered invalid.
6.3.1. KDR=n
6.3.3. UNAUTHENTICATED_SRTP
6.3.4. FEC_ORDER=order
FEC_ORDER signals the use of forward error correction for the RTP
packets [RFC2733]. The forward error correction values for "order"
are FEC_SRTP or SRTP_FEC. FEC_SRTP signals that FEC is applied
before SRTP processing by the sender of the SRTP media and after SRTP
processing by the receiver of the SRTP media; FEC_SRTP is the
default. SRTP_FEC is the reverse processing.
6.3.5. FEC_KEY=key-params
FEC_KEY signals the use of separate master key(s) for a Forward Error
Correction (FEC) stream. The master key(s) are specified with the
exact same format as the SRTP Key Parameter defined in Section 6.1,
and the semantic rules are the same - in particular, the master
key(s) MUST be different from all other master key(s) in the SDP. An
FEC_KEY MUST be specified when the FEC stream is sent to a different
IP-address and/or port than the media stream to which it applies
(i.e., the "m=" line), e.g., as described in RFC 2733, Section 11.1.
When an FEC stream is sent to the same IP-address and port as the
media stream to which it applies, an FEC_KEY MUST NOT be specified.
If an FEC_KEY is specified in this latter case, the crypto attribute
in question MUST be considered invalid.
The Window Size Hint (WSH) session parameter provides a hint for how
big this window should be to work satisfactorily (e.g., based on
sender knowledge of the number of packets per second). However,
there might be enough information given in SDP attributes like
"a=maxprate" [maxprate] and the bandwidth modifiers to allow a
receiver to derive the parameter satisfactorily. Consequently, this
value is only considered a hint to the receiver of the SDP that MAY
choose to ignore the value provided. The value is a decimal integer;
leading zeroes MUST NOT be used.
New SRTP session parameters for the SRTP security descriptions can be
defined in a Standards-Track RFC and registered with IANA according
to the registration procedures defined in Section 10.
Also note that there is a second problem with SSRC collisions: the
SSRC is used to identify the crypto context and thereby the
cipher, key, ROC, etc. to process incoming packets. In case of
The second constraint is that the ROC MUST be zero at the time that
each SSRC commences sending packets. Thus, there is no concept of a
"late joiner" in SRTP security descriptions, which are constrained to
be unicast and pairwise. The ROC and SEQ form a "packet index" in
the default SRTP transforms and the ROC is consistently set to zero
at session commencement, according to this document.
the crypto context for a secure RTP session using late binding is
initially identified by the SDP as
Even when late binding is used for a unicast stream, the ROC is
lost and cannot be recovered automatically (unless it is zero)
once the crypto context is removed.
When the initial offer is generated, the offerer MUST follow the
steps in Section 5.1.1, as well as the following steps.
For each unicast media line (m=) using the secure RTP transport where
the offerer wants to specify cryptographic parameters, the offerer
MUST provide at least one valid SRTP security description ("a=crypto"
line), as defined in Section 6. If the media stream includes Forward
The inline parameter conveys the SRTP master key used by an endpoint
to encrypt the SRTP and SRTCP streams transmitted by that endpoint.
The same key is used by the recipient to decrypt those streams.
However, the receiver MUST NOT use that same key for the SRTP or
SRTCP packets that it sends to the session because the default SRTP
cipher and mode is insecure when the master key is reused across
distinct SRTP streams.
The offerer MAY include one or more other SRTP session parameters, as
defined in Section 6.3. Note, however, that if any SRTP session
parameters are included that are not known to the answerer, but that
are nonetheless mandatory (see Section 6.3.6), the negotiation will
fail if the answerer does not support them.
When the initial answer is generated, the answerer MUST follow the
steps in Section 5.1.2, as well as the following steps.
For each unicast media line that uses the secure RTP transport and
contains one or more "a=crypto" lines in the offer, the answerer MUST
either accept one (and only one) of the crypto lines for that media
stream, or it MUST reject the media stream. Only "a=crypto" lines
that are considered valid SRTP security descriptions, as defined in
Section 6, can be accepted. Furthermore, all parameters (crypto-
suite, key parameter, and mandatory session parameters) MUST be
acceptable to the answerer in order for the offered media stream to
be accepted. Note that if the media stream includes Forward Error
Correction with a different IP-address and/or port from that of the
media stream itself, an FEC_KEY parameter MUST be included, as
described in Section 6.3.5.
When the answerer accepts an SRTP unicast media stream with a crypto
line, the answerer MUST include one or more master keys appropriate
for the selected crypto algorithm; the master key(s) included in the
answer MUST be different from those in the offer.
When the master key(s) are not shared between the offerer and
answerer, SSRC collisions between the offerer and answerer will
not lead to keystream reuse, and hence SSRC collisions do not
necessarily have to be prevented.
If the answerer cannot find any valid crypto line that it supports,
or if its configured policy prohibits any cryptographic key parameter
(e.g., key length) or cryptographic session parameter (e.g., KDR,
FEC_ORDER), it MUST reject the media stream, unless it is able to
successfully negotiate use of SRTP by other means outside the scope
of this document (e.g., by use of MIKEY [mikey]).
When the offerer receives the answer, it MUST perform the steps in
Section 5.1.3, as well as the following steps for each SRTP media
stream it offered with one or more crypto lines in it.
If the offerer either does not support or is not willing to honor one
or more of the SRTP parameters in the answer, the offerer MUST
consider the crypto line invalid.
When a media stream using the SRTP security descriptions has been
established and a new offer/answer exchange is performed, the offerer
and answerer MUST follow the steps in Section 5.1.4, as well as the
following steps.
When modifying the session, all negotiated aspects of the SRTP media
stream can be modified. For example, a new crypto suite can be used
or a new master key can be established. As described in RFC 3264,
when a new offer/answer exchange is made, there will be a window of
time where the offerer and the answerer must be prepared to receive
media according to both the old and new offer/answer exchange.
* If the answerer changes its master key, the offerer will not be
able to process packets secured via this master key until the
answer is received. This could be addressed by using a security
"precondition" [sprecon].
Finally, note that if the new offer is rejected, the old crypto
parameters remain in place.
In this example, the offerer supports two crypto suites (f8 and AES).
The a=crypto line is actually one long line, although it is shown as
two lines in this document due to page formatting. The f8 example
shows two inline parameters; as explained in Section 6.1, there may
be one or more key (i.e., inline) parameters in a crypto attribute.
In this way, multiple keys are offered to support key rotation using
a Master Key Identifier (MKI).
Offerer sends:
v=0
o=sam 2890844526 2890842807 IN IP4 10.47.16.5
s=SRTP Discussion
i=A discussion of Secure RTP
u=http://www.example.com/seminars/srtp.pdf
[email protected] (Marge Simpson)
c=IN IP4 168.2.17.12
t=2873397496 2873404696
m=audio 49170 RTP/SAVP 0
a=crypto:1 AES_CM_128_HMAC_SHA1_80
inline:WVNfX19zZW1jdGwgKCkgewkyMjA7fQp9CnVubGVz|2^20|1:4
FEC_ORDER=FEC_SRTP
a=crypto:2 F8_128_HMAC_SHA1_80
inline:MTIzNDU2Nzg5QUJDREUwMTIzNDU2Nzg5QUJjZGVm|2^20|1:4;
inline:QUJjZGVmMTIzNDU2Nzg5QUJDREUwMTIzNDU2Nzg5|2^20|2:4
FEC_ORDER=FEC_SRTP
Answerer replies:
v=0
o=jill 25690844 8070842634 IN IP4 10.47.16.5
s=SRTP Discussion
i=A discussion of Secure RTP
u=http://www.example.com/seminars/srtp.pdf
[email protected] (Homer Simpson)
c=IN IP4 168.2.17.11
t=2873397526 2873405696
m=audio 32640 RTP/SAVP 0
a=crypto:1 AES_CM_128_HMAC_SHA1_80
inline:PS1uQCVeeCFCanVmcjkpPywjNWhcYD0mXXtxaVBR|2^20|1:4
* Two or more answerers may pick the same SSRC, and hence the SSRC
collision problems mentioned earlier may arise.
For each answer received beyond the initial answer, issue a new offer
to that particular answerer using a new receive transport address (IP
address and port); note that this requires support for the SIP UPDATE
method [RFC3311]. Also, to ensure that two media sessions are not
inadvertently established prior to the UPDATE being processed by one
of them, use security preconditions [sprecon].
Finally, note that all SIP User Agents that received the offer will
know the key(s) being proposed by the initial offer. If the offerer
wants to ensure security with respect to all other User Agents that
may have received the offer, a new offer/answer exchange with a new
key needs to be performed with the answerer as well. Note that the
offerer cannot determine whether a single or multiple SIP User Agents
received the offer, since intermediate forking proxies may only
forward a single answer to the offerer.
An offer MAY include both "a=crypto" and "k=" lines [RFC4566]. Per
SDP rules, the answerer will ignore attribute lines it does not
understand. If the answerer supports both "a=crypto" and "k=", the
answer MUST include either "a=crypto" or "k=" but not both, as
including both is undefined.
8. Security Considerations
9. Grammar
In this section, we first provide the ABNF grammar for the generic
crypto attribute, and then we provide the ABNF grammar for the SRTP-
specific use of the crypto attribute.
tag = 1*9DIGIT
crypto-suite = 1*(ALPHA / DIGIT / "_")
crypto-suite = srtp-crypto-suite
key-method = srtp-key-method
key-info = srtp-key-info
session-param = srtp-session-param
srtp-crypto-suite = "AES_CM_128_HMAC_SHA1_32" /
"F8_128_HMAC_SHA1_32" /
"AES_CM_128_HMAC_SHA1_80" /
srtp-crypto-suite-ext
srtp-key-method = "inline"
srtp-key-info = key-salt ["|" lifetime] ["|" mki]
srtp-session-param = kdr /
"UNENCRYPTED_SRTP" /
"UNENCRYPTED_SRTCP" /
"UNAUTHENTICATED_SRTP" /
fec-order /
fec-key /
wsh /
srtp-session-extension
The IANA has created a new subregistry for SDP security description
key methods. An IANA key method registration MUST be documented in
an RFC in accordance with the [RFC2434] Standards Action, and it MUST
provide the name of the key method in accordance with the grammar for
key-method-ext defined in Section 9.1.
The IANA has created a new subregistry for SDP security description
Media Stream Transports. An IANA media stream transport registration
MUST be documented in an RFC in accordance with the RFC 2434
Standards Action and the procedures defined in Sections 4 and 5 of
this document. The registration MUST provide the name of the
transport and a list of supported key methods.
inline
The IANA has created a new subregistry for SRTP crypto suites under
the SRTP transport of the SDP Security Descriptions. An IANA SRTP
crypto suite registration MUST indicate the crypto suite name in
accordance with the grammar for srtp-crypto-suite-ext defined in
Section 9.2.
AES_CM_128_HMAC_SHA1_80
AES_CM_128_HMAC_SHA1_32
F8_128_HMAC_SHA1_80
The IANA has created a new subregistry for SRTP session parameters
under the SRTP transport of the SDP Security Descriptions. An IANA
SRTP session parameter registration MUST indicate the session
parameter name (srtp-session-extension as defined in Section 9.2);
the name MUST NOT begin with the dash character ("-").
KDR
UNENCRYPTED_SRTP
UNENCRYPTED_SRTCP
UNAUTHENTICATED_SRTP
FEC_ORDER
FEC_KEY
WSH
11. Acknowledgements
This document is a product of the IETF MMUSIC working group and has
benefited from comments from its participants. This document also
benefited from discussions with Elisabetta Cararra, Earl Carter, Per
Cederqvist, Bill Foster, Matt Hammer, Cullen Jennings, Paul Kyzivat,
David McGrew, Mats Naslund, Dave Oran, Jonathan Rosenberg, Dave
Singer, Mike Thomas, Brian Weis, and Magnus Westerlund.
[RFC4234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax
Specifications: ABNF", RFC 4234, October 2005.
[RFC3711] Baugher, M., McGrew, D., Naslund, M., Carrara, E., and K.
Norrman, "The Secure Real-time Transport Protocol (SRTP)",
RFC 3711, March 2004.
[GDOI] Baugher, M., Weis, B., Hardjono, T., and H. Harney, "The
Group Domain of Interpretation", RFC 3547, July 2003.
[keymgt] Arkko, J., Carrara, E., Lindholm, F., Naslund, M., and K.
Norrman, "Key Management Extensions for Session
Description Protocol (SDP) and Real Time Streaming
Protocol (RTSP)", RFC 4567, July 2006.
[mikey] Arkko, J., Carrara, E., Lindholm, F., Naslund, M., and K.
Norrman, "MIKEY: Multimedia Internet KEYing", RFC 3830,
August 2004.
SDP security descriptions define the keying material for the sending
direction, which is included in the SDP. Thus, the key that is
carried in an SDP message is a decryption key for the receiver of
that SDP message. This is in contrast to the majority of information
included in SDP, which describes information for the receiving (or
receiving and sending) direction. This reversed information
directionality generates some challenges with using the mechanism in
the offer/answer model and in particular with SIP, where early media
and forking require special consideration (as described in Section
7.3). There are however good reasons for why this was done, which
can be summarized as follows:
If we consider the above scenario again, but this time with keying
material in the offer (and answer) being the sending keying
material (as specified by SDP security descriptions), the scenario
instead looks as follows: Bob again chooses SSRC 1, and Bob will
Authors' Addresses
Flemming Andreasen
Cisco Systems, Inc.
499 Thornall Street, 8th Floor
Edison, New Jersey 08837 USA
EMail: [email protected]
Mark Baugher
5510 SW Orchid Street
Portland, Oregon 97219 USA
EMail: [email protected]
Dan Wing
Cisco Systems, Inc.
170 West Tasman Drive
San Jose, CA 95134 USA
EMail: [email protected]
Intellectual Property
The IETF invites any interested party to bring to its attention any
copyrights, patents or patent applications, or other proprietary
rights that may cover technology that may be required to implement
this standard. Please address the information to the IETF at
[email protected].
Acknowledgement