AVT Working Group W. Kim Internet Draft J. Lee Intended status: Informational D. Kim Expires: December 9, 2010 D. Kwon C. Kim NSRI June 9, 2010 The ARIA Algorithm and Its Use with the Secure Real-time Transport Protocol(SRTP) draft-nsri-avt-aria-srtp-00.txt Status of this Memo This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF), its areas, and its working groups. Note that other groups may also distribute working documents as Internet- Drafts. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." The list of current Internet-Drafts can be accessed at http://www.ietf.org/ietf/1id-abstracts.txt The list of Internet-Draft Shadow Directories can be accessed at http://www.ietf.org/shadow.html This Internet-Draft will expire on December 9, 2010. Copyright Notice Copyright (c) 2010 IETF Trust and the persons identified as the document authors. All rights reserved. This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Kim et al. Expires December 9, 2010 [Page 1] Internet-Draft ARIA-SRTP June 9, 2010 Abstract This document describes the use of the ARIA block cipher algorithm in the Secure Real-time Transport Protocol (SRTP) for providing confidentiality for the Real-time Transport Protocol (RTP) traffic and for the control traffic for RTP, the Real-time Transport Control Protocol (RTCP). 1. Introduction This document describes the use of the ARIA [RFC5794] block cipher algorithm in the Secure Real-time Transport Protocol (SRTP) [RFC3711] for providing confidentiality for the Real-time Transport Protocol (RTP) [RFC3550] traffic and for the control traffic for RTP, the Real-time Transport Control Protocol (RTCP) [RFC3550]. 1.1. ARIA ARIA is a general-purpose block cipher algorithm developed by Korean cryptographers in 2003. It is an iterated block cipher with 128-, 192-, and 256-bit keys and encrypts 128-bit blocks in 12, 14, and 16 rounds, depending on the key size. It is secure and suitable for most software and hardware implementations on 32-bit and 8-bit processors. It was established as a Korean standard block cipher algorithm in 2004 [ARIAKS] and has been widely used in Korea, especially for government-to-public services. It was included in PKCS #11 in 2007 [ARIAPKCS]. The algorithm specification and object identifiers are described in [RFC5794]. 1.2. Terminology 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 [RFC2119]. 1.3. Definitions || concatenation XOR exclusive or Kim et al. Expires December 9, 2010 [Page 2] Internet-Draft ARIA-SRTP June 9, 2010 2. Cryptographic Transforms All symmetric block cipher algorithms share common characteristics including mode, key size, weak keys, and block size. The following sections contain descriptions of the relevant characteristics of ARIA. ARIA does not have any restrictions for modes of operation that are used with this block cipher. We define three modes of running ARIA, (1) ARIA in Counter Mode, (2) ARIA in Counter with CBC-MAC (CCM) Mode and (3) ARIA in Galois/Counter Mode (GCM) Mode. 2.1. Counter Section 4.1.1 of [RFC3711] defines AES counter mode encryption, which it refers to as AES-CM. ARIA counter mode is defined in a similar manner, and is denoted as ARIA-CTR. The plaintext inputs to the block cipher are formed as in AES-CM, and the block cipher outputs are processed as in AES-CM. The only difference in the processing is that ARIA-CTR uses ARIA as the underlying encryption primitive. When ARIA-CTR is used, it MUST be used only in conjunction with an authentication function. 2.1.1. Message Authentication/Integrity: HMAC-SHA1 HMAC-SHA1 [RFC2104], as defined in section 4.2.1 of [RFC3711], SHALL be the default message authentication code to be used with ARIA-CTR. The default session authentication key-length SHALL be 160 bits, the default authentication tag length SHALL be 80 bits, and the SRTP_PREFIX_LENGTH SHALL be zero for HMAC-SHA1. For SRTP, smaller values are NOT RECOMMENDED, but MAY be used after careful consideration of the issues in section 7.5 and 9.5 of [RFC3711]. 2.2. Counter with CBC-MAC (CCM) CCM is a generic authenticate-and-encrypt block cipher mode [RFC3610]. In this specification, CCM used with the ARIA block cipher is denoted as ARIA-CCM. Section 3.3 of [RFC3711] defines procedures to construct or to authenticate and decrypt SRTP packets. For ARIA-CCM however, the sender performs Step 7 before Step 5 and the receiver performs the second half of Step 5 (performs verification) after Step 6. This means that authentication is performed on the plaintext rather than the ciphertext. This applies equally to SRTCP All SRTP packets MUST be authenticated and encrypted. Unlike SRTP, SRTCP packet encryption is optional (but authentication is Kim et al. Expires December 9, 2010 [Page 3] Internet-Draft ARIA-SRTP June 9, 2010 mandatory). A sender can select which packets to encrypt, and indicates this choice with a 1-bit encryption flag (located in the leftmost bit of the 32-bit word that contains the SRTCP index). ARIA-CCM has two parameters: M M indicates the size of the authentication tag. In SRTP, a full 80-bit authentication-tag SHOULD be used and implementation of this specification MUST support M values of 10 octets. L L indicates the size of the length field in octets. The number of octets in the nonce MUST be 12, i.e., L is 3. ARIA-CCM has four inputs: Key A single key is used to calculate the authentication tag using CBC-MAC and to perform payload encryption using counter mode. ARIA only supports a key size of 128 bits. Nonce The size of the nonce depends on the value selected for the parameter L. It is 15-L octets. L equals 3 and hence the nonce size equals 12 octets. Plaintext In case of SRTP, the payload of the RTP packet and the RTP padding and RTP pad count field (if the latter two fields are present). In case of SRTCP, when the encryption flag is set to 1, the Encrypted Portion described in Fig.2 of [RFC3711] is treated as plaintext. When the encryption flag is set to 0, the plaintext is zero-length. Additional Authentication Data (AAD) In case of SRTP, the header of the RTP packet including contributing source (CSRC) identifier (if present) and the RTP header extension (if present). In case of SRTCP, when the encryption flag is set to 0, the Authentication Portion described in Fig.2 of [RFC3711] is Kim et al. Expires December 9, 2010 [Page 4] Internet-Draft ARIA-SRTP June 9, 2010 treated as AAD. When the encryption flag is set to 1, the first 8-octets, the encryption flag and SRTCP index are treated as AAD. ARIA-CCM accepts these four inputs and returns a ciphertext field. 2.3. Galois/Counter Mode (GCM) GCM is a block cipher mode of operation providing both confidentiality and data origin authentication [GCM]. GCM used with the ARIA block cipher is denoted as ARIA-GCM. ARIA-GCM has four inputs: a key, a plaintext, a nonce and the additional authenticated data (AAD) all described in section 2.2. The bit length of the tag, denoted t, is 12, and an authentication tag with a length of 12 octets (96 bits) is used. 3. Nonce Format for CCM and GCM 3.1. Nonce for SRTP The nonce for SRTP SHALL be formed in the following way: Nonce = (16 bits of zeroes || SSRC || ROC || SEQ) XOR Salt The 4-octet SSRC and the 2-octet SEQ SHALL be taken from the RTP header. The 4-octet ROC is from the cryptographic context. The 12- octet Salt SHALL be produced by the SRTP Key Derivation Function. 3.2. Nonce for SRTCP The nonce for SRTCP SHALL be formed in the following way: Nonce = (16 bits of zeroes || SSRC || 16 bits of zeroes || SRTCP index) XOR Salt The 4-octet SSRC SHALL be taken from the RTCP header and the 31-bit SRTCP index (packed zero-filled, right justified into a 4-octet field) is from each packet. The 12-octet Salt SHALL be produced by the SRTP Key Derivation Function. 4. Key Derivation: ARIA-CTR PRF Section 4.3.3 of [RFC3711] defines the AES-128 counter mode key derivation function, which it refers to as "AES-CM PRF". The ARIA- Kim et al. Expires December 9, 2010 [Page 5] Internet-Draft ARIA-SRTP June 9, 2010 CTR PRF is defined in a similar manner, but with each invocation of AES replaced with an invocation of ARIA. The currently defined PRF, keyed by the 128-bit master key, has input block size m = 128 and can produce n-bit outputs for n up to 2^23. ARIA-PRF_n(k_master, x) SHALL be ARIA in Counter Mode as described in section 2.1, applied to key k_master, and IV equal to (x*2^16), and with the output keystream truncated to the n first (left-most) bits. 5. Mandatory-to-implement Transforms "Mandatory-to-implement" means conformance to the specification, and that Table 1 does not supersede a similar table in section 5 of [RFC3711]. An RTP implementation that supports ARIA MUST implement the modes listed in Table 1. mandatory-to-implement optional encryption ARIA-CTR ARIA-CCM,ARIA-GCM message integrity HMAC-SHA1 ARIA-CCM,ARIA-GCM key derivation (PRF) ARIA-CTR - Table 1: Mandatory-to-implement and optional transforms in SRTP and SRTCP. 6. Security Considerations At the time of writing this document no security problem has been found on ARIA (see [ARIAEVAL]). The security considerations in [RFC3711] apply to this document as well. See [RFC3610] and [GCM] for security considerations regarding the CCM and GCM modes of operations, respectively. 7. IANA Considerations [RFC4568] defines SRTP "crypto suites". In order to allow SDP to signal the use of the algorithms defined in this document, IANA will register the following crypto suites into the subregistry for SRTP crypto suites under the SRTP transport of the SDP Security Descriptions: srtp-crypto-suite-ext = "ARIA_CTR_128_HMAC_SHA1_80"/ "ARIA_128_CCM_80"/ Kim et al. Expires December 9, 2010 [Page 6] Internet-Draft ARIA-SRTP June 9, 2010 "ARIA_128_GCM_96"/ srtp-crypto-suite-ext 8. References 8.1. Normative References [GCM] Dworkin, M., "NIST Special Publication 800-38D: Recommendation for Block Cipher Modes of Operation: Galois/Counter Mode (GCM) and GMAC", U.S. National Institute of Standards and Technology http://csrc.nist.gov/publications/nistpubs/800-38D/SP- 800-38D.pdf [RFC2104] Krawczyk, H.,Bellare, M. and Canetti, R., "HMAC: keyed Hashing for Message Authentication", RFC 2104, February 1997. [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. [RFC3550] Schulzrinne, H., Casner, S., Frederick, R. and Jacobson, V. "RTP: A Transport Protocol for Real-time Applications", RFC3550, July 2003. [RFC3610] Whiting, D., Housley, R., and N. Ferguson, "Counter with CBC-MAC (CCM)", RFC 3610, September 2003. [RFC3711] Baugher, M., McGrew, D., Naslund, M., Carrara, E., Norrman, K., "The Secure Real-time Transport Protocol (SRTP)", RFC 3711, March 2004. [RFC4568] Andreasen, F., Baugher, M., Wing, D., "Session Description Protocol (SDP) Security Descriptions for Media Streams", RFC 4568, July 2006. [RFC5794] Lee, J., Lee, J., Kim, J., Kwon, D. and Kim, C., "A Description of the ARIA Encryption Algorithm", RFC 5794, March 2010. 8.2. Informative References [ARIAEVAL] Biryukov, A., et al., "Security and Performance Analysis of ARIA", K.U.Leuven (2003), available at http://www.cosic.esat.kuleuven.be/publications/article- 500.pdf. Kim et al. Expires December 9, 2010 [Page 7] Internet-Draft ARIA-SRTP June 9, 2010 [ARIAKS] Korean Agency for Technology and Standards (KATS), "128 bit block encryption algorithm ARIA - Part 1: General", KS X 1213-1:2009, December 2009 (In Korean). [ARIAPKCS] RSA Laboratories, PKCS #11 v2.20 Amendment 3 Revision 1: Additional PKCS #11 Mechanisms, January 2007. APPENDIX A: Test Vectors All Values are in hexadecimal. A.1. ARIA-CTR Test Vectors Session Key: 0c5ffd37a11edc42c325287fc0604f2e Rollover Counter: 00000000 Sequence Number: 315e SSRC: 20e8f5eb Session Salt: cd3a7c42c671e0067a2a2639b43a Initialization Vector: cd3a7c42e69915ed7a2a263985640000 RTP Payload: f57af5fd4ae19562976ec57a5a7ad55a 5af5c5e5c5fdf5c55ad57a4a7272d572 62e9729566ed66e97ac54a4a5a7ad5e1 5ae5fdd5fd5ac5d56ae56ad5c572d54a e54ac55a956afd6aed5a4ac562957a95 16991691d572fd14e97ae962ed7a9f4a 955af572e162f57a956666e17ae1f54a 95f566d54a66e16e4afd6a9f7ae1c5c5 5ae5d56afde916c5e94a6ec56695e14a fde1148416e94ad57ac5146ed59d1cc5 Encrypted RTP Payload: 1bf753f412e6f35058cc398dc851aae3 a6ccdcb463fbed9cfb3de2fb76fdffa9 e481f5efb64c92487f59dabbc7cc72da 092485f3fbad87888820b86037311fa4 4330e18a59a1e1338ba2c21458493a57 463475c54691f91cec785429119e0dfc d9048f90e07fecd50b528e8c62ee6e71 445de5d7f659405135aff3604c2ca4ff 4aaca40809cb9eee42cc4ad232307570 81ca289f2851d3315e9568b501fdce6d Kim et al. Expires December 9, 2010 [Page 8] Internet-Draft ARIA-SRTP June 9, 2010 A.2. ARIA-CCM Test Vectors Key: 974bee725d44fc3992267b284c3c6750 Rollover Counter: 00000000 Sequence Number: 315e SSRC: 20e8f5eb Nonce: 000020e8f5eb00000000315e Payload: f57af5fd4ae19562976ec57a5a7ad55a 5af5c5e5c5fdf5c55ad57a4a7272d572 62e9729566ed66e97ac54a4a5a7ad5e1 5ae5fdd5fd5ac5d56ae56ad5c572d54a e54ac55a956afd6aed5a4ac562957a95 16991691d572fd14e97ae962ed7a9f4a 955af572e162f57a956666e17ae1f54a 95f566d54a66e16e4afd6a9f7ae1c5c5 5ae5d56afde916c5e94a6ec56695e14a fde1148416e94ad57ac5146ed59d1cc5 AAD: 8008315ebf2e6fe020e8f5eb Encrypted RTP Payload: 621e408a2e455505b39f704dcbac4307 daabbd6d670abc4e42f2fd2fca263f09 4f4683e6fb0b10c5093d42b69dce0ba5 46520e7c4400975713f3bde93e13116 0b9cbcd6df78a1502be7c6ea8d395b9e d0078819c3105c0ab92cb67b16ba51bb 1f53508738bf7a37c9a905439b88b7af 9d51a407916fdfea8d43bf253721846d c1671391225fc58d9d0693c8ade6a4ff b034ee6543dd4e651b7a084eae60f855 Authentication Tag: 0ed04a301790ad92955d A.3. ARIA-GCM Test Vectors Key: e91e5e75da65554a48181f3846349562 Rollover Counter: 00000000 Sequence Number: 315e Kim et al. Expires December 9, 2010 [Page 9] Internet-Draft ARIA-SRTP June 9, 2010 SSRC: 20e8f5eb Nonce: 000020e8f5eb00000000315e Payload: f57af5fd4ae19562976ec57a5a7ad55a 5af5c5e5c5fdf5c55ad57a4a7272d572 62e9729566ed66e97ac54a4a5a7ad5e1 5ae5fdd5fd5ac5d56ae56ad5c572d54a e54ac55a956afd6aed5a4ac562957a95 16991691d572fd14e97ae962ed7a9f4a 955af572e162f57a956666e17ae1f54a 95f566d54a66e16e4afd6a9f7ae1c5c5 5ae5d56afde916c5e94a6ec56695e14a fde1148416e94ad57ac5146ed59d1cc5 AAD: 8008315ebf2e6fe020e8f5eb Encrypted RTP Payload: 4d8a9a0675550c704b17d8c9ddc81a5c d6f7da34f2fe1b3db7cb3dfb9697102e a0f3c1fc2dbc873d44bceeae8e444297 4ba21ff6789d3272613fb9631a7cf3f1 4bacbeb421633a90ffbe58c2fa6bdca5 34f10d0de0502ce1d531b6336e588782 78531e5c22bc6c85bbd784d78d9e680a a19031aaf89101d669d7a3965c1f7e16 229d7463e0535f4e253f5d18187d40b8 ae0f564bd970b5e7e2adfb211e89a953 Authentication Tag: 5abace3f37f5a736f4be984b Authors' Addresses Woo-Hwan Kim National Security Research Institute P.O.Box 1, Yuseong, Daejeon, 305-350, Korea Email: whkim5@ensec.re.kr Jungkeun Lee National Security Research Institute P.O.Box 1, Yuseong, Daejeon, 305-350, Korea Email: jklee@ensec.re.kr Kim et al. Expires December 9, 2010 [Page 10] Internet-Draft ARIA-SRTP June 9, 2010 Dong-Chan Kim National Security Research Institute P.O.Box 1, Yuseong, Daejeon, 305-350, Korea Email: dongchan@ensec.re.kr Daesung Kwon National Security Research Institute P.O.Box 1, Yuseong, Daejeon, 305-350, Korea Email: ds_kwon@ensec.re.kr Choonsoo Kim National Security Research Institute P.O.Box 1, Yuseong, Daejeon, 305-350, Korea Email: jbr@ensec.re.kr Kim et al. Expires December 9, 2010 [Page 11]