idnits 2.17.1 draft-mglt-ipsecme-implicit-iv-01.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 (October 8, 2016) is 2754 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-14 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: April 11, 2017 LMU Munich 6 Y. Nir 7 Check Point 8 October 8, 2016 10 Implicit IV for Counter-based Ciphers in IPsec 11 draft-mglt-ipsecme-implicit-iv-01.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 April 11, 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 8. IANA Considerations 178 AES-CTR, AES-CCM, AES-GCM and ChaCha20-Poly1305 are likely to 179 implement the implicit IV described in this document. This section 180 limits assignment of new code points to the recommended suites 181 provided in [I-D.ietf-ipsecme-rfc4307bis] and 182 [I-D.mglt-ipsecme-rfc7321bis], thus the new Transform Type 1 - 183 Encryption Algorithm Transform IDs are as defined below: 185 - ENCR_AES-CCM_8_IIV 187 - ENCR_AES-GCM_16_IIV 188 - ENCR_CHACHA20-POLY1305_IIV 190 9. References 192 9.1. Normative References 194 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 195 Requirement Levels", BCP 14, RFC 2119, 196 DOI 10.17487/RFC2119, March 1997, 197 . 199 [RFC3602] Frankel, S., Glenn, R., and S. Kelly, "The AES-CBC Cipher 200 Algorithm and Its Use with IPsec", RFC 3602, 201 DOI 10.17487/RFC3602, September 2003, 202 . 204 [RFC3686] Housley, R., "Using Advanced Encryption Standard (AES) 205 Counter Mode With IPsec Encapsulating Security Payload 206 (ESP)", RFC 3686, DOI 10.17487/RFC3686, January 2004, 207 . 209 [RFC4106] Viega, J. and D. McGrew, "The Use of Galois/Counter Mode 210 (GCM) in IPsec Encapsulating Security Payload (ESP)", 211 RFC 4106, DOI 10.17487/RFC4106, June 2005, 212 . 214 [RFC4303] Kent, S., "IP Encapsulating Security Payload (ESP)", 215 RFC 4303, DOI 10.17487/RFC4303, December 2005, 216 . 218 [RFC4309] Housley, R., "Using Advanced Encryption Standard (AES) CCM 219 Mode with IPsec Encapsulating Security Payload (ESP)", 220 RFC 4309, DOI 10.17487/RFC4309, December 2005, 221 . 223 [RFC7296] Kaufman, C., Hoffman, P., Nir, Y., Eronen, P., and T. 224 Kivinen, "Internet Key Exchange Protocol Version 2 225 (IKEv2)", STD 79, RFC 7296, DOI 10.17487/RFC7296, October 226 2014, . 228 [RFC7634] Nir, Y., "ChaCha20, Poly1305, and Their Use in the 229 Internet Key Exchange Protocol (IKE) and IPsec", RFC 7634, 230 DOI 10.17487/RFC7634, August 2015, 231 . 233 9.2. Informational References 235 [I-D.ietf-ipsecme-rfc4307bis] 236 Nir, Y., Kivinen, T., Wouters, P., and D. Migault, 237 "Algorithm Implementation Requirements and Usage Guidance 238 for IKEv2", draft-ietf-ipsecme-rfc4307bis-14 (work in 239 progress), September 2016. 241 [I-D.mglt-ipsecme-rfc7321bis] 242 Migault, D., Mattsson, J., Wouters, P., Nir, Y., and T. 243 Kivinen, "Cryptographic Algorithm Implementation 244 Requirements and Usage Guidance for Encapsulating Security 245 Payload (ESP) and Authentication Header (AH)", draft-mglt- 246 ipsecme-rfc7321bis-04 (work in progress), September 2016. 248 Appendix A. Document Change Log 250 Authors' Addresses 252 Daniel Migault (editor) 253 Ericsson 254 8400 boulevard Decarie 255 Montreal, QC H4P 2N2 256 Canada 258 Email: daniel.migault@ericsson.com 260 Tobias Guggemos (editor) 261 LMU Munich 262 Am Osteroesch 9 263 87637 Seeg, Bavaria 264 Germany 266 Email: tobias.guggemos@gmail.com 268 Yoav Nir 269 Check Point Software Technologies Ltd. 270 5 Hasolelim st. 271 Tel Aviv 6789735 272 Israel 274 Email: ynir.ietf@gmail.com