idnits 2.17.1 draft-mglt-ipsecme-implicit-iv-02.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 (November 15, 2016) is 2718 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 (-18) exists of draft-ietf-ipsecme-rfc4307bis-15 == Outdated reference: A later version (-16) exists of draft-yeung-g-ikev2-10 Summary: 0 errors (**), 0 flaws (~~), 3 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: May 19, 2017 LMU Munich 6 Y. Nir 7 Check Point 8 November 15, 2016 10 Implicit IV for Counter-based Ciphers in IPsec 11 draft-mglt-ipsecme-implicit-iv-02.txt 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 May 19, 2017. 39 Copyright Notice 41 Copyright (c) 2016 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 . . . . . . . . . . . . . . . . . . . . . 4 64 9. References . . . . . . . . . . . . . . . . . . . . . . . . . 5 65 9.1. Normative References . . . . . . . . . . . . . . . . . . 5 66 9.2. Informational References . . . . . . . . . . . . . . . . 6 67 Appendix A. Document Change Log . . . . . . . . . . . . . . . . 6 68 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 6 70 1. Requirements notation 72 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 73 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 74 document are to be interpreted as described in [RFC2119]. 76 2. Introduction 78 Counter-based AES modes of operation such as AES-CTR ([RFC3686]), 79 AES-CCM ([RFC4309]), and AES-GCM ([RFC4106]) require the 80 specification of an nonce for each ESP packet. The same applies for 81 ChaCha20-Poly1305 ([RFC7634]. Currently this nonce is sent in each 82 ESP packet ([RFC4303]). This practice is designated in this document 83 as "explicit nonce". 85 In some context, such as IoT, it may be preferable to avoid carrying 86 the extra bytes associated to the IV and instead generate it locally 87 on each peer. The local generation of the nonce is designated in 88 this document as "implicit IV". 90 The size of this nonce depends on the specific algorithm, but all of 91 the algorithms mentioned above take an 8-octet nonce. 93 This document defines how to compute the nonce locally when it is 94 implicit. It also specifies how peers agree with the Internet Key 95 Exchange version 2 (IKEv2 - [RFC7296]) on using an implicit IV versus 96 an explicit IV. 98 This document limits its scope to the algorithms mentioned above. 99 Other algorithms with similar properties may later be defined to use 100 this extension. 102 This document does not consider AES-CBC ([RFC3602])as AES-CBC 103 requires the IV to be unpredictable. Deriving it directly from the 104 packet counter as described below is insecure. 106 3. Terminology 108 o IoT: Internet of Things 110 o IV: Initialization Vector. Although security requirements vary, 111 the common usage of this term implies that the value is 112 unpredictable. 114 o Nonce: a fixed-size octet string used only once. This is similar 115 to IV, except that in common usage there is no implication of non- 116 predictability. 118 4. Implicit IV 120 With the algorithms listed in Section 2, the 8 byte nonce MUST NOT 121 repeat. The binding between a ESP packet and its nonce is provided 122 using the Sequence Number or the Extended Sequence Number. Figure 1 123 and Figure 2 represent the IV with a regular 4-byte Sequence Number 124 and with an 8-byte Extended Sequence Number respectively. 126 0 1 2 3 127 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 128 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 129 | Zero | 130 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 131 | Sequence Number | 132 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 134 Figure 1: Implicit IV with a 4 byte Sequence Number 136 o Sequence Number: the 4 byte Sequence Number carried in the ESP 137 packet. 139 o Zero: a 4 byte array with all bits set to zero. 141 0 1 2 3 142 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 143 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 144 | Extended | 145 | Sequence Number | 146 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 148 Figure 2: Implicit IV with an 8 byte Extended Sequence Number 150 o Extended Sequence Number: the 8 byte Extended Sequence Number of 151 the Security Association. The 4 byte low order bytes are carried 152 in the ESP packet. 154 5. Initiator Behavior 156 An initiator supporting this feature SHOULD propose implicit IV for 157 all relevant algorithms. To facilitate backward compatibility with 158 non-supporting peers the initiator SHOULD also include those same 159 algorithms without IIV. This may require extra transforms. 161 6. Responder Behavior 163 The rules of SA payload processing ensure that the responder will 164 never send an SA payload containing the IIV indicator to an initiator 165 that does not support IIV. 167 7. Security Consideration 169 Nonce generation for these algorithms has not been explicitly 170 defined. It has been left to the implementation as long as certain 171 security requirements are met. This document provides an explicit 172 and normative way to generate IVs. The mechanism described in this 173 document meets the IV security requirements of all relevant 174 algorithms. 176 As the IV MUST NOT repeat for one SPI when Counter-Mode ciphers are 177 used, Implicit IV as described in this document MUST NOT be used in 178 setups with the chance that the Sequence Number overlaps for one SPI. 179 Multicast as described in [RFC5374], [RFC6407] and 180 [I-D.yeung-g-ikev2] is a prominent example, where many senders share 181 one secret and thus one SPI. Section 3.5 of [RFC6407] explains how 182 repetition MAY BE prevented by using a prefix for each group member, 183 which could be prefixed to the Sequence Number. Otherwise, Implicit 184 IV MUST NOT be used in multicast scenarios. 186 8. IANA Considerations 188 AES-CTR, AES-CCM, AES-GCM and ChaCha20-Poly1305 are likely to 189 implement the implicit IV described in this document. This section 190 limits assignment of new code points to the recommended suites 191 provided in [I-D.ietf-ipsecme-rfc4307bis] and 192 [I-D.mglt-ipsecme-rfc7321bis], thus the new Transform Type 1 - 193 Encryption Algorithm Transform IDs are as defined below: 195 - ENCR_AES-CCM_8_IIV 197 - ENCR_AES-GCM_16_IIV 199 - ENCR_CHACHA20-POLY1305_IIV 201 9. References 203 9.1. Normative References 205 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 206 Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/ 207 RFC2119, March 1997, 208 . 210 [RFC3602] Frankel, S., Glenn, R., and S. Kelly, "The AES-CBC Cipher 211 Algorithm and Its Use with IPsec", RFC 3602, DOI 10.17487/ 212 RFC3602, September 2003, 213 . 215 [RFC3686] Housley, R., "Using Advanced Encryption Standard (AES) 216 Counter Mode With IPsec Encapsulating Security Payload 217 (ESP)", RFC 3686, DOI 10.17487/RFC3686, January 2004, 218 . 220 [RFC4106] Viega, J. and D. McGrew, "The Use of Galois/Counter Mode 221 (GCM) in IPsec Encapsulating Security Payload (ESP)", RFC 222 4106, DOI 10.17487/RFC4106, June 2005, 223 . 225 [RFC4303] Kent, S., "IP Encapsulating Security Payload (ESP)", RFC 226 4303, DOI 10.17487/RFC4303, December 2005, 227 . 229 [RFC4309] Housley, R., "Using Advanced Encryption Standard (AES) CCM 230 Mode with IPsec Encapsulating Security Payload (ESP)", RFC 231 4309, DOI 10.17487/RFC4309, December 2005, 232 . 234 [RFC5374] Weis, B., Gross, G., and D. Ignjatic, "Multicast 235 Extensions to the Security Architecture for the Internet 236 Protocol", RFC 5374, DOI 10.17487/RFC5374, November 2008, 237 . 239 [RFC6407] Weis, B., Rowles, S., and T. Hardjono, "The Group Domain 240 of Interpretation", RFC 6407, DOI 10.17487/RFC6407, 241 October 2011, . 243 [RFC7296] Kaufman, C., Hoffman, P., Nir, Y., Eronen, P., and T. 244 Kivinen, "Internet Key Exchange Protocol Version 2 245 (IKEv2)", STD 79, RFC 7296, DOI 10.17487/RFC7296, October 246 2014, . 248 [RFC7634] Nir, Y., "ChaCha20, Poly1305, and Their Use in the 249 Internet Key Exchange Protocol (IKE) and IPsec", RFC 7634, 250 DOI 10.17487/RFC7634, August 2015, 251 . 253 9.2. Informational References 255 [I-D.ietf-ipsecme-rfc4307bis] 256 Nir, Y., Kivinen, T., Wouters, P., and D. Migault, 257 "Algorithm Implementation Requirements and Usage Guidance 258 for IKEv2", draft-ietf-ipsecme-rfc4307bis-15 (work in 259 progress), October 2016. 261 [I-D.mglt-ipsecme-rfc7321bis] 262 Migault, D., Mattsson, J., Wouters, P., Nir, Y., and T. 263 Kivinen, "Cryptographic Algorithm Implementation 264 Requirements and Usage Guidance for Encapsulating Security 265 Payload (ESP) and Authentication Header (AH)", draft-mglt- 266 ipsecme-rfc7321bis-04 (work in progress), September 2016. 268 [I-D.yeung-g-ikev2] 269 Weis, B., Nir, Y., and V. Smyslov, "Group Key Management 270 using IKEv2", draft-yeung-g-ikev2-10 (work in progress), 271 March 2016. 273 Appendix A. Document Change Log 275 Authors' Addresses 277 Daniel Migault (editor) 278 Ericsson 279 8400 boulevard Decarie 280 Montreal, QC H4P 2N2 281 Canada 283 Email: daniel.migault@ericsson.com 284 Tobias Guggemos (editor) 285 LMU Munich 286 Oettingenstr. 67 287 80538 Munich, Bavaria 288 Germany 290 Email: guggemos@mnm-team.org 291 URI: http://mnm-team.org/~guggemos 293 Yoav Nir 294 Check Point Software Technologies Ltd. 295 5 Hasolelim st. 296 Tel Aviv 6789735 297 Israel 299 Email: ynir.ietf@gmail.com