draft-ietf-avt-srtp-aes-gcm-01.txt   draft-ietf-avt-srtp-aes-gcm-02.txt 
Network Working Group D. McGrew Network Working Group D. McGrew
Internet Draft Cisco Systems, Inc. Internet Draft Cisco Systems, Inc.
Intended Status: Informational January 26, 2011 Intended Status: Informational K.M. Igoe
Expires: July 30, 2011 Expires: May 03, 2012 National Security Agency
October 31, 2011
AES-GCM and AES-CCM Authenticated Encryption in Secure RTP (SRTP) AES-GCM and AES-CCM Authenticated Encryption in Secure RTP (SRTP)
draft-ietf-avt-srtp-aes-gcm-01 draft-ietf-avt-srtp-aes-gcm-02
Abstract
This document defines how AES-GCM, AES-CCM, and other Authenticated
Encryption with Associated Data (AEAD) algorithms, can be used to
provide confidentiality and data authentication mechanisms in the
SRTP protocol.
Status of this Memo Status of this Memo
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted to IETF in full conformance with the
provisions of BCP 78 and BCP 79. provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/. Drafts is at http://datatracker.ietf.org/drafts/current.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on July 16, 2011. This Internet-Draft will expire on May 03, 2012.
Copyright Notice Copyright Notice
Copyright (c) 2011 IETF Trust and the persons identified as the Copyright (c) 2011 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License. described in the Simplified BSD License.
Abstract
This document defines how AES-GCM, AES-CCM, and other Authenticated
Encryption with Associated Data (AEAD) algorithms, can be used to
provide confidentiality and data authentication mechanisms in the
SRTP protocol.
Table of Contents Table of Contents
1. Introduction.....................................................2 1. Introduction.....................................................2
1.1. Conventions Used In This Document...........................3 1.1. Conventions Used In This Document...........................3
1.2. AEAD processing for SRTP....................................4 1.2. AEAD processing for SRTP....................................4
1.2.1. AEAD Authentication versus SRTP Authentication.........5 1.2.1. AEAD versus SRTP/SRTCP Authentication..................5
1.2.2. Values used to form the Initialization Vector (IV).....5 1.2.2. Values used to form the Initialization Vector (IV).....5
1.2.3. SRTP IV formation for AES-GCM and AES-CCM..............6 1.2.3. SRTP IV formation for AES-GCM and AES-CCM..............6
1.2.4. SRTCP IV formation for AES-GCM and AES-CCM.............6 1.2.4. SRTCP IV formation for AES-GCM and AES-CCM.............7
1.2.5. AEAD Processing of SRTP Packets........................7 1.2.5. AEAD Processing of SRTP Packets........................8
1.2.6. AEAD Processing of SRTCP Packets.......................8 1.2.6. AEAD Processing of SRTCP Packets.......................8
1.2.6.1. Encrypted SRTCP packets...........................8 1.2.6.1. Encrypted SRTCP packets...........................9
1.2.6.2. Unencrypted SRTCP packets.........................9 1.2.6.2. Unencrypted SRTCP packets........................10
2. AEAD parameters for SRTP and SRTCP...............................9 2. AEAD parameters for SRTP and SRTCP..............................10
2.1. Generic AEAD Parameter Constraints.........................10 2.1. Generic AEAD Parameter Constraints.........................11
2.2. AES-GCM for SRTP/SRTCP.....................................11 2.2. AES-GCM for SRTP/SRTCP.....................................11
2.3. AES-CCM for SRTP/SRTCP.....................................11 2.3. AES-CCM for SRTP/SRTCP.....................................12
3. Security Considerations.........................................12 2.4. Key Derivation Functions...................................13
4. IANA Considerations.............................................13 3. Security Considerations.........................................13
5. Acknowledgements................................................14 3.1. Header Extensions..........................................13
6. References......................................................14 3.2. Size of the Authentication Tag.............................13
6.1. Normative References.......................................14 4. IANA Considerations.............................................14
6.2. Informative References.....................................14 5. Acknowledgements................................................15
6. References......................................................16
6.1. Normative References.......................................16
6.2. Informative References.....................................17
1. Introduction 1. Introduction
The Secure Real-time Transport Protocol (SRTP) is a profile of the The Secure Real-time Transport Protocol (SRTP) is a profile of the
Real-time Transport Protocol (RTP), which can provide Real-time Transport Protocol (RTP), which can provide
confidentiality, message authentication, and replay protection to the confidentiality, message authentication, and replay protection to the
RTP traffic and to the control traffic for RTP, the Real-time RTP traffic and to the control traffic for RTP, the Real-time
Transport Control Protocol (RTCP). Transport Control Protocol (RTCP).
SRTP/SRTCP assumes that both the sender and recipient have a shared SRTP/SRTCP assumes that both the sender and recipient have a shared
skipping to change at page 4, line 10 skipping to change at page 4, line 13
AEAD. AEAD.
Instantiation Once keys have been established, an instance of Instantiation Once keys have been established, an instance of
the AEAD algorithm is created using the the AEAD algorithm is created using the
appropriate key and salt. In a point-to-point appropriate key and salt. In a point-to-point
scenario, each participant in the SRTP/SRTCP scenario, each participant in the SRTP/SRTCP
session will need four instantiations of the AEAD session will need four instantiations of the AEAD
algorithm; one for inbound SRTP traffic, one for algorithm; one for inbound SRTP traffic, one for
outbound SRTP traffic source, one for inbound outbound SRTP traffic source, one for inbound
SRTCP traffic, and one for outbound SRTCP traffic SRTCP traffic, and one for outbound SRTCP traffic
source. source. See section 1.2 for details on what is
required of each instantiation.
Invocation SRTP/SRTCP data streams are broken into packets. Invocation SRTP/SRTCP data streams are broken into packets.
Each packet is processed by a single invocation of Each packet is processed by a single invocation of
the appropriate instantiation of the AEAD the appropriate instantiation of the AEAD
algorithm. algorithm.
Each AEAD instantiation has its own key, a 48-bit zero-based packet
counter that is incremented after that particular instantiation has
been invoked to process a data packet, and a 32-bit one-based block
counter which is reset to one each time a packet has been processed.
(Note: for processing SRTCP packets, a 32-bit packet counter will
suffice). As we shall see in sections 1.2.3 and 1.2.4, the packet
counter plays a crucial role in the formation of the IV.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in [RFC2119]. document are to be interpreted as described in [RFC2119].
1.2. AEAD processing for SRTP 1.2. AEAD processing for SRTP
We first define how to use a generic AEAD algorithm in SRTP, then we We first define how to use a generic AEAD algorithm in SRTP, then we
describe the specific use of the AES-128-GCM and AES-256-GCM describe the specific use of the AES-128-GCM and AES-256-GCM
algorithms. algorithms.
skipping to change at page 5, line 11 skipping to change at page 5, line 23
SHOULD be omitted. SHOULD be omitted.
Initialization Vector Each SRTP/SRTCP packet has its own 12-octet Initialization Vector Each SRTP/SRTCP packet has its own 12-octet
initialization vector (IV). Construction initialization vector (IV). Construction
of this IV is covered in more detail of this IV is covered in more detail
below. below.
The AEAD encryption algorithm accepts these four inputs and returns a The AEAD encryption algorithm accepts these four inputs and returns a
Ciphertext field. Ciphertext field.
1.2.1. AEAD Authentication versus SRTP Authentication 1.2.1. AEAD versus SRTP/SRTCP Authentication
The reader is reminded that in addition to providing confidentiality The reader is reminded that in addition to providing confidentiality
for the plaintext that is encrypted, an AEAD algorithm also provides for the plaintext that is encrypted, an AEAD algorithm also also
a way to check the data integrity and authenticity of the plaintext provides a mechanism that allows the intended recipient to check the
and associated data. The AEAD integrity check is incorporated into data integrity and authenticity of the plaintext and associated
the Ciphertext field by RFC 5116, thus AEAD does not make use of the data. The AEAD authentication tag is incorporated into the
optional SRTP Authentication Tag field. (Note that this means that Ciphertext field by RFC 5116, thus AEAD does not make use of the
the cipher text will be longer than the plain text by precisely the SRTP/SRTCP Authentication Tag fields defined in RFC 3711. (Note that
length of the AEAD authentication tag.) this means that the cipher text will be longer than the plain text by
precisely the length of the AEAD authentication tag.)
The AEAD message authentication mechanism MUST be the primary message The AEAD message authentication mechanism MUST be the primary message
authentication mechanism for AEAD SRTP. Additional SRTP authentication mechanism for AEAD SRTP/SRTCP. Additional SRTP/SRTCP
authentication mechanisms SHOULD NOT be used with any AEAD algorithm authentication mechanisms SHOULD NOT be used with any AEAD algorithm
and the optional SRTP Authentication Tag SHOULD NOT be present. and the optional SRTP Authentication Tag is NOT RECOMMEDNDED and
SHOULD NOT be present.
Rationale. Some applications use the Authentication Tag as a Rationale. Some applications use the SRTP/SRTCP Authentication
means of conveying additional information, notably [RFC4771]. Tag as a means of conveying additional information, notably
This document retains the Authentication Tag field primarily to [RFC4771]. This document retains the Authentication Tag field
preserve compatibility with these applications. primarily to preserve compatibility with these applications.
1.2.2. Values used to form the Initialization Vector (IV) 1.2.2. Values used to form the Initialization Vector (IV)
The initialization vector for an SRTP packet is formed from the: The initialization vector for an SRTP packet is formed from the:
SSRC The 4-octet Synchronization Source identifier SSRC The 4-octet Synchronization Source identifier
(SSRC), found in the RTP header. (SSRC), found in the RTP header.
Packet Counter Each AEAD instantiation MUST maintain a 6 octet Packet Counter Each AEAD instantiation MUST maintain a 6 octet
zero-based packet counter which is incremented zero-based packet counter which is incremented
after a given instantiation has been invoked to after a given instantiation has been invoked to
process a packet of data. The packet counter is process a packet of data. The packet counter is
closely related to the invocation field mixed with the salt and SSRC to populate the
discussed in NIST Special Publication 800 38-D invocation field discussed in NIST Special
[GCM], "Recommendation for Block Cipher Modes of Publication 800 38-D [GCM], "Recommendation for
Operation: Galois/Counter Mode (GCM) and GMAC". Block Cipher Modes of Operation: Galois/Counter
As we shall see below, the packet counter is Mode (GCM) and GMAC". As we shall see below,
used to insure each packet gets a unique the packet counter is used to insure each packet
initialization vector. gets a unique initialization vector.
Sequence Number The 2-octet RTP Sequence Number (SEQ), found in Sequence Number The 2-octet RTP Sequence Number (SEQ), found in
the RTP header. SEQ is just the two least the RTP header. SEQ is just the two least
significant bytes of the packet counter. significant bytes of the packet counter.
Rollover Counter A 4-octet Rollover Counter (ROC), maintained by Rollover Counter A 4-octet Rollover Counter (ROC), maintained by
both sides of the link. The ROC is just the 4 both sides of the link. The ROC is just the 4
most significant octets of the packet counter. most significant octets of the packet counter.
SALT A 12-octet SRTP session encryption salt produced SALT A 12-octet SRTP session encryption salt produced
by the SRTP Key Derivation Function (KDF). by the SRTP Key Derivation Function (KDF) (see
section 2.4).
1.2.3. SRTP IV formation for AES-GCM and AES-CCM 1.2.3. SRTP IV formation for AES-GCM and AES-CCM
AES-GCM and AES-CCM SRTP use a 12 byte inititialition vector which is AES-GCM and AES-CCM SRTP use a 12 byte initialization vector which is
formed as follows. A 12-octet string is formed by concatenating a formed as follows. A 12-octet string is formed by concatenating
2-octets of zeroes, the 4-octet SSRC, and the the 6-byte invocation 2-octets of zeroes, the 4-octet SSRC, and the 6-octet invocation
counter. The resulting string is bitwise exclusive-ored with the counter. The resulting string is bitwise exclusive-ored with the
12-octet salt to form the 12-octet IV 12-octet salt to form the 12-octet IV
0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 1 1
0 1 2 3 4 5 6 7 8 9 0 1 0 1 2 3 4 5 6 7 8 9 0 1
+--+--+--+--+--+--+--+--+--+--+--+--+ +--+--+--+--+--+--+--+--+--+--+--+--+
|00|00| SSRC | Packet_Counter |---+ |00|00| SSRC | Packet_Counter |---+
+--+--+--+--+--+--+--+--+--+--+--+--+ | +--+--+--+--+--+--+--+--+--+--+--+--+ |
| |
+--+--+--+--+--+--+--+--+--+--+--+--+ | +--+--+--+--+--+--+--+--+--+--+--+--+ |
| Encryption Salt |->(+) | Encryption Salt |->(+)
+--+--+--+--+--+--+--+--+--+--+--+--+ | +--+--+--+--+--+--+--+--+--+--+--+--+ |
| |
+--+--+--+--+--+--+--+--+--+--+--+--+ | +--+--+--+--+--+--+--+--+--+--+--+--+ |
| Initialization Vector |<--+ | Initialization Vector |<--+
+--+--+--+--+--+--+--+--+--+--+--+--+ +--+--+--+--+--+--+--+--+--+--+--+--+
Figure 1: AES-GCM and AES-CCM SRTP Figure 1: AES-GCM and AES-CCM SRTP
Initialization Vector formation. Initialization Vector formation.
Using the terminology of section 8.2.1. of [GCM], the first six Using the terminology of section 8.2.1. of [GCM], the first six
octets of the IV are the fixed field and the last six bytes are the octets of the IV are the fixed field and the last six bytes are the
invocation field. invocation field.
1.2.4. SRTCP IV formation for AES-GCM and AES-CCM 1.2.4. SRTCP IV formation for AES-GCM and AES-CCM
The initialization vector for an SRTCP packet is formed from the The initialization vector for an SRTCP packet is formed from the
4-octet Synchronization Source identifier (SSRC), 31-bit SRTCP Index 4-octet Synchronization Source identifier (SSRC), 31-bit SRTCP Index
(packed zero-filled, right justified into a 4-octet field), and a (packed zero-filled, right justified into a 4-octet field), and a
12-octet SRTP session encryption salt produced by the SRTP Key 12-octet SRTCP session encryption salt produced by the SRTP Key
Derivation Function (KDF) as described in [RFC3711]. (The 31-bit Derivation Function (KDF) (see section 2.4). (The 31-bit SRTCP index
SRTCP index serves as the invocation counter.) First a 12-octet serves as the invocation counter.) First a 12-octet string is formed
string is formed by concatenating in order 2-octets of zeroes, the by concatenating in order 2-octets of zeroes, the 4-octet SSRC, 2
4-octet SSRC, 2 more zero octets, and the 4-octet SRTCP index. The more zero octets, and the 4-octet SRTCP index. The resulting
resulting 12-octet string is bitwise exclusive-ored into salt; the 12-octet string is bitwise exclusive-ored into salt; the output of
output of that process is the IV. The process is illustrated in that process is the IV. The process is illustrated in Figure 3. The
Figure 3. The IV is always exactly 12 octets in length. IV is always exactly 12 octets in length.
0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 1 1
0 1 2 3 4 5 6 7 8 9 0 1 0 1 2 3 4 5 6 7 8 9 0 1
+--+--+--+--+--+--+--+--+--+--+--+--+ +--+--+--+--+--+--+--+--+--+--+--+--+
|00|00| SSRC |00|00|SRTCP Index|---+ |00|00| SSRC |00|00|SRTCP Index|---+
+--+--+--+--+--+--+--+--+--+--+--+--+ | +--+--+--+--+--+--+--+--+--+--+--+--+ |
| |
+--+--+--+--+--+--+--+--+--+--+--+--+ | +--+--+--+--+--+--+--+--+--+--+--+--+ |
| Encryption Salt |->(+) | Encryption Salt |->(+)
+--+--+--+--+--+--+--+--+--+--+--+--+ | +--+--+--+--+--+--+--+--+--+--+--+--+ |
| |
+--+--+--+--+--+--+--+--+--+--+--+--+ | +--+--+--+--+--+--+--+--+--+--+--+--+ |
| Initialization Vector |<--+ | Initialization Vector |<--+
+--+--+--+--+--+--+--+--+--+--+--+--+ +--+--+--+--+--+--+--+--+--+--+--+--+
Figure 2: SRTCP Initialization Vector formation. Figure 2: SRTCP Initialization Vector formation.
Using the terminology of section 8.2.1. of [GCM], the first eight Using the terminology of section 8.2.1. of [GCM], the first eight
octets of the IV are the fixed field and the last four bytes are the octets of the IV are the fixed field and the last four bytes are the
invocation field. invocation field.
1.2.5. AEAD Processing of SRTP Packets 1.2.5. AEAD Processing of SRTP Packets
All SRTP packets MUST be authenticated and encrypted. Figure 3 below All SRTP packets MUST be authenticated and encrypted. Figure 3 below
shows which fields of AEAD SRTP packet are to be treated as shows which fields of AEAD SRTP packet are to be treated as plaintext
plaintext, which are to be treated as additional authenticated data. and which are to be treated as additional authenticated data.
0 1 2 3 0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
A |V=2|P|X| CC |M| Packet Type | sequence number | A |V=2|P|X| CC |M| Packet Type | sequence number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
A | timestamp | A | timestamp |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
A | synchronization source (SSRC) identifier | A | synchronization source (SSRC) identifier |
+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
skipping to change at page 8, line 21 skipping to change at page 9, line 8
All SRTCP packets MUST be authenticated, but unlike SRTP, SRTCP All SRTCP packets MUST be authenticated, but unlike SRTP, SRTCP
packet encryption is optional. A sender can select which packets to packet encryption is optional. A sender can select which packets to
encrypt, and indicates this choice with a 1-bit encryption flag encrypt, and indicates this choice with a 1-bit encryption flag
(located in the leftmost bit of the 32-bit word that contains the (located in the leftmost bit of the 32-bit word that contains the
SRTCP index) SRTCP index)
1.2.6.1. Encrypted SRTCP packets 1.2.6.1. Encrypted SRTCP packets
When the encryption flag is set to 1, the first 8-octets, the When the encryption flag is set to 1, the first 8-octets, the
encryption flag and SRTCP index are treated as AAD and eight octets encrpytion flag and 32-bit SRTCP index MUST be treated as AAD. The
and the encryption flag are treated as plaintext. Figure 4 below remaing data MUST be treated as plaintext, and hence is to be both
shows how fields of an RTCP packet are to be treated when the encrypted and AEAD authenticates, save for the optional STCP MKI
encryption flag is set to 1. index and optional SRTCP authentication tag, which are MUST be
neither encrypted nor AEAD authenticated. Figure 4 below shows how
fields of an RTCP packet are to be treated when the encryption flag
is set to 1.
0 1 2 3 0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
A |V=2|P| RC | Packet Type | length | A |V=2|P| RC | Packet Type | length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
A | synchronization source (SSRC) of Sender | A | synchronization source (SSRC) of Sender |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
P | sender info | P | sender info |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
skipping to change at page 11, line 25 skipping to change at page 12, line 19
Name Key Size Auth. Tag Size Reference Name Key Size Auth. Tag Size Reference
================================================================ ================================================================
AEAD_AES_128_GCM 16 octets 16 octets [RFC5116] AEAD_AES_128_GCM 16 octets 16 octets [RFC5116]
AEAD_AES_256_GCM 32 octets 16 octets [RFC5116] AEAD_AES_256_GCM 32 octets 16 octets [RFC5116]
AEAD_AES_128_GCM_8 16 octets 8 octets [RFC5282] AEAD_AES_128_GCM_8 16 octets 8 octets [RFC5282]
AEAD_AES_256_GCM_8 32 octets 8 octets [RFC5282] AEAD_AES_256_GCM_8 32 octets 8 octets [RFC5282]
AEAD_AES_128_GCM_12 16 octets 12 octets [RFC5282] AEAD_AES_128_GCM_12 16 octets 12 octets [RFC5282]
AEAD_AES_256_GCM_12 32 octets 12 octets [RFC5282] AEAD_AES_256_GCM_12 32 octets 12 octets [RFC5282]
Any implementation of AES-GCM SRTP MUST support both Any implementation of AES-GCM SRTP MUST support both
AEAD-AES-128-GCM-8 and AEAD-AES-256-GCM-8, ant it MAY support the AEAD_AES_128_GCM_8 and AEAD_AES_256_GCM_8, and it MAY support the
four other variants shown in the table. four other variants shown in the table.
In addition to the invocation counter used in the formation of IVs, In addition to the invocation counter used in the formation of IVs,
each instantiation of AES-GCM has a block counter which is each instantiation of AES-GCM has a block counter which is
incremented each time AES is called to produce a 16-octet output incremented each time AES is called to produce a 16-octet output
block. The block counter is reset to "1" each time AES-GCM is block. The block counter is reset to "1" each time AES-GCM is
invoked. invoked.
1 1 1 1 1 1
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
----+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
| | salt | | salt xor | block |
| salt | xor | salt | invocation | counter |
| | ssrc | | counter | |
----+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
Figure 5: AES Inputs for Counter Mode Encryption in GCM
2.3. AES-CCM for SRTP/SRTCP 2.3. AES-CCM for SRTP/SRTCP
AES-CCM is another family of AEAD algorithms built around the AES AES-CCM is another family of AEAD algorithms built around the AES
block cipher algorithm. AES-GCM uses AES counter mode for encryption block cipher algorithm. AES-GCM uses AES counter mode for encryption
and AES Cipher Block Chaining Message Authentication Code (CBC MAC) and AES Cipher Block Chaining Message Authentication Code (CBC MAC)
for authentication. A detailed description of the AES-CCM family can for authentication. A detailed description of the AES-CCM family can
be found in [RFC5116]. The following members of the AES-CCM family be found in [RFC5116]. The following members of the AES-CCM family
may be used with SRTP/SRTCP: may be used with SRTP/SRTCP:
Table 2: AES-CCM algorithms for SRTP/SRTCP Table 2: AES-CCM algorithms for SRTP/SRTCP
Name Key Size Auth. Tag Size Reference Name Key Size Auth. Tag Size Reference
================================================================ ================================================================
AEAD_AES_128_CCM 16 octets 16 octets [RFC5116] AEAD_AES_128_CCM 16 octets 16 octets [RFC5116]
AEAD_AES_256_CCM 32 octets 16 octets [RFC5116] AEAD_AES_256_CCM 32 octets 16 octets [RFC5116]
Any implementation of AES-CCM SRTP/SRTCP MUST support both Any implementation of AES-CCM SRTP/SRTCP MUST support both
AEAD-AES-128-CCM and AEAD-AES-256-CCM. AEAD_AES_128_CC and AEAD_AES_256_CCM.
In addition to the invocation counter used in the formation of IVs, In addition to the invocation counter used in the formation of
each instantiation of AES-CCM has a block counter which is IVs, each instantiation of AES-CCM has a block counter which is
incremented each time AES is called to produce a 16-octet output incremented each time AES is called to produce a 16-octet output
block. The block counter is reset to "0" each time AES-CCM is block. The block counter is reset to "0" each time AES-CCM is
invoked. invoked.
AES-CCM uses a flag octet that conveys information about the length AES-CCM uses a flag octet that conveys information about the length
of the authentication tag, length of the block counter, and presence of the authentication tag, length of the block counter, and presence
of additional authenticated data. For AES-CCM in SRTP/SRTCP, the of additional authenticated data. For AES-CCM in SRTP/SRTCP, the
flag octet has the hex value 5A if an 8-octet authentication tag is flag octet has the hex value 5A if an 8-octet authentication tag is
used, 6A if a 12-octet authentication tag is used, and 7A if a used, 6A if a 12-octet authentication tag is used, and 7A if a
16-octet authentication tag is used. The flag octet is one of the 16-octet authentication tag is used. The flag octet is one of the
inputs to AES during the counter mode encryption of the plaintext. inputs to AES during the counter mode encryption of the plaintext.
2.4. Key Derivation Functions
A Key Derivation Function (KDF) is used to derive all of the required
encryption and authentication keys from a secret value shared by the
two endpoints. Both the AEAD_AES_128_GCM algoritms and the
AEAD_AES_128_CCM algorithms MUST use the (128-bit) AES_CM_PRF Key
Derivation Function described in [RFC3711]. Both the
AEAD_AES_256_GCM algorithms and the AEAD_AES_128_CCM algorithms MUST
use the AES_256_CM_PRF Key Derivation Function described in [RFC
6188].
3. Security Considerations 3. Security Considerations
3.1. Header Extensions
As described in section 1.2.5, this document requires all header
extensions to be treated as Additional Authenticated Data. RFC XXXX
describes a separate mechanism for the encryption and integrity
tagging of these header extensions. Middle boxes are often used to
process these headers extensions independently of the processing done
at the SRTP/SRTCP endpoint. The reader is cautioned to ensure the
level of security provided at these middle boxes is appropriate to
the level of risk posed by a compromise of these fields. Similarly,
the mechanism used to securely deliver the header encryption and
integrity keys to the middle boxes must be robust enough to
adequately authenticate and protect these keys.
3.2. Size of the Authentication Tag
We require that the AEAD authentication tag must be at least 8 We require that the AEAD authentication tag must be at least 8
octets, significantly reducing the probability of an adversary octets, significantly reducing the probability of an adversary
successfully introducing fraudulent data. The goal of an successfully introducing fraudulent data. The goal of an
authentication tag is to minimize the probability of a successful authentication tag is to minimize the probability of a successful
forgery occurring anywhere in the network we are attempting to forgery occurring anywhere in the network we are attempting to
defend. There are three relevant factors: how low we wish the defend. There are three relevant factors: how low we wish the
probability of successful forgery to be (prob_success), how many probability of successful forgery to be (prob_success), how many
attempts the adversary can make (N_tries) and the size of the attempts the adversary can make (N_tries) and the size of the
authentication tag in bits (N_tag_bits). Then authentication tag in bits (N_tag_bits). Then
prob_success < expected number of successes prob_success < expected number of successes
= N_tries * 2^-N_tag_bits. = N_tries * 2^-N_tag_bits.
The table below summarizes the relationship between the Suppose an adversary wishes to introduce a forged or altered packet
authentication tag size, the probability of success, and the maximum into a target network by randomly selecting an authentication value
numbers of forgery attempts that can be permitted on our network. until by chance they hit a valid authentication tag. The table below
summarizes the relationship between the number of forged packets the
adversary has tried, the size of the authentication tag, and the
probability of a compromise occurring (i.e. at least one of the
attempted forgeries having a valid authentication tag). The reader
is reminded that the forgery attempts can be made over the entire
network, not just a single link, and that frequently changing the key
does not decrease the probability of a compromise occurring.
|==================+========================================| |==================+========================================|
| Authentication | Probability any Successful Forgeries | | Authentication | Probability of a Compromise Occurring |
| Tag Size |-------------+-------------+------------| | Tag Size |------------+-------------+-------------|
| (octets) | 2^-10 | 2^-20 | 2^-30 | | (octets) | 2^-30 | 2^-20 | 2^-10 |
|==================+=============+=============+============|
| 4 | 2^22 tries | 2^12 tries | 2^2 tries |
|==================+=============+=============+============|
| 8 | 2^54 tries | 2^44 tries | 2^34 tries |
|==================+=============+=============+============|
| 12 | 2^86 tries | 2^76 tries | 2^66 tries |
|==================+=============+=============+============|
| 16 | 2^118 tries | 2^108 tries | 2^98 tries |
|==================+=============+=============+============| |==================+=============+=============+============|
| 4 | 2^2 tries | 2^12 tries | 2^22 tries |
|==================+============+=============+=============|
| 8 | 2^34 tries | 2^44 tries | 2^54 tries |
|==================+============+=============+=============|
| 12 | 2^66 tries | 2^76 tries | 2^86 tries |
|==================+============+=============+=============|
| 16 | 2^98 tries | 2^108 tries | 2^118 tries |
|==================+============+=============+=============|
Table 1: Maximum allowable number of forgery attempts for Table 1: Probability of a compromise occurring for a given
a given tag size and probability of success. number of forgery attempts and tag size.
4. IANA Considerations 4. IANA Considerations
RFC 4568 defines SRTP "crypto suites"; a crypto suite corresponds to RFC 4568 defines SRTP "crypto suites"; a crypto suite corresponds to
a particular AEAD algorithm in SRTP. In order to allow SDP to signal a particular AEAD algorithm in SRTP. In order to allow SDP to signal
the use of the algorithms defined in this document, IANA will the use of the algorithms defined in this document, IANA will
register the following crypto suites into the subregistry for SRTP register the following crypto suites into the subregistry for SRTP
crypto suites under the SRTP transport of the SDP Security crypto suites under the SRTP transport of the SDP Security
Descriptions: Descriptions:
srtp-crypto-suite-ext = "AEAD_AES_128_GCM" / srtp-crypto-suite-ext = "AEAD_AES_128_GCM" /
"AEAD_AES_256_GCM" / "AEAD_AES_256_GCM" /
"AEAD_AES_128_GCM_8" / "AEAD_AES_128_GCM_8" /
"AEAD_AES_256_GCM_8" / "AEAD_AES_256_GCM_8" /
"AEAD_AES_128_GCM_12" / "AEAD_AES_128_GCM_12" /
"AEAD_AES_256_GCM_12" / "AEAD_AES_256_GCM_12" /
"AEAD_AES_128_CCM" / "AEAD_AES_128_CCM" /
"AEAD_AES_256_CCM" / "AEAD_AES_256_CCM" /
srtp-crypto-suite-ext srtp-crypto-suite-ext
DTLS-SRTP [RFC5764] defines a DTLS-SRTP "SRTP Protection Profile", DTLS-SRTR [RFC5764] defines a DTLS-SRTP "SRTP Protection Profile"; it
which corresponds to the use of an AEAD algorithm in SRTP. In also corresponds to the use of an AEAD algorithm in SRTP. In order
order to allow the use of the algorithms defined in this document to allow the use of the algorithms defined in this document in
in DTLS-SRTP, IANA will also register the following SRTP Protection DTLS-SRTP, IANA will also register the following SRTP Protection
Profiles: Profiles:
SRTP_AEAD_AES_128_GCM SRTP_AEAD_AES_128_GCM
SRTP_AEAD_AES_256_GCM SRTP_AEAD_AES_256_GCM
SRTP_AEAD_AES_128_GCM_8 SRTP_AEAD_AES_128_GCM_8
SRTP_AEAD_AES_256_GCM_8 SRTP_AEAD_AES_256_GCM_8
SRTP_AEAD_AES_128_GCM_12 SRTP_AEAD_AES_128_GCM_12
SRTP_AEAD_AES_256_GCM_12 SRTP_AEAD_AES_256_GCM_12
SRTP_AEAD_AES_128_CCM SRTP_AEAD_AES_128_CCM
SRTP_AEAD_AES_256_CCM SRTP_AEAD_AES_256_CCM
5. Acknowledgements 5. Acknowledgements
The author would like to thank Kevin Igoe and many other reviewers The authors would like to thank Michael Peck, Qin Wu, and many other
who provided valuable comments on earlier drafts of this document. reviewers who provided valuable comments on earlier drafts of this
document.
6. References 6. References
6.1. Normative References 6.1. Normative References
[CCM] Dworkin, M., "NIST Special Publication 800-38C: The CCM
Mode for Authentication and Confidentiality", U.S.
National Institute of Standards and Technology http://
csrc.nist.gov/publications/nistpubs/800-38C/SP800-38C.pdf.
[GCM] Dworkin, M., "NIST Special Publication 800-38D: [GCM] Dworkin, M., "NIST Special Publication 800-38D:
Recommendation for Block Cipher Modes of Operation: Recommendation for Block Cipher Modes of Operation:
Galois/Counter Mode (GCM) and GMAC.", U.S. National Galois/Counter Mode (GCM) and GMAC.", U.S. National
Institute of Standards and Technology http:// Institute of Standards and Technology http://
csrc.nist.gov/publications/nistpubs/800-38D/SP800-38D.pdf. csrc.nist.gov/publications/nistpubs/800-38D/SP800-38D.pdf.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, March 1997. Requirement Levels", BCP 14, RFC 2119, March 1997.
[RFC3711] Baugher, M., McGrew, D., Naslund, M., Carrara, E., and [RFC3711] Baugher, M., McGrew, D., Naslund, M., Carrara, E., and
K. Norrman, "The Secure Real-time Transport Protocol K. Norrman, "The Secure Real-time Transport Protocol
(SRTP)", RFC 3711, March 2004. (SRTP)", RFC 3711, March 2004.
[RFC5116] McGrew, D., "An Interface and Algorithms for [RFC5116] McGrew, D., "An Interface and Algorithms for
Authenticated Encryption with Associated Data", RFC 5116, Authenticated Encryption with Associated Data", RFC 5116,
January 2008. January 2008.
[RFC5282] McGrew, D. and D. Black, "Using Authenticated Encryption [RFC5282] McGrew, D. and D. Black, "Using Authenticated Encryption
Algorithms with the Encrypted Payload of the Internet Key Exchange Algorithms with the Encrypted Payload of the Internet Key
version 2 (IKEv2) Protocol", RFC 5282, August 2008. Exchange version 2 (IKEv2) Protocol", RFC 5282, August 2008.
[RFC5764] McGrew, D. and E. Rescorla, "Datagram Transport Layer [RFC5764] McGrew, D. and E. Rescorla, "Datagram Transport Layer
Security (DTLS) Extension to Establish Keys for the Secure Security (DTLS) Extension to Establish Keys for the Secure
Real-time Transport Protocol (SRTP)", RFC 5764, May 2010. Real-time Transport Protocol (SRTP)", RFC 5764, May 2010.
[RFC6811] McGrew,D.,"The Use of AES-192 and AES-256 in Secure RTP"
RFC 6811, March 2011
[RFCxxx] Lennox, J., "Encryption of Header Extensions in the Secure
Real-Time Transport Protocol (SRTP)", RFC xxxx, Nov,2011
6.2. Informative References 6.2. Informative References
[BN00] Bellare, M. and C. Namprempre, "Authenticated encryption: [BN00] Bellare, M. and C. Namprempre, "Authenticated encryption:
Relations among notions and analysis of the generic Relations among notions and analysis of the generic
composition paradigm", Proceedings of ASIACRYPT 2000, composition paradigm", Proceedings of ASIACRYPT 2000,
Springer-Verlag, LNCS 1976, pp. 531-545 http:// Springer-Verlag, LNCS 1976, pp. 531-545 http://
www-cse.ucsd.edu/users/mihir/papers/oem.html. www-cse.ucsd.edu/users/mihir/papers/oem.html.
[BOYD] Boyd, C. and A. Mathuria, "Protocols for Authentication
and Key Establishment", Springer, 2003 .
[CMAC] "NIST Special Publication 800-38B", http://csrc.nist.gov/
CryptoToolkit/modes/800-38_Series_Publications/
SP800-38B.pdf.
[EEM04] Bellare, M., Namprempre, C., and T. Kohno, "Breaking and
provably repairing the SSH authenticated encryption
scheme: A case study of the Encode-then-Encrypt-and-MAC
paradigm", ACM Transactions on Information and System Secu
rity, http://www-cse.ucsd.edu/users/tkohno/papers/
TISSEC04/.
[GR05] Garfinkel, T. and M. Rosenblum, "When Virtual is Harder
than Real: Security Challenges in Virtual Machine Based
Computing Environments", Proceedings of the 10th Workshop
on Hot Topics in Operating Systems http://
www.stanford.edu/~talg/papers/HOTOS05/
virtual-harder-hotos05.pdf.
[J02] Jonsson, J., "On the Security of CTR + CBC-MAC",
Proceedings of the 9th Annual Workshop on Selected Areas
on Cryptography, http://csrc.nist.gov/CryptoToolkit/modes/
proposedmodes/ccm/ccm-ad1.pdf, 2002.
[MODES] Dworkin, M., "NIST Special Publication 800-38:
Recommendation for Block Cipher Modes of Operation", U.S.
National Institute of Standards and Technology http://
csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf.
[MV04] McGrew, D. and J. Viega, "The Security and Performance of
the Galois/Counter Mode (GCM)", Proceedings of INDOCRYPT
'04, http://eprint.iacr.org/2004/193, December 2004.
[R02] Rogaway, P., "Authenticated encryption with Associated- [R02] Rogaway, P., "Authenticated encryption with Associated-
Data", ACM Conference on Computer and Communication Data", ACM Conference on Computer and Communication
Security (CCS'02), pp. 98-107, ACM Press, Security (CCS'02), pp. 98-107, ACM Press,
2002. http://www.cs.ucdavis.edu/~rogaway/papers/ad.html. 2002. http://www.cs.ucdavis.edu/~rogaway/papers/ad.html.
[RFC2104] Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed-
Hashing for Message Authentication", RFC 2104,
February 1997.
[RFC4086] Eastlake, D., Schiller, J., and S. Crocker, "Randomness
Requirements for Security", BCP 106, RFC 4086, June 2005.
[RFC4106] Viega, J. and D. McGrew, "The Use of Galois/Counter Mode
(GCM) in IPsec Encapsulating Security Payload (ESP)",
RFC 4106, June 2005.
[RFC4107] Bellovin, S. and R. Housley, "Guidelines for Cryptographic
Key Management", BCP 107, RFC 4107, June 2005.
[RFC4303] Kent, S., "IP Encapsulating Security Payload (ESP)",
RFC 4303, December 2005.
[RFC4309] Housley, R., "Using Advanced Encryption Standard (AES) CCM
Mode with IPsec Encapsulating Security Payload (ESP)",
RFC 4309, December 2005.
[RFC4771] Lehtovirta, V., Naslund, M., and K. Norrman, "Integrity [RFC4771] Lehtovirta, V., Naslund, M., and K. Norrman, "Integrity
Transform Carrying Roll-Over Counter for the Secure Real- Transform Carrying Roll-Over Counter for the Secure Real-
time Transport Protocol (SRTP)", RFC 4771, January 2007. time Transport Protocol (SRTP)", RFC 4771, January 2007.
Author's Address Author's Address
David A. McGrew David A. McGrew
Cisco Systems, Inc. Cisco Systems, Inc.
510 McCarthy Blvd. 510 McCarthy Blvd.
Milpitas, CA 95035 Milpitas, CA 95035
US US
Phone: (408) 525 8651 Phone: (408) 525 8651
Email: mcgrew@cisco.com Email: mcgrew@cisco.com
URI: http://www.mindspring.com/~dmcgrew/dam.htm URI: http://www.mindspring.com/~dmcgrew/dam.htm
Kevin M. Igoe
NSA/CSS Commercial Solutions Center
National Security Agency
EMail: kmigoe@nsa.gov
Acknowledgement Acknowledgement
Funding for the RFC Editor function is provided by the IETF Funding for the RFC Editor function is provided by the IETF
Administrative Support Activity (IASA). Administrative Support Activity (IASA).
 End of changes. 46 change blocks. 
104 lines changed or deleted 240 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/