idnits 2.17.1 draft-simpson-ipsec-enhancement-00.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** Cannot find the required boilerplate sections (Copyright, IPR, etc.) in this document. Expected boilerplate is as follows today (2024-04-25) according to https://trustee.ietf.org/license-info : IETF Trust Legal Provisions of 28-dec-2009, Section 6.a: This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79. IETF Trust Legal Provisions of 28-dec-2009, Section 6.b(i), paragraph 2: Copyright (c) 2024 IETF Trust and the persons identified as the document authors. All rights reserved. IETF Trust Legal Provisions of 28-dec-2009, Section 6.b(i), paragraph 3: This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://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. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- ** Missing document type: Expected "INTERNET-DRAFT" in the upper left hand corner of the first page ** Missing expiration date. The document expiration date should appear on the first and last page. ** The document seems to lack a 1id_guidelines paragraph about Internet-Drafts being working documents. ** The document seems to lack a 1id_guidelines paragraph about 6 months document validity. ** The document seems to lack a 1id_guidelines paragraph about the list of current Internet-Drafts. ** The document seems to lack a 1id_guidelines paragraph about the list of Shadow Directories. == No 'Intended status' indicated for this document; assuming Proposed Standard Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The document seems to lack an IANA Considerations section. (See Section 2.2 of https://www.ietf.org/id-info/checklist for how to handle the case when there are no actions for IANA.) ** The document seems to lack an Authors' Addresses Section. ** The document seems to lack separate sections for Informative/Normative References. All references will be assumed normative when checking for downward references. ** There are 2 instances of too long lines in the document, the longest one being 5 characters in excess of 72. ** The document seems to lack a both a reference to RFC 2119 and the recommended RFC 2119 boilerplate, even if it appears to use RFC 2119 keywords. RFC 2119 keyword, line 77: '... sequence number MUST be initialized t...' RFC 2119 keyword, line 78: '...st datagram, and MUST be incremented (...' RFC 2119 keyword, line 86: '...entation dependent, but it MUST reject...' RFC 2119 keyword, line 94: '... the Authentication Header (AH) [RFC-1826]. The value zero MUST NOT...' Miscellaneous warnings: ---------------------------------------------------------------------------- -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (April 1996) is 10237 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) == Missing Reference: 'S' is mentioned on line 167, but not defined == Missing Reference: 'L' is mentioned on line 160, but not defined -- Possible downref: Non-RFC (?) normative reference: ref. 'KR96' ** Obsolete normative reference: RFC 1826 (Obsoleted by RFC 2402) ** Obsolete normative reference: RFC 1827 (Obsoleted by RFC 2406) -- Possible downref: Non-RFC (?) normative reference: ref. 'Schneier95' -- Possible downref: Non-RFC (?) normative reference: ref. 'VK83' Summary: 14 errors (**), 0 flaws (~~), 3 warnings (==), 5 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 1 Network Working Group W A Simpson 2 DayDreamer 3 D A Wagner 4 Berkeley 5 expires in six months April 1996 7 Internet Security Transform Enhancements 8 draft-simpson-ipsec-enhancement-00.txt 10 Status of this Memo 12 This document is an Internet-Draft. Internet Drafts are working doc- 13 uments of the Internet Engineering Task Force (IETF), its Areas, and 14 its Working Groups. Note that other groups may also distribute work- 15 ing documents as Internet Drafts. 17 Internet Drafts are draft documents valid for a maximum of six 18 months, and may be updated, replaced, or obsoleted by other documents 19 at any time. It is not appropriate to use Internet Drafts as refer- 20 ence material, or to cite them other than as a ``working draft'' or 21 ``work in progress.'' 23 To learn the current status of any Internet-Draft, please check the 24 ``1id-abstracts.txt'' listing contained in the internet-drafts Shadow 25 Directories on: 27 ftp.is.co.za (Africa) 28 nic.nordu.net (Europe) 29 ds.internic.net (US East Coast) 30 ftp.isi.edu (US West Coast) 31 munnari.oz.au (Pacific Rim) 33 Distribution of this memo is unlimited. 35 Abstract 37 This document describes several generic security transform enhance- 38 ments for the IP Security Protocols (AH and ESP). 40 1. Introduction 42 The implementation of automated key management provides the opportu- 43 nity for enhancement of the basic Internet Protocol Security trans- 44 forms. Rapid key updates are available for better replay protection. 45 Larger quantities of key material are available to improve the qual- 46 ity of the security transforms. 48 These features are not fundamental to operation of Internet Security, 49 as they duplicate features already available through other protocol 50 mechanisms or more powerful transforms. However, automated key man- 51 agement makes these features cheaply available. 53 Selection of these enhancements are the domain of particular key man- 54 agement mechanisms. Operational policy considerations are outside 55 the scope of this document. 57 2. Replay Protection 59 When an adversary resends an earlier intercepted IP datagram, the 60 target would like to detect and discard that datagram. It is desir- 61 able that detection occur before computationally intensive opera- 62 tions, such as decryption. 64 Replay protection provides cryptographically secure at-most-once 65 datagram delivery. This is distinguished from the ordinary trans- 66 port-layer delivery mechanisms that would be exercised later in the 67 protocol processing. 69 Each implementation maintains a sequence number to provide replay 70 protection. This sequence number is unique for each security associ- 71 ation IP Source, Destination and SPI. Replay protection is accom- 72 plished by authenticating the sequence number. Secure replay protec- 73 tion requires that the key used for authentication be changed before 74 the sequence number repeats. This is made practical through auto- 75 mated key management. 77 When sending, the sequence number MUST be initialized to 1 for the 78 first datagram, and MUST be incremented (as an unsigned integer) 79 after each datagram is sent. 81 On receipt, the sequence number is checked against a list of previ- 82 ously accepted numbers from the same IP Source. There is no require- 83 ment that datagrams arrive in order. As each datagram arrives, the 84 sequence number is stored so that it won't be accepted again. 86 The exact algorithm is implementation dependent, but it MUST reject 87 datagrams with duplicate sequence numbers, and should make a best- 88 effort to accept as many valid (non-duplicate) out-of-order datagrams 89 as possible. 91 2.1. AH Sequencing 93 A 16-bit sequence number is sent in the previously Reserved field of 94 the Authentication Header (AH) [RFC-1826]. The value zero MUST NOT 95 be sent. 97 The receiver validates this number within an implementation dependent 98 range of expected values. Any AH protected datagram that fails this 99 test is silently discarded. 101 Receipt of the value zero indicates that the range has been 102 exhausted, or that the sender has not correctly implemented replay 103 protection. 105 2.2. ESP Sequencing 107 A 32-bit sequence number is sent immediately following the SPI in the 108 Encapsulating Security Payload (ESP) [RFC-1827]. When an Initializa- 109 tion Vector (IV) is required by the transform (as in [RFC-1829]), 110 this sequence number is the same as the IV. 112 2.3. Combination 114 When both AH and ESP Sequencing are present, only the AH sequence 115 number is examined, and the ESP sequence number is not used for 116 replay prevention. 118 2.4. Implementation 120 A full-size (2**16 or 2**32 bit) array for storing the status of each 121 sequence number received is probably impractical. The following sim- 122 ple algorithm is one possible improvement for single IP Source traf- 123 fic. 125 A low-water mark L is maintained; arriving sequence numbers less than 126 (earlier than) the low-water mark are automatically rejected. 128 A fixed window size W is chosen, depending on storage constraints. 130 An array A[L..L+W-1] of size W is maintained, where each element 131 maintains the state (stale or fresh) of the corresponding sequence 132 number. 134 The following steps are applied to each incoming sequence number S: 136 1. If S < L 137 discard the datagram. 139 2. If S < L+W 140 2a. If A[S] == stale 141 discard the datagram. 142 2b. Else 143 set A[S] = stale, 144 accept the datagram. 146 (note: S > L+W-1) 148 3. If A[L] == stale 149 Let x = L; 150 While A[x] == stale 151 Do set x = x + 1. 153 Let y = L; 154 Let L = x. 155 (shift the array A[] down by y-L elements in memory if necessary, 156 so now A[] has the new bounds L..L+W-1) 157 Set A[j] = fresh for y+W-1 < j < L+W. 158 Goto Step 1. 160 (note: S > L+W-1 and A[L] == fresh) 162 4. Let y = L; 163 Let L = S-W+1. 164 Shift the array A[] down by y-L elements in memory if necessary, 165 so now A[] has the new bounds L..L+W-1 (or L..S). 166 Set A[j] = fresh for y+W-1 < j < L+W. 167 Set A[S] = stale and accept the datagram. 169 Two invariants are maintained in this algorithm. First, all sequence 170 numbers S < L are stale. Second, all sequence numbers S > L+W-1 are 171 fresh. 173 Note that step 4 forgets some state information, and may cause out- 174 of-order datagrams that were sent earlier but received later to be 175 (incorrectly) judged stale and discarded. Though this algorithm may 176 inadvertenly reject a fresh datagram as stale, the important point is 177 that it will never accept a replayed datagram. 179 An implementation may wish to go through with step 4 only for packets 180 that pass the authentication verification. 182 This is only one possible algorithm; implementators may choose 183 another, so long as it rejects replayed datagrams with duplicate 184 sequence numbers. 186 3. Secret Initialization Vector 188 When an Initialization Vector (IV) is specified by the transform (as 189 in [RFC-1829]), this IV may be enhanced by combination with a secret 190 value. Provision of a secret IV for each security association is 191 made practical through automated key management. 193 In most cases, a secret IV is not a requirement, as the [VK83] speci- 194 fied attacks are impractical for the current Internet Security trans- 195 forms. The existing transforms already provide that the IV is dif- 196 ferent for each datagram in the same security association. Choosing 197 a secret IV during session establishment may ensure that the result- 198 ing IV is more likely to be different for every security association 199 when there are a large number of security associations between the 200 same parties. 202 3.1. XOR 204 The most simple technique is to generate a secret IV of the appropri- 205 ate size, and XOR the secret value with the IV carried in the ESP 206 header. 208 3.2. Hash 210 A more robust technique is to regenerate a new IV using a one-way 211 hash function of a (variable length) secret key and the IV carried in 212 each ESP header, extracting an appropriate size IV from the result. 213 This provides a stronger IV that does not appear related to previous 214 IVs. 216 4. Whitening 218 A simple method for strengthening common block cipher transforms (as 219 in [RFC-1829]) involves XOR of additional secret values with each 220 block. Provision of these additional secret values for each security 221 association is made practical through automated key management. 223 Indeed, so-called "whitening" is merely an application of repeated 224 key XOR, the most common cheap method of hiding data. It is insecure 225 without combination with a robust cipher. 227 4.1. Ciphertext 229 The ciphertext may be XOR'd with a secret value before output to the 230 datagram. This requires a secret the same size as the block. When 231 Cipher Block Chaining (CBC) is used, this hides the chaining values 232 used as an IV for the next block. 234 4.2. Plaintext 236 The plaintext may be XOR'd with a secret value before input to the 237 block cipher. This requires a secret the same size as the block. 238 The effect is similar to a secret IV applied to all the blocks. 240 4.3. With Pseudo-random Sequence 242 Another variant is to generate a pseudo-random sequence of secrets to 243 XOR with either the ciphertext or plaintext. This requires a (vari- 244 able length) secret to be used as a seed to the sequence generator. 246 4.4. With Hash Sequence 248 A more robust variant is to generate a sequence of secrets using a 249 one-way hash function of a (variable length) secret key and each 250 block chaining vector (CV), extracting an appropriate size block from 251 the result. This effect is similar to a secret hash IV applied to 252 all the blocks. 254 4.5. Combinations 256 These variants can be easily combined. For example, an XOR of a 257 secret with both the ciphertext and plaintext when used as a sandwich 258 around DES is called DES-XEX2 (DES key plus one XOR key) or DES-XEX3 259 (DES key plus two separate XOR keys) [KR96]. 261 Security Considerations 263 Analyses of these simple techniques are readily available in the lit- 264 erature. Further details may be found in [Schneier95]. 266 The IV or CV hashing techniques are particularly useful in conjunc- 267 tion with replay protection, as they prevent undetectable modifica- 268 tion of the predictable Sequence numbers. 270 Acknowledgements 272 Much of the text and implementation details of Replay Protection were 273 provided by David Wagner. Additional suggestions were provided by 274 Steve Kent. 276 Special thanks to John Ioannidis for inspiration and experimentation 277 which began this most recent round of IP Mobility and IP Security 278 development. Some of the text on Replay Protection was derived from 279 [swIPe]. 281 Robert Baldwin suggested the XOR protection of the IV. 283 Bart Preneel suggested the hash protection of the IV. 285 The use of "whitening" is further described in [Schneier95]. 287 References 289 [KR96] Kaliski, B., and Robshaw, M., "Multiple Encryption: Weighing 290 Security and Performance", Dr. Dobbs Journal, January 1996. 292 [RFC-1826] 293 Atkinson, R., "IP Authentication Header", RFC-1826, Naval 294 Research Laboratory, July 1995. 296 [RFC-1827] 297 Atkinson, R., "IP Encapsulating Security Protocol (ESP)", 298 RFC-1827, Naval Research Laboratory, July 1995. 300 [RFC-1829] 301 Karn, P., Metzger, P., Simpson, W., "The ESP DES-CBC Trans- 302 form", July 1995. 304 [Schneier95] 305 Schneier, B., "Applied Cryptography Second Edition", John 306 Wiley & Sons, New York, NY, 1995. ISBN 0-471-12845-7. 308 [swIPe] Ioannidis, J., and Blaze, M., "The Architecture and Imple- 309 mentation of Network-Layer Security Under Unix", Fourth 310 Usenix Security Symposium Proceedings, October 1993. 312 [VK83] Voydock, V.L., and Kent, S.T., "Security Mechanisms in High- 313 level Networks", ACM Computing Surveys, Vol. 15, No. 2, June 314 1983. 316 Contacts 318 Comments should be submitted to the ipsec-dev@terisa.com mailing 319 list. 321 Questions about this memo can also be directed to: 323 William Allen Simpson 324 Daydreamer 325 Computer Systems Consulting Services 326 1384 Fontaine 327 Madison Heights, Michigan 48071 329 wsimpson@UMich.edu 330 wsimpson@GreenDragon.com (preferred) 331 bsimpson@MorningStar.com 333 David A Wagner 334 Computer Science Department 335 University of California 336 Berkeley, California 94720 338 daw@cs.berkeley.edu