idnits 2.17.1 draft-mglt-ipsecme-implicit-iv-03.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 (June 20, 2017) is 2501 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-11 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, Ed. 3 Internet-Draft Ericsson 4 Intended status: Standards Track T. Guggemos, Ed. 5 Expires: December 22, 2017 LMU Munich 6 Y. Nir 7 Check Point 8 June 20, 2017 10 Implicit IV for Counter-based Ciphers in IPsec 11 draft-mglt-ipsecme-implicit-iv-03 13 Abstract 15 IPsec ESP sends an initialization vector (IV) or nonce in each 16 packet, adding 8 or 16 octets. Some algorithms such as AES-GCM, AES- 17 CCM, AES-CTR and ChaCha20-Poly1305 require a unique nonce but do not 18 require an unpredictable nonce. When using such algorithms the 19 packet counter value can be used to generate a nonce, saving 8 octets 20 per packet. This document describes how to do this. 22 Status of This Memo 24 This Internet-Draft is submitted in full conformance with the 25 provisions of BCP 78 and BCP 79. 27 Internet-Drafts are working documents of the Internet Engineering 28 Task Force (IETF). Note that other groups may also distribute 29 working documents as Internet-Drafts. The list of current Internet- 30 Drafts is at http://datatracker.ietf.org/drafts/current/. 32 Internet-Drafts are draft documents valid for a maximum of six months 33 and may be updated, replaced, or obsoleted by other documents at any 34 time. It is inappropriate to use Internet-Drafts as reference 35 material or to cite them other than as "work in progress." 37 This Internet-Draft will expire on December 22, 2017. 39 Copyright Notice 41 Copyright (c) 2017 IETF Trust and the persons identified as the 42 document authors. All rights reserved. 44 This document is subject to BCP 78 and the IETF Trust's Legal 45 Provisions Relating to IETF Documents 46 (http://trustee.ietf.org/license-info) in effect on the date of 47 publication of this document. Please review these documents 48 carefully, as they describe your rights and restrictions with respect 49 to this document. Code Components extracted from this document must 50 include Simplified BSD License text as described in Section 4.e of 51 the Trust Legal Provisions and are provided without warranty as 52 described in the Simplified BSD License. 54 Table of Contents 56 1. Requirements notation . . . . . . . . . . . . . . . . . . . . 2 57 2. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 58 3. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3 59 4. Implicit IV . . . . . . . . . . . . . . . . . . . . . . . . . 3 60 5. Initiator Behavior . . . . . . . . . . . . . . . . . . . . . 4 61 6. Responder Behavior . . . . . . . . . . . . . . . . . . . . . 4 62 7. Security Consideration . . . . . . . . . . . . . . . . . . . 4 63 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 5 64 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 5 65 9.1. Normative References . . . . . . . . . . . . . . . . . . 5 66 9.2. Informational References . . . . . . . . . . . . . . . . 6 67 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 7 69 1. Requirements notation 71 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 72 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 73 document are to be interpreted as described in [RFC2119]. 75 2. Introduction 77 Counter-based AES modes of operation such as AES-CTR ([RFC3686]), 78 AES-CCM ([RFC4309]), and AES-GCM ([RFC4106]) require the 79 specification of an nonce for each ESP packet. The same applies for 80 ChaCha20-Poly1305 ([RFC7634]. Currently this nonce is sent in each 81 ESP packet ([RFC4303]). This practice is designated in this document 82 as "explicit nonce". 84 In some context, such as IoT, it may be preferable to avoid carrying 85 the extra bytes associated to the IV and instead generate it locally 86 on each peer. The local generation of the nonce is designated in 87 this document as "implicit IV". 89 The size of this nonce depends on the specific algorithm, but all of 90 the algorithms mentioned above take an 8-octet nonce. 92 This document defines how to compute the nonce locally when it is 93 implicit. It also specifies how peers agree with the Internet Key 94 Exchange version 2 (IKEv2 - [RFC7296]) on using an implicit IV versus 95 an explicit IV. 97 This document limits its scope to the algorithms mentioned above. 98 Other algorithms with similar properties may later be defined to use 99 this extension. 101 This document does not consider AES-CBC ([RFC3602]) as AES-CBC 102 requires the IV to be unpredictable. Deriving it directly from the 103 packet counter as described below is insecure as mentioned in 104 Security Consideration of [RFC3602] and has led to real world chosen 105 plain-text attack such as BEAST [BEAST]. 107 3. Terminology 109 o IoT: Internet of Things. 111 o IV: Initialization Vector. 113 o Nonce: a fixed-size octet string used only once. This is similar 114 to IV, except that in common usage there is no implication of non- 115 predictability. 117 4. Implicit IV 119 With the algorithms listed in Section 2, the 8 byte nonce MUST NOT 120 repeat. The binding between a ESP packet and its nonce is provided 121 using the Sequence Number or the Extended Sequence Number. Figure 1 122 and Figure 2 represent the IV with a regular 4-byte Sequence Number 123 and with an 8-byte Extended Sequence Number respectively. 125 0 1 2 3 126 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 127 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 128 | Zero | 129 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 130 | Sequence Number | 131 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 133 Figure 1: Implicit IV with a 4 byte Sequence Number 135 o Sequence Number: the 4 byte Sequence Number carried in the ESP 136 packet. 138 o Zero: a 4 byte array with all bits set to zero. 140 0 1 2 3 141 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 142 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 143 | Extended | 144 | Sequence Number | 145 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 147 Figure 2: Implicit IV with an 8 byte Extended Sequence Number 149 o Extended Sequence Number: the 8 byte Extended Sequence Number of 150 the Security Association. The 4 byte low order bytes are carried 151 in the ESP packet. 153 5. Initiator Behavior 155 An initiator supporting this feature SHOULD propose implicit IV for 156 all relevant algorithms. To facilitate backward compatibility with 157 non-supporting peers the initiator SHOULD also include those same 158 algorithms without IIV. This may require extra transforms. 160 6. Responder Behavior 162 The rules of SA payload processing ensure that the responder will 163 never send an SA payload containing the IIV indicator to an initiator 164 that does not support IIV. 166 7. Security Consideration 168 Nonce generation for these algorithms has not been explicitly 169 defined. It has been left to the implementation as long as certain 170 security requirements are met. This document provides an explicit 171 and normative way to generate IVs. The mechanism described in this 172 document meets the IV security requirements of all relevant 173 algorithms. 175 As the IV MUST NOT repeat for one SPI when Counter-Mode ciphers are 176 used, Implicit IV as described in this document MUST NOT be used in 177 setups with the chance that the Sequence Number overlaps for one SPI. 178 Multicast as described in [RFC5374], [RFC6407] and 179 [I-D.yeung-g-ikev2] is a prominent example, where many senders share 180 one secret and thus one SPI. Section 3.5 of [RFC6407] explains how 181 repetition MAY BE prevented by using a prefix for each group member, 182 which could be prefixed to the Sequence Number. Otherwise, Implicit 183 IV MUST NOT be used in multicast scenarios. 185 8. IANA Considerations 187 AES-CTR, AES-CCM, AES-GCM and ChaCha20-Poly1305 are likely to 188 implement the implicit IV described in this document. This section 189 limits assignment of new code points to the recommended suites 190 provided in [I-D.ietf-ipsecme-rfc4307bis] and 191 [I-D.ietf-ipsecme-rfc7321bis], thus the new Transform Type 1 - 192 Encryption Algorithm Transform IDs are as defined below: 194 - ENCR_AES-CCM_8_IIV 196 - ENCR_AES-GCM_16_IIV 198 - ENCR_CHACHA20-POLY1305_IIV 200 9. References 202 9.1. Normative References 204 [I-D.ietf-ipsecme-rfc4307bis] 205 Nir, Y., Kivinen, T., Wouters, P., and D. Migault, 206 "Algorithm Implementation Requirements and Usage Guidance 207 for IKEv2", draft-ietf-ipsecme-rfc4307bis-18 (work in 208 progress), March 2017. 210 [I-D.ietf-ipsecme-rfc7321bis] 211 Wouters, P., Migault, D., Mattsson, J., Nir, Y., and T. 212 Kivinen, "Cryptographic Algorithm Implementation 213 Requirements and Usage Guidance for Encapsulating Security 214 Payload (ESP) and Authentication Header (AH)", draft-ietf- 215 ipsecme-rfc7321bis-06 (work in progress), June 2017. 217 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 218 Requirement Levels", BCP 14, RFC 2119, 219 DOI 10.17487/RFC2119, March 1997, 220 . 222 [RFC3602] Frankel, S., Glenn, R., and S. Kelly, "The AES-CBC Cipher 223 Algorithm and Its Use with IPsec", RFC 3602, 224 DOI 10.17487/RFC3602, September 2003, 225 . 227 [RFC3686] Housley, R., "Using Advanced Encryption Standard (AES) 228 Counter Mode With IPsec Encapsulating Security Payload 229 (ESP)", RFC 3686, DOI 10.17487/RFC3686, January 2004, 230 . 232 [RFC4106] Viega, J. and D. McGrew, "The Use of Galois/Counter Mode 233 (GCM) in IPsec Encapsulating Security Payload (ESP)", 234 RFC 4106, DOI 10.17487/RFC4106, June 2005, 235 . 237 [RFC4303] Kent, S., "IP Encapsulating Security Payload (ESP)", 238 RFC 4303, DOI 10.17487/RFC4303, December 2005, 239 . 241 [RFC4309] Housley, R., "Using Advanced Encryption Standard (AES) CCM 242 Mode with IPsec Encapsulating Security Payload (ESP)", 243 RFC 4309, DOI 10.17487/RFC4309, December 2005, 244 . 246 [RFC5374] Weis, B., Gross, G., and D. Ignjatic, "Multicast 247 Extensions to the Security Architecture for the Internet 248 Protocol", RFC 5374, DOI 10.17487/RFC5374, November 2008, 249 . 251 [RFC6407] Weis, B., Rowles, S., and T. Hardjono, "The Group Domain 252 of Interpretation", RFC 6407, DOI 10.17487/RFC6407, 253 October 2011, . 255 [RFC7296] Kaufman, C., Hoffman, P., Nir, Y., Eronen, P., and T. 256 Kivinen, "Internet Key Exchange Protocol Version 2 257 (IKEv2)", STD 79, RFC 7296, DOI 10.17487/RFC7296, October 258 2014, . 260 [RFC7634] Nir, Y., "ChaCha20, Poly1305, and Their Use in the 261 Internet Key Exchange Protocol (IKE) and IPsec", RFC 7634, 262 DOI 10.17487/RFC7634, August 2015, 263 . 265 9.2. Informational References 267 [BEAST] Thai, T. and J. Juliano, "Here Come The xor Ninjas", , 268 May 2011, . 271 [I-D.yeung-g-ikev2] 272 Weis, B., Nir, Y., and V. Smyslov, "Group Key Management 273 using IKEv2", draft-yeung-g-ikev2-11 (work in progress), 274 March 2017. 276 Authors' Addresses 278 Daniel Migault (editor) 279 Ericsson 280 8400 boulevard Decarie 281 Montreal, QC H4P 2N2 282 Canada 284 Email: daniel.migault@ericsson.com 286 Tobias Guggemos (editor) 287 LMU Munich 288 Oettingenstr. 67 289 80538 Munich, Bavaria 290 Germany 292 Email: guggemos@mnm-team.org 293 URI: http://mnm-team.org/~guggemos 295 Yoav Nir 296 Check Point Software Technologies Ltd. 297 5 Hasolelim st. 298 Tel Aviv 6789735 299 Israel 301 Email: ynir.ietf@gmail.com