idnits 2.17.1 draft-ietf-ipsecme-implicit-iv-07.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (April 6, 2019) is 1846 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Outdated reference: A later version (-16) exists of draft-yeung-g-ikev2-15 Summary: 0 errors (**), 0 flaws (~~), 2 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 IPSECME D. Migault 3 Internet-Draft Ericsson 4 Intended status: Standards Track T. Guggemos 5 Expires: October 8, 2019 LMU Munich 6 Y. Nir 7 Dell EMC 8 April 6, 2019 10 Implicit IV for Counter-based Ciphers in Encapsulating Security Payload 11 (ESP) 12 draft-ietf-ipsecme-implicit-iv-07 14 Abstract 16 Encapsulating Security Payload (ESP) sends an initialization vector 17 (IV) or nonce in each packet. The size of IV depends on the applied 18 transform, being usually 8 or 16 octets for the transforms defined by 19 the time this document is written. Some algorithms such as AES-GCM, 20 AES-CCM, AES-CTR and ChaCha20-Poly1305 require a unique nonce but do 21 not require an unpredictable nonce. When using such algorithms the 22 packet counter value can be used to generate a nonce. This avoids 23 sending the nonce itself, and saves in the case of AES-GCM, AES-CCM, 24 AES-CTR and ChaCha20-Poly1305 8 octets per packet. This document 25 describes how to do this. 27 Status of This Memo 29 This Internet-Draft is submitted in full conformance with the 30 provisions of BCP 78 and BCP 79. 32 Internet-Drafts are working documents of the Internet Engineering 33 Task Force (IETF). Note that other groups may also distribute 34 working documents as Internet-Drafts. The list of current Internet- 35 Drafts is at https://datatracker.ietf.org/drafts/current/. 37 Internet-Drafts are draft documents valid for a maximum of six months 38 and may be updated, replaced, or obsoleted by other documents at any 39 time. It is inappropriate to use Internet-Drafts as reference 40 material or to cite them other than as "work in progress." 42 This Internet-Draft will expire on October 8, 2019. 44 Copyright Notice 46 Copyright (c) 2019 IETF Trust and the persons identified as the 47 document authors. All rights reserved. 49 This document is subject to BCP 78 and the IETF Trust's Legal 50 Provisions Relating to IETF Documents 51 (https://trustee.ietf.org/license-info) in effect on the date of 52 publication of this document. Please review these documents 53 carefully, as they describe your rights and restrictions with respect 54 to this document. Code Components extracted from this document must 55 include Simplified BSD License text as described in Section 4.e of 56 the Trust Legal Provisions and are provided without warranty as 57 described in the Simplified BSD License. 59 Table of Contents 61 1. Requirements notation . . . . . . . . . . . . . . . . . . . . 2 62 2. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 63 3. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3 64 4. Implicit IV . . . . . . . . . . . . . . . . . . . . . . . . . 3 65 5. Initiator Behavior . . . . . . . . . . . . . . . . . . . . . 4 66 6. Responder Behavior . . . . . . . . . . . . . . . . . . . . . 4 67 7. Security Consideration . . . . . . . . . . . . . . . . . . . 4 68 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 5 69 9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 5 70 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 5 71 10.1. Normative References . . . . . . . . . . . . . . . . . . 6 72 10.2. Informational References . . . . . . . . . . . . . . . . 7 73 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 7 75 1. Requirements notation 77 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 78 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 79 document are to be interpreted as described in [RFC2119]. 81 2. Introduction 83 Counter-based AES modes of operation such as AES-CTR ([RFC3686]), 84 AES-CCM ([RFC4309]), and AES-GCM ([RFC4106]) require the 85 specification of an nonce for each ESP packet. The same applies for 86 ChaCha20-Poly1305 ([RFC7634]). Currently this nonce is sent in each 87 ESP packet ([RFC4303]). This practice is designated in this document 88 as "explicit nonce". 90 In some context, such as IoT, it may be preferable to avoid carrying 91 the extra bytes associated to the IV and instead generate it locally 92 on each peer. The local generation of the nonce is designated in 93 this document as "implicit IV". 95 The size of this nonce depends on the specific algorithm, but all of 96 the algorithms mentioned above take an 8-octet nonce. 98 This document defines how to compute the nonce locally when it is 99 implicit. It also specifies how peers agree with the Internet Key 100 Exchange version 2 (IKEv2 - [RFC7296]) on using an implicit IV versus 101 an explicit IV. 103 This document limits its scope to the algorithms mentioned above. 104 Other algorithms with similar properties may later be defined to use 105 this extension. 107 This document does not consider AES-CBC ([RFC3602]) as AES-CBC 108 requires the IV to be unpredictable. Deriving it directly from the 109 packet counter as described below is insecure as mentioned in 110 Security Consideration of [RFC3602] and has led to real world chosen 111 plain-text attack such as BEAST [BEAST]. 113 3. Terminology 115 o IoT: Internet of Things. 117 o IV: Initialization Vector. 119 o IIV: Implicit Initialization Vector. 121 o Nonce: a fixed-size octet string used only once. This is similar 122 to IV, except that in common usage there is no implication of non- 123 predictability. 125 4. Implicit IV 127 With the algorithms listed in Section 2, the 8 byte nonce MUST NOT 128 repeat. The binding between a ESP packet and its nonce is provided 129 using the Sequence Number or the Extended Sequence Number. Figure 1 130 and Figure 2 represent the IV with a regular 4-byte Sequence Number 131 and with an 8-byte Extended Sequence Number respectively. 133 0 1 2 3 134 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 135 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 136 | Zero | 137 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 138 | Sequence Number | 139 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 141 Figure 1: Implicit IV with a 4 byte Sequence Number 143 o Sequence Number: the 4 byte Sequence Number carried in the ESP 144 packet. 146 o Zero: a 4 byte array with all bits set to zero. 148 0 1 2 3 149 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 150 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 151 | Extended | 152 | Sequence Number | 153 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 155 Figure 2: Implicit IV with an 8 byte Extended Sequence Number 157 o Extended Sequence Number: the 8 byte Extended Sequence Number of 158 the Security Association. The 4 byte low order bytes are carried 159 in the ESP packet. 161 This document solely defines the IV generation of the algorithms 162 defined in [RFC4106] for AES-GCM, [RFC4309] for AES-CCM and [RFC7634] 163 for ChaCha20-Poly1305. Any other aspect (including using the Key 164 Length attribute) of applying those ciphers with the new Transform 165 Types defined in this document MUST be taken from the documents 166 defining the use of the algorithms in ESP. 168 5. Initiator Behavior 170 An initiator supporting this feature SHOULD propose implicit IV 171 algorithms in the Transform Type 1 (Encryption Algorithm) 172 Substructure of the Proposal Substructure inside the SA Payload. To 173 facilitate backward compatibility with non-supporting peers the 174 initiator SHOULD also include those same algorithms without Implicit 175 IV (IIV) as separate transforms. 177 6. Responder Behavior 179 The rules of SA Payload processing require that responder picks its 180 algorithms from the proposal sent by the initiator, thus this will 181 ensure that the responder will never send an SA payload containing 182 the IIV transform to an initiator that did not propose it. 184 7. Security Consideration 186 Nonce generation for these algorithms has not been explicitly 187 defined. It has been left to the implementation as long as certain 188 security requirements are met. Typically, for AES-GCM, AES-CCM, AES- 189 CTR and ChaCha20-Poly1305, the IV is not allowed being repeated for 190 one particular key. This document provides an explicit and normative 191 way to generate IVs. The mechanism described in this document meets 192 the IV security requirements of all relevant algorithms. 194 As the IV must not repeat for one SA when Counter-Mode ciphers are 195 used, Implicit IV as described in this document MUST NOT be used in 196 setups with the chance that the Sequence Number overlaps for one SA. 197 Multicast as described in [RFC5374], [RFC6407] and 198 [I-D.yeung-g-ikev2] is a prominent example, where many senders share 199 one secret and thus one SA. As such, Implicit IV may only be used 200 with Multicast if some mechanisms are employed that prevent Sequence 201 Number to overlap for one SA, otherwise Implicit IV MUST NOT be used 202 with Multicast. 204 This document defines three new encryption transforms that use 205 implicit IV. Unlike most encryption transforms defined to date, 206 which can be used for both ESP and IKEv2, these transforms are 207 defined for ESP only and cannot be used in IKEv2. The reason is that 208 IKEv2 messages don't contain unique per-message value, that can be 209 used for IV generation. The Message-ID field in IKEv2 header is 210 somewhat counterpart of SN field in ESP header, but recent IKEv2 211 extensions ([RFC6311], [RFC7383]) do allow it to repeat, so there is 212 no an easy way to derive unique IV from IKEv2 header fields. 214 8. IANA Considerations 216 This section assigns new code points to the recommended AEAD suites 217 provided in [RFC8221], thus the new Transform Type 1 - Encryption 218 Algorithm Transform IDs [IANA] are as defined below: 220 - ENCR_AES_CCM_8_IIV: 29 222 - ENCR_AES_GCM_16_IIV: 30 224 - ENCR_CHACHA20_POLY1305_IIV: 31 226 These algorithms should be added with this document as ESP Reference 227 and "Not Allowed" for IKEv2 Reference. 229 9. Acknowledgements 231 We would like to thanks people Valery Smyslov for their valuable 232 comments, David Schinazi for its implementation, as well as the 233 ipseceme chairs Tero Kivinen and David Waltermire for moving this 234 work forward. 236 10. References 237 10.1. Normative References 239 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 240 Requirement Levels", BCP 14, RFC 2119, 241 DOI 10.17487/RFC2119, March 1997, 242 . 244 [RFC3602] Frankel, S., Glenn, R., and S. Kelly, "The AES-CBC Cipher 245 Algorithm and Its Use with IPsec", RFC 3602, 246 DOI 10.17487/RFC3602, September 2003, 247 . 249 [RFC3686] Housley, R., "Using Advanced Encryption Standard (AES) 250 Counter Mode With IPsec Encapsulating Security Payload 251 (ESP)", RFC 3686, DOI 10.17487/RFC3686, January 2004, 252 . 254 [RFC4106] Viega, J. and D. McGrew, "The Use of Galois/Counter Mode 255 (GCM) in IPsec Encapsulating Security Payload (ESP)", 256 RFC 4106, DOI 10.17487/RFC4106, June 2005, 257 . 259 [RFC4303] Kent, S., "IP Encapsulating Security Payload (ESP)", 260 RFC 4303, DOI 10.17487/RFC4303, December 2005, 261 . 263 [RFC4309] Housley, R., "Using Advanced Encryption Standard (AES) CCM 264 Mode with IPsec Encapsulating Security Payload (ESP)", 265 RFC 4309, DOI 10.17487/RFC4309, December 2005, 266 . 268 [RFC5374] Weis, B., Gross, G., and D. Ignjatic, "Multicast 269 Extensions to the Security Architecture for the Internet 270 Protocol", RFC 5374, DOI 10.17487/RFC5374, November 2008, 271 . 273 [RFC6311] Singh, R., Ed., Kalyani, G., Nir, Y., Sheffer, Y., and D. 274 Zhang, "Protocol Support for High Availability of IKEv2/ 275 IPsec", RFC 6311, DOI 10.17487/RFC6311, July 2011, 276 . 278 [RFC6407] Weis, B., Rowles, S., and T. Hardjono, "The Group Domain 279 of Interpretation", RFC 6407, DOI 10.17487/RFC6407, 280 October 2011, . 282 [RFC7296] Kaufman, C., Hoffman, P., Nir, Y., Eronen, P., and T. 283 Kivinen, "Internet Key Exchange Protocol Version 2 284 (IKEv2)", STD 79, RFC 7296, DOI 10.17487/RFC7296, October 285 2014, . 287 [RFC7383] Smyslov, V., "Internet Key Exchange Protocol Version 2 288 (IKEv2) Message Fragmentation", RFC 7383, 289 DOI 10.17487/RFC7383, November 2014, 290 . 292 [RFC7634] Nir, Y., "ChaCha20, Poly1305, and Their Use in the 293 Internet Key Exchange Protocol (IKE) and IPsec", RFC 7634, 294 DOI 10.17487/RFC7634, August 2015, 295 . 297 [RFC8221] Wouters, P., Migault, D., Mattsson, J., Nir, Y., and T. 298 Kivinen, "Cryptographic Algorithm Implementation 299 Requirements and Usage Guidance for Encapsulating Security 300 Payload (ESP) and Authentication Header (AH)", RFC 8221, 301 DOI 10.17487/RFC8221, October 2017, 302 . 304 10.2. Informational References 306 [BEAST] Thai, T. and J. Juliano, "Here Come The xor Ninjas", , 307 May 2011, . 310 [I-D.yeung-g-ikev2] 311 Weis, B. and V. Smyslov, "Group Key Management using 312 IKEv2", draft-yeung-g-ikev2-15 (work in progress), March 313 2019. 315 [IANA] "IANA IKEv2 Parameter - Type 1 - Encryption Algorithm 316 Transform IDs", . 319 Authors' Addresses 321 Daniel Migault 322 Ericsson 323 8275 Trans Canada Route 324 Saint Laurent, QC H4S 0B6 325 Canada 327 Email: daniel.migault@ericsson.com 328 Tobias Guggemos 329 LMU Munich 330 Oettingenstr. 67 331 80538 Munich, Bavaria 332 Germany 334 Email: guggemos@mnm-team.org 335 URI: http://mnm-team.org/~guggemos 337 Yoav Nir 338 Dell EMC 339 9 Andrei Sakharov St 340 Haifa 3190500 341 Israel 343 Email: ynir.ietf@gmail.com