home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1997 December / Internet_Info_CD-ROM_Walnut_Creek_December_1997.iso / drafts / draft_ietf_i / draft-ietf-ipsec-skip-07.txt < prev    next >
Text File  |  1996-08-14  |  76KB  |  2,080 lines

  1.  
  2.  
  3. IPSEC Working Group                           Ashar Aziz
  4. INTERNET-DRAFT                                Tom Markson
  5.                                               Hemma Prafullchandra
  6.                                               Sun Microsystems, Inc.
  7.  
  8. Expires in six months                         August 14, 1996
  9.  
  10.  
  11.  
  12.  
  13.  
  14.           Simple Key-Management For Internet Protocols (SKIP)
  15.                      <draft-ietf-ipsec-skip-07.txt>
  16.  
  17.  
  18.  
  19. Status of this Memo
  20.  
  21. This document is a submission to the IETF Internet Protocol Security
  22. (IPSEC) Working Group. Comments are solicited and should be addressed to
  23. to the working group mailing list (ipsec@ans.net) or to the authors.
  24.  
  25. This document is an Internet-Draft.  Internet Drafts are working
  26. documents of the Internet Engineering Task Force (IETF), its areas, and
  27. its working Groups. Note that other groups may also distribute working
  28. documents as Internet Drafts.
  29.  
  30. Internet-Drafts draft documents are valid for a maximum of six months
  31. and may be updated, replaced, or obsoleted by other documents at any
  32. time. It is inappropriate to use Internet-Drafts as reference material
  33. or to cite them other than as "work in progress."
  34.  
  35. To learn the current status of any Internet-Draft, please check the
  36. "1id-abstracts.txt" listing contained in the Internet-Drafts Shadow
  37. Directories on ftp.is.co.za (Africa), nic.nordu.net (Europe),
  38. munnari.oz.au (Pacific Rim), ds.internic.net (US East Coast), or
  39. ftp.isi.edu (US West Coast).
  40.  
  41. Distribution of this memo is unlimited.
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51. draft-ietf-ipsec-skip-07.txt                        [Page 1]
  52.  
  53.  
  54.  
  55. INTERNET-DRAFT              SKIP             August 14, 1996
  56.  
  57.  
  58.  
  59. Abstract
  60.  
  61. There are occasions where it is advantageous to put authenticity and
  62. privacy features at the network layer. The vast majority of the privacy
  63. and authentication protocols in the literature deal with session
  64. oriented key-management schemes. However, many of the commonly used
  65. network layer protocols (for example, IPv4 and IPv6) are session-less
  66. datagram oriented protocols. We describe a key-management scheme that is
  67. particularly well suited for use in conjunction with a session-less
  68. datagram protocol like IPv4 or IPv6.
  69.  
  70. SKIP has been designed to work with the IP Security Protocols AH and ESP
  71. [8, 9, 10] which are specified for both IPv4 and IPv6.
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107. draft-ietf-ipsec-skip-07.txt                        [Page 2]
  108.  
  109.  
  110.  
  111. INTERNET-DRAFT              SKIP             August 14, 1996
  112.  
  113.  
  114.  
  115. 1.  Simple Key-Management for Internet Protocols
  116.  
  117. In order to implement SKIP each IP based source and destination shall
  118. have an authenticated Diffie-Hellman (DH) [4] public value.  This public
  119. value may be authenticated in numerous ways. Some possibilities for
  120. authenticating DH public values is by the use of X.509 certificates [6],
  121. Secure DNS [11], and PGP certificates [24].
  122.  
  123. These certificates can be signed using any signature algorithm, such as
  124. RSA or DSA. In case of X.509 certificates, the subject Distinguished
  125. Name (DN) in the X.509 certificate is the numeric string representation
  126. of a list of IP addresses or equivalent identifier for principals in the
  127. network. Examples of principals in the network are IP nodes, or users. A
  128. detailed description of this may be found in [23].  In the discussion
  129. below we focus on IP nodes, although user oriented keying is possible
  130. and is further described in section 1.7.
  131.  
  132. Thus each IP source or destination I has a secret value i, and a public
  133. value g^i mod p. Similarly, IP node J has a secret value j and a public
  134. value g^j mod p.
  135.  
  136. Once n certificates are assigned to n IP nodes, O(n^2) mutually
  137. authenticated pairwise keys arise, simply as a result of the public
  138. value authentication process.  This is because each pair of IP source
  139. and destination I and J can acquire a mutually authenticated shared
  140. secret g^ij mod p.  The symmetric keys derivable from these shared
  141. secrets require no setup overhead, except for the authenticated public
  142. value distribution process itself.
  143.  
  144. All that is required for each party to compute the pairwise symmetric
  145. key is to know the other party's authenticated public value. Since there
  146. is nothing secret about DH public values, one natural way to discover
  147. the relevant authenticated public value is to distribute these using a
  148. directory service or the Certificate Discovery Protocol [19].
  149.  
  150. This computable shared secret is used as the basis for a key-
  151. encrypting-key to provide IP packet based authentication and encryption.
  152. Thus we call g^ij mod p the long-term secret, and derive from it a key
  153. Kij. Kij is used as the key for a block Symmetric Key CryptoSystem
  154. (SKCS) like DES, RC2, IDEA, and such.
  155.  
  156. Kij is derived from g^ij mod p by taking the low order key-size bits of
  157. g^ij mod p.  Since g^ij mod p should minimally be 512 bits and for
  158. greater security should be 1024 bits or more, we can always derive
  159. enough bits for use as Kij which is a key for a SKCS. SKCS key sizes are
  160.  
  161.  
  162.  
  163. draft-ietf-ipsec-skip-07.txt                        [Page 3]
  164.  
  165.  
  166.  
  167. INTERNET-DRAFT              SKIP             August 14, 1996
  168.  
  169.  
  170.  
  171. typically in the range of 40-256 bits.
  172.  
  173. The important point here is that Kij is an implicit pairwise shared key.
  174. It does not need to be sent in ANY packet or negotiated out-of-band. The
  175. destination IP node can compute this shared key (Kij) simply by knowing
  176. the source IP node's authenticated public value.  Because this key is
  177. implicit, and is used as a master key, its length can be made as long as
  178. desired, without any additional protocol overhead.  Increasing the
  179. length of Kij in combination with a strong cryptosystem, can make
  180. cryptanalysis of Kij arbitrarily difficult.
  181.  
  182. Kij is used to encrypt a transient key, which is called Kp (for packet
  183. key). Kp is then used as a key to encrypt/authenticate an IP packet or a
  184. collection of packets. This is done in order to limit the actual amount
  185. of data encrypted using the long-term key Kij.  Since it is desirable to
  186. keep Kij for a relatively long period of time, the actual IP data
  187. traffic is not encrypted using key Kij. Instead we only encrypt
  188. transient keys in this long-term key, and use the transient keys (Kp) to
  189. encrypt/authenticate IP data traffic. This limits the amount of data
  190. protected using the long-term key to a relatively small amount even over
  191. a long period of time, since keys (Kp) represent a relatively small
  192. amount of data. Because Kij is used to only encrypt other keys, and not
  193. traffic, it is referred to as a master key.
  194.  
  195. [Note: For the sake of simplicity, the key Kp is described in this
  196. section as a packet encryption and/or authentication key.  Actually, Kp
  197. is used to derive two separate keys, one for encryption and another for
  198. authentication. This is further described in section 1.9]
  199.  
  200. The first time a source I, which has a secret value i, needs to
  201. communicate with destination J, which has a public value g^j mod p, it
  202. computes the shared secret g^ij mod p. It then derives from this shared
  203. secret the master key Kij. The source I then generates a random key Kp
  204. and encrypts this key using Kij.  The Kij and Kp keys are used as keys
  205. for a symmetric key algorithm.
  206.  
  207. Note: In order to prepare this packet for transmission to node J, no
  208. communication was necessary with node J. When node J receives this
  209. packet, it also computes the shared secret Kij and caches it for later
  210. use. (In order to do this, if it did not already possess I's
  211. authenticated DH public value, it may have to obtain this from the local
  212. directory service, and check its authenticity.) Using Kij it obtains Kp,
  213. and using Kp it obtains the original IP packet, which it then delivers
  214. to the appropriate handler which is either a local transport entity or
  215. another outbound interface.
  216.  
  217.  
  218.  
  219. draft-ietf-ipsec-skip-07.txt                        [Page 4]
  220.  
  221.  
  222.  
  223. INTERNET-DRAFT              SKIP             August 14, 1996
  224.  
  225.  
  226.  
  227. If the source node (I in this case) changes the packet encryption key
  228. (Kp), the receiving IP node J can discover this fact without having to
  229. perform a public key operation. It uses the cached value Kij to decrypt
  230. the encrypted packet key Kp. Thus, without requiring communication
  231. between transmitting and receiving ends, and without necessitating the
  232. use of a computationally expensive public key operation, the packet
  233. encrypting/authenticating keys can be changed by the transmitting side
  234. and discovered by the receiving side.
  235.  
  236. 1.1  Manual distribution of Kij
  237.  
  238. As an interim measure, in the absence of an authenticated public key
  239. distribution infrastructure, nodes may wish to employ manual
  240. distribution of keying information. To handle such cases, the master key
  241. Kij SHOULD be one of the keys that that are manually established when
  242. SKIP is being used.
  243.  
  244. Since manual re-keying is a slow and awkward process, it still makes
  245. sense to use the two level keying structure, and encrypt the packet
  246. encryption key Kp using the manually established master key Kij. This
  247. has the same benefit as before, namely it avoids over-exposing the
  248. master key, since it is advantageous to maintain the master key over
  249. relatively long periods of time. This is particularly true for high-
  250. speed network links, where it is easy to encrypt large amounts of data
  251. over a short period of time.
  252.  
  253. Because of the separation of master keys (the key Kij) and traffic
  254. encryption keys (packet encryption key Kp), the SKIP scheme makes it
  255. possible to automatically update traffic encryption keys even when
  256. relying on manual master key distribution.
  257.  
  258. 1.2  Zero-Message Master Key Update Algorithm
  259.  
  260. The implicit pairwise master keys in the previous sections can be used
  261. to generate an arbitrary number of implicit master keys, by making the
  262. master keys be a function of a counter, which is denoted as "n". The
  263. counter value n is only incremented and never decremented. It is used to
  264. prevent re-use of compromised traffic authentication keys as well as to
  265. provide coarse-grain playback protection of data traffic. In the event
  266. that a particular traffic authentication key is compromised (for
  267. whatever reason) its re-use is prevented by updating the implicit master
  268. key Kij and by never re-using a master key.
  269.  
  270. This counter can easily be constructed in a stateless manner as the
  271. number of time-units since an agreed upon start time.  The time units
  272.  
  273.  
  274.  
  275. draft-ietf-ipsec-skip-07.txt                        [Page 5]
  276.  
  277.  
  278.  
  279. INTERNET-DRAFT              SKIP             August 14, 1996
  280.  
  281.  
  282.  
  283. can be fairly coarse, such as hours. This only requires loosely
  284. synchronized clocks to within an hour. Such coarse grain synchronization
  285. is required in any case for any scheme that uses public key
  286. certificates, in order to check certificate validity information.
  287. Recommended time units/counter update frequency and the agreed upon
  288. start time is specified later in the document.
  289.  
  290. Once the counter has moved forward, packets encrypted with the help of
  291. counter values that differ by more than 1 from the local n MUST be
  292. rejected.
  293.  
  294. This counter value is passed in the field labeled "n" following the
  295. version and next header fields of the SKIP header, which is described in
  296. section 1.8.
  297.  
  298. The counter n is computed as described in section 5.1.  The n'th master
  299. key is computed using the following functions:
  300.  
  301. Kij' = Low order 256 bits of Kij
  302. Kijn = h(Kij' | n | 01h) | h(Kij' | n | 00h)
  303.  
  304. where h() is a pseudo-random, one-way hash function which is specified
  305. as the key separation part of the Kij Algorithm. For example, if Kij
  306. Algorithm is "DES-CBC, MD5 for key separation", h() is MD5.  The "|"
  307. represents concatenation, and the high order bits are on the left side.
  308. The low order bits of this operation are used for Kijn. The 00h, and 01h
  309. are one byte values containing 0 and 1 respectively. The counter "n"
  310. MUST be in network order for purposes of this computation.
  311.  
  312. When using public key agreement or manual key agreement to establish
  313. Kij, Kij MUST be 256 bits long. This means that if Kij is derived from
  314. g^ij mod p, then the low order 256 bits are used as the input to the
  315. Kijn calculation. When manually establishing Kij, the Kij length MUST be
  316. 256 bits.
  317.  
  318. A pictorial representation of the above operation using MD5 is as follows:
  319.  
  320.   +-----------------+-------------+--+ MD5 hash  +------------------------+
  321.   | Kij (MSB first) | n (32 bits) |00| ========> | Low 128 bits of Kijn   |
  322.   +-----------------+-------------+--+           +------------------------+
  323.  
  324.   +-----------------+-------------+--+ MD5 hash  +------------------------+
  325.   | Kij (MSB first) | n (32 bits) |01| ========> | High 128 bits of Kijn  |
  326.   +-----------------+-------------+--+           +------------------------+
  327.  
  328.  
  329.  
  330.  
  331. draft-ietf-ipsec-skip-07.txt                        [Page 6]
  332.  
  333.  
  334.  
  335. INTERNET-DRAFT              SKIP             August 14, 1996
  336.  
  337.  
  338.  
  339. 1.3  Independence from Cryptographic Algorithms
  340.  
  341. Although the descriptions above have been presented using the
  342. cryptographic constructions of classic Diffie-Hellman (exponentiations
  343. over a prime field) the protocols can be generalized to any public key
  344. agreement system. In this context a public key agreement system is
  345. defined as a system where one combines another's public and one's own
  346. private value to compute a pairwise shared secret. Here we distinguish
  347. between a public key agreement system and a public key cryptosystem
  348. which has the trapdoor property (for example, RSA).
  349.  
  350. Examples of cryptographic constructions, other than exponentiation over
  351. a prime field, that can be used to provide the same public key agreement
  352. property are constructions that employ elliptic curves over finite
  353. fields [17] and schemes that utilize exponentiation using composite
  354. moduli.
  355.  
  356. Essentially, all aspects of the key-management protocol described above
  357. can be generalized to public and private values of the public key
  358. agreement type.
  359.  
  360. The public key agreement algorithm is specified by the algorithm
  361. identifier used to identify the public key in the public key certificate
  362. or equivalent mechanism (e.g. secure DNS).
  363.  
  364.  
  365. 1.4  High Availability and Load Balancing using SKIP
  366.  
  367. Using the SKIP protocol, it is straightforward to construct highly-
  368. available and load-balanced protected IP configurations.
  369.  
  370. To support a redundant configuration, a set of intermediate nodes are
  371. set up to share the same long-term Diffie-Hellman secret/public value
  372. pair. These nodes may all have different IP addresses, as long as the
  373. destination Master Key-ID is the same, since that is what is used to
  374. identify the master keys.  Note: it is far easier and simpler to
  375. configure a set of nodes to share the same long-term secret, than it is
  376. to dynamically share transient session keys between a set of nodes.
  377.  
  378. [The notion of Master Key-IDs, and how they differ from the source and
  379. destination IP addresses, is explained in section 1.7].
  380.  
  381. Once a set of nodes share the same long-term secret, they can act
  382. naturally in a redundant highly available and load balanced
  383. configuration for encrypted/authenticated IP traffic. The standard
  384.  
  385.  
  386.  
  387. draft-ietf-ipsec-skip-07.txt                        [Page 7]
  388.  
  389.  
  390.  
  391. INTERNET-DRAFT              SKIP             August 14, 1996
  392.  
  393.  
  394.  
  395. dynamic IP routing facilities provide for high-availability and load-
  396. balancing. No new protocol is required in order to achieve these goals.
  397. Should one of these intermediate nodes (or their associated network
  398. links) fail, IP will automatically route packets through the remaining
  399. set of nodes, and these re-routed IP packets will remain decryptable by
  400. the other members of the redundant set. There is no limit to the number
  401. of nodes/links that can be configured in such a redundant configuration.
  402.  
  403. 1.5  Intermediate Authentication with End-to-End security using SKIP
  404.  
  405. It is sometimes desirable to authenticate end-to-end protected IP
  406. traffic at an intermediate node [9], e.g. a site firewall. Such
  407. intermediate authentication is typically not practical with conventional
  408. session oriented key-management, since it isn't practical to dynamically
  409. share end-to-end transient session keys with an intermediate node.
  410.  
  411. Using SKIP, intermediate authentication of end-to-end protected IP
  412. traffic MAY be realized, if participating principals can share their
  413. long-term private keys with the intermediate node. This may not be
  414. desirable if the long-term keys belong to individual users, because of
  415. privacy related concerns, but may be acceptable in case the long-term
  416. keys belong to servers on the network, e.g. mail or file servers, etc.
  417.  
  418. Once a long-term key has been shared with an intermediate node, the
  419. intermediate node can authenticate end-to-end protected IP traffic, just
  420. as easily as it can authenticate end-to-intermediate protected IP
  421. traffic. With knowledge of the interior principal's long-term private
  422. key, an intermediate device can recover the packet authentication key,
  423. verify the packet authenticity and, if it verifies, forward the packet
  424. unmodified to its destination.
  425.  
  426. Such a scheme has the benefit of end-to-end encryption/authentication of
  427. IP traffic, while still maintaining cryptographic checks at a security
  428. perimeter defined by the intermediate device (e.g. a site's network
  429. boundary).
  430.  
  431. Note: With knowledge of another principal's long term private key, the
  432. intermediate device is also in a position to decrypt the end-to-end
  433. protected traffic, or forge traffic for principals whose keys it knows.
  434. If this is not desirable, then this kind of long term private key
  435. sharing should not take place, by foregoing either intermediate
  436. authentication or end-to-end protection.
  437.  
  438.  
  439.  
  440.  
  441.  
  442.  
  443. draft-ietf-ipsec-skip-07.txt                        [Page 8]
  444.  
  445.  
  446.  
  447. INTERNET-DRAFT              SKIP             August 14, 1996
  448.  
  449.  
  450.  
  451. 1.6  Attacks that the protocol guards against
  452.  
  453. It is not possible to list all possible attacks on a cryptographic
  454. protocol in a short space. Instead we describe a well known category of
  455. attacks on cryptographic protocols, and show how SKIP defeats those
  456. attacks.
  457.  
  458. 1.6.1  Intruder in the Middle Attacks
  459.  
  460. Unauthenticated Diffie-Hellman is susceptible to an intruder in the
  461. middle attack. To overcome this, authenticated Diffie-Hellman schemes
  462. have been proposed, that include a signature operation with the parties'
  463. private signature keys.
  464.  
  465. SKIP is not susceptible to intruder in the middle types of attacks. This
  466. is because the Diffie-Hellman public parameters are long-term and
  467. authenticated. Intruder in the middle attacks on Diffie-Hellman assume
  468. that the parties cannot determine who the public Diffie-Hellman keys
  469. belong to. Authenticated Diffie-Hellman public values eliminate this
  470. possibility, without requiring any exchange of messages between the two
  471. parties or incurring the computational overhead of large exponent
  472. exponentiations (for example, RSA signatures).
  473.  
  474. 1.6.2  Known Key Attacks
  475.  
  476. If the in-band traffic keys Kp used for packet authentication are ever
  477. compromised, (for whatever reason) then the master key update algorithm
  478. described above precludes the re-use of compromised keys to send forged
  479. traffic.
  480.  
  481. This is because even if a particular traffic key Kp is compromised, this
  482. does not tell an attacker anything about the current implicit key Kijn,
  483. and therefore the attacker would not be able to compute the encryption
  484. of Kp in Kijn.  Without knowing the encryption of Kp under the Kijn, an
  485. attacker cannot re-use past compromised keys Kp to any advantage.
  486.  
  487. Also, even if all the packet encryption/authentication keys (Kp)
  488. encrypted in a given Kijn are compromised, then this doesn't help an
  489. attacker learn any other Kp, since knowing any number of keys Kp does
  490. not allow an attacker to learn Kijn. Knowing or even choosing Kp keys,
  491. and using that to learn Kijn is equivalent to a known or chosen plain-
  492. text attack on a Kijn, and that should be infeasible even given a very
  493. large number of known/chosen Kp keys as long as the key-encryption
  494. algorithm is practically secure against a known/chosen text attack. To
  495. the extent that the key-encryption algorithm is secure against a
  496.  
  497.  
  498.  
  499. draft-ietf-ipsec-skip-07.txt                        [Page 9]
  500.  
  501.  
  502.  
  503. INTERNET-DRAFT              SKIP             August 14, 1996
  504.  
  505.  
  506.  
  507. known/chosen text attack, SKIP is secure against a known/chosen key
  508. attack.
  509.  
  510. 1.6.3  Clogging Defense
  511.  
  512. An attacker may attempt to mount a denial-of-service attack on a node
  513. implementing SKIP, by trying to force it to perform an unacceptably high
  514. number of computationally expensive operations, e.g. the Diffie-Hellman
  515. computation.
  516.  
  517. In order to prevent denial-of-service attacks on the SKIP scheme
  518. described above, a recommended solution is to pre-compute and cache
  519. master keys Kij, based either on usage patterns of the machine or
  520. through administrative action. In case a clogging attack occurs, the IP
  521. node will still be able to communicate with the set of machines for
  522. which it has pre-computed master keys, it will simply stop computing new
  523. master keys. This allows business as usual activities to carry on, even
  524. while a clogging attack occurs, since there are no computationally
  525. expensive (e.g. public key) operations required to key or re-key with an
  526. IP node once the master key Kij has been computed.
  527.  
  528. The keys belonging to administrators SHOULD always be in the pre-compute
  529. cache used to prevent this form of denial-of-service attack. This allows
  530. the administrator to securely add more principals to the pre-compute
  531. cache, even during a clogging attack.
  532.  
  533. 1.7  Naming, Name Spaces and Master Key-IDs
  534.  
  535. SKIP uses two 1 byte fields in the SKIP header, Source Name Space ID
  536. (NSID) and Destination NSID, to indicate that Master Key-IDs will be
  537. used for looking up authenticated public values instead of the source
  538. and/or destination IP addresses. These fields also identify which name
  539. space is being used for Master Key-IDs.
  540.  
  541. [Note: The term Master Key-ID is used instead of certificate ID, since
  542. the SKIP protocol allows manual master key setup. Master Key-ID is a
  543. generic term used to identify a particular Kij, whether it is obtained
  544. manually or through use of certified DH public values.]
  545.  
  546. Master Key-IDs effectively decouple the identification of a master key
  547. for purposes of key lookup and access control from issues of network
  548. topology, routing and IP addresses. As one example, this allows IP nodes
  549. to use different IP addresses for routing and key lookup purposes.
  550.  
  551.  
  552.  
  553.  
  554.  
  555. draft-ietf-ipsec-skip-07.txt                       [Page 10]
  556.  
  557.  
  558.  
  559. INTERNET-DRAFT              SKIP             August 14, 1996
  560.  
  561.  
  562.  
  563. More importantly, it allows non-IP entities, such as individual users,
  564. to be identified using whatever name space is being used for them.
  565.  
  566. SKIP permits multiple name spaces to be used by using the NSID fields in
  567. the SKIP header. The first NSID byte refers to the name space of the
  568. source Master Key-ID, and the second NSID refers to the name space of
  569. the destination Master Key-ID.
  570.  
  571. The length of the Master Key ID is implicit in the choice of the NSID.
  572. There are two commonly used lengths, 32 bits and 128 bits. A 32 bit
  573. Master Key-ID may be used to identify, e.g., IPv4 addresses or
  574. XOPEN/POSIX user ids. A 128 bit Master Key-ID may be used to refer to an
  575. IPv6 address.
  576.  
  577. The usage of NSIDs also allows many different name spaces (up to 255) to
  578. be used with SKIP. One way of deriving the Master Key-ID is to define it
  579. to be the message digest of the name in its native name space. Examples
  580. of name or identifier spaces that can be accommodated in this manner are
  581. DNS names, ISO Distinguished Names, etc. Another way is to use some
  582. unique identifier as the keyid. Examples of this include POSIX/XOPEN
  583. User Ids or 802.x MAC addresses.
  584.  
  585. If the names have associated privacy concerns, then employing the
  586. message digest scheme can potentially protect these sensitive names, due
  587. to the one-way property of a message digest. It is important to note
  588. that this privacy aspect of protecting names using their message-digest
  589. is only possible if the name space is large enough to resist an
  590. exhaustive search attack. If the name space is too small then this
  591. allows an attack which compares all the names in the name space to their
  592. message digests. Names which are sensitive and taken from a small name
  593. space SHOULD NOT be used with this message digest representation.
  594.  
  595. It is also possible for this identifier to be the message digest of a
  596. principal's DH public value, since some principals may wish to be known
  597. by their public values alone.  If the public value is used as an
  598. identification mechanism, it simplifies the distribution of
  599. authenticated public values, since there is an algorithmic and
  600. cryptographic binding between a name and its public value. This is the
  601. same purpose that certificates serve, so this can potentially simplify
  602. the distribution of public values in communities that choose this naming
  603. mechanism, because it eliminates the need for a third party (e.g.
  604. Certifying Authority, secure directory server, trusted introducer, etc.)
  605. to ensure a secure binding between a name and a public value.  The
  606. encoding for unsigned DH public values is beyond the scope of this
  607. document and is defined separately [20].
  608.  
  609.  
  610.  
  611. draft-ietf-ipsec-skip-07.txt                       [Page 11]
  612.  
  613.  
  614.  
  615. INTERNET-DRAFT              SKIP             August 14, 1996
  616.  
  617.  
  618.  
  619. There is a separate NSID byte for source and destination, so it is
  620. possible for entities identified using different name spaces to
  621. communicate as long as the two parties can understand both name spaces.
  622.  
  623. Principals in the network will need to be able to reverse lookup a
  624. certificate (or equivalent information) using the Master Key ID.  There
  625. are no security issues in the binding between a name in its native name
  626. space, and the message digest derived Master Key ID, since there is a
  627. cryptographic binding between two. The collision resistance property of
  628. a message digest function provides this security.  Therefore reverse-
  629. lookup is primarily a database issue, and not a secure binding issue.
  630.  
  631. If an NSID field is zero, then the corresponding Master Key-ID is
  632. absent. In this case, the corresponding Master Key-ID defaults to the
  633. source or destination IPv4 or IPv6 address respectively.
  634.  
  635. Although a Master Key-ID MAY be allocated out of the IPv4/v6 address
  636. spaces, it is never used for IP routing purposes. Instead, it is used as
  637. a semi-permanent identifier for a master key.
  638.  
  639. To illustrate one possible use, this decoupling allows nodes to move
  640. around on the network, and come in from dynamically assigned IP
  641. addresses (using, for example, the Dynamic Host Configuration Protocol
  642. [18]) and still have access control and Diffie-Hellman public value
  643. lookup occur based on the source Master Key-IDs.
  644.  
  645. Still other examples include mobile users, identified in any name space,
  646. who can securely access network data and services from many different IP
  647. nodes. This is because key lookup and access control will be based on
  648. their native names (identified using the Source Master Key-ID), and not
  649. the IP address of the node from which they are performing the network
  650. access. These users may carry around their private keys in smart cards,
  651. or alternatively, these private keys may be distributed over the network
  652. encrypted in a per-user password.  Users may be identified using their
  653. DNS names, POSIX/XOPEN user ids, X.500 Distinguished Names, etc.
  654.  
  655. Similarly Destination Master Key-IDs can serve many purposes as well.
  656. When the Destination Master Key-ID refers to an IP address, it can be
  657. used to pass end-to-end encrypted SKIP packets through an encrypting
  658. intermediate node. Without a destination Master Key-ID, an intermediate
  659. node which is encrypting/decrypting SKIP packets for multiple machines
  660. would have no way of knowing whether a received packet should be
  661. uncompressed/decrypted/authenticated or just forwarded. A destination
  662. Master Key-ID enables an encrypting intermediate node (e.g., router or
  663. firewall) to determine whether to process a packet or simply forward it.
  664.  
  665.  
  666.  
  667. draft-ietf-ipsec-skip-07.txt                       [Page 12]
  668.  
  669.  
  670.  
  671. INTERNET-DRAFT              SKIP             August 14, 1996
  672.  
  673.  
  674.  
  675. The destination Master Key-ID is present when the Destination NSID is
  676. non-zero.
  677.  
  678. On an end node, the Destination Master Key-ID can be used to distinguish
  679. between multiple users on the same IP node.
  680.  
  681. If the Source NSID is non-zero, the source Master Key-ID MUST be used
  682. for public value lookups and the source IP address MUST NOT be used. If
  683. the Destination NSID is non-zero, the destination Master Key-ID MUST be
  684. used for public value lookups and the destination IP address MUST NOT be
  685. used.
  686.  
  687. Note: A node MUST NOT process a packet which has a destination Master
  688. Key-ID that does not match a local Master Key-ID even if the destination
  689. IP address matches.
  690.  
  691. Some commonly used name spaces have been assigned NSIDs. These are
  692. specified in section 4.3 in the "Assigned Numbers" section below. More
  693. name spaces will be registered through Internet Assigned Numbers
  694. Authority (IANA).
  695.  
  696. 1.8  The SKIP Header
  697.  
  698. A SKIP header communicates the in-band keying, algorithms and next
  699. protocol used in the packet. The SKIP header is illustrated below.
  700. Fields are transmitted left to right. All value fields in the SKIP
  701. header are transmitted in network order.
  702.  
  703.  
  704.  
  705.  
  706.  
  707.  
  708.  
  709.  
  710.  
  711.  
  712.  
  713.  
  714.  
  715.  
  716.  
  717.  
  718.  
  719.  
  720.  
  721.  
  722.  
  723. draft-ietf-ipsec-skip-07.txt                       [Page 13]
  724.  
  725.  
  726.  
  727. INTERNET-DRAFT              SKIP             August 14, 1996
  728.  
  729.  
  730.  
  731. SKIP Header
  732.  
  733.     0                   1                   2                   3
  734.     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
  735.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  736.    |  Ver  | Rsvd  | Source NSID   | Dest NSID     | NEXT HEADER   |
  737.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  738.    |                    Counter n                                  |
  739.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  740.    |    Kij Alg    |   Crypt Alg   |  MAC Alg      |  Comp Alg     |
  741.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  742.    |    Kp encrypted in Kijn...          (typically 8-16 bytes)
  743.    +-+-+-+-+-+-+-+-+-+-+-+-+-+
  744.    |    Source Master Key-ID  (If Source NSID is non-zero)
  745.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  746.    |    Destination Master Key-ID (If Dest NSID is non-zero)
  747.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  748.  
  749.  
  750.  
  751. The first field of the SKIP header is the Version (Ver). The protocol
  752. described in this document is 1. The 4 bits following the version are
  753. reserved for future versions of SKIP, and will be set to zero by all
  754. SKIP v1 implementations and ignored. A non-zero Source NSID indicates
  755. that a packet contains a source Master Key-ID. The value of the Source
  756. NSID indicates the name space from which the Master Key-ID is derived. A
  757. non-zero Dest NSID indicates the SKIP header contains a destination
  758. Master Key-ID. The value of the Dest NSID indicates the name space from
  759. which the Master Key-ID is derived.
  760.  
  761. Following the NSID bytes in the SKIP header, the NEXT HEADER field is
  762. used to indicate which protocol follows the SKIP header. This field will
  763. usually indicate ESP or AH. But the NEXT HEADER may be any protocol
  764. which requires keying material. Examples of protocols other than AH/ESP
  765. that may use SKIP are given later.
  766.  
  767. The "Counter n" field is a 32 bit field which is used for coarse grain
  768. playback protection and to prevent compromised key re-use.
  769.  
  770. The 1 byte field, Kij algorithm identifies the algorithms used to
  771. encrypt Kp and the key separation algorithm. These algorithms always
  772. take the low order bits of DH shared secret as the key to
  773. encrypt/decrypt Kp.
  774.  
  775.  
  776.  
  777.  
  778.  
  779. draft-ietf-ipsec-skip-07.txt                       [Page 14]
  780.  
  781.  
  782.  
  783. INTERNET-DRAFT              SKIP             August 14, 1996
  784.  
  785.  
  786.  
  787. The Kij algorithm MUST specify both the encryption and separation
  788. algorithms.  The key encryption algorithm must be a block cipher
  789. algorithm used in CBC mode to encrypt Kp (which is a variable number of
  790. bits) . The IV for the CBC mode encryption MUST always be set to all
  791. zeros (IV=0). So, e.g., for 64-bit IV algorithms, such as DES-CBC, the
  792. IV is 64 bits of zero (0).
  793.  
  794. The input to the key encryption algorithm is padded with a random fill
  795. up to a multiple of the block size of the key-encryption algorithm. The
  796. length of Kp is derived from knowledge of the encryption/MAC algorithms.
  797. The low order key-length bits of the decrypted output are used as Kp.
  798.  
  799. The key separation algorithm is generally a cryptographic hash function
  800. used to generate the master key and to split kp into encryption and
  801. authentication keys.
  802.  
  803. The Crypt Alg and MAC Alg specify algorithms used by the interior
  804. protocol for encryption and authentication. These algorithms are
  805. specific to the protocol which will use them and the transforms it
  806. specifies.  In general, the MAC Alg specifies the algorithm used to
  807. calculate a MAC and the Crypt Alg specifies the algorithm used to
  808. encrypt the packet.  This is not an absolute, however. For instance, it
  809. is possible to have a Crypt Alg which provides both encryption and MAC
  810. computation.
  811.  
  812. The Comp Alg field specifies the algorithm that was used to compress
  813. packets prior to encryption/authentication. A non-zero Comp Alg field
  814. indicates that compression was performed on the plaintext, prior to
  815. encryption/authentication. The value of the Comp Alg field indicates the
  816. compression algorithm that was employed.
  817.  
  818. The values for the algorithm fields will be described later in this
  819. document.
  820.  
  821. The field "Kp Encrypted in Kijn" is the encrypted Kp which has been
  822. encrypted with Kijn using the Kij algorithm.
  823.  
  824. The source Master Key-ID field contains the Master Key-ID of the sender.
  825. This field is only present if the Source NSID is non-zero.
  826.  
  827. The destination Master Key-ID field contains the Master Key-ID of the
  828. intended SKIP receiver. This field is only present if the Dest NSID is
  829. non-zero.
  830.  
  831.  
  832.  
  833.  
  834.  
  835. draft-ietf-ipsec-skip-07.txt                       [Page 15]
  836.  
  837.  
  838.  
  839. INTERNET-DRAFT              SKIP             August 14, 1996
  840.  
  841.  
  842.  
  843. In a specific use of the SKIP header, a field may not be relevant, and
  844. its value will be denoted as RESERVED. All RESERVED fields MUST be set
  845. to zero in the SKIP header and ignored.
  846.  
  847. 1.9  Deriving Keys for Packet Encryption and Authentication
  848.  
  849. In general, packets may be both encrypted and authenticated. An
  850. important issue when performing both authentication and encryption is
  851. key separation. Conforming SKIP implementations MUST derive
  852. authentication and encryption keys originating via SKIP in the manner
  853. specified below.
  854.  
  855. The Kp that is decrypted from the packet header is not used directly to
  856. encrypt/decrypt or authenticate the packet. Rather, it is used to derive
  857. two separate keys named E_kp and A_kp, where A_kp is used as the
  858. authentication key and E_kp is used as the encryption key.  E_kp and
  859. A_kp are related to the Kp decrypted from the packet header as follows:
  860.  
  861. E_kp = h(Kp | Crypt Alg | 02h) | h(Kp | Crypt Alg | 00h)
  862.  
  863. A_kp = h(Kp | MAC Alg | 03h) | h(Kp | MAC Alg| 01h)
  864.  
  865.  
  866. where h() is a pseudo-random, one-way hash function which is specified
  867. as the key separation part of the Kij Algorithm. For example, if Kij
  868. Algorithm is "DES-CBC, MD5 for key separation", h() is MD5.  The "|"
  869. above specifies concatenation, in the same manner as described in
  870. section 1.2 above. Crypt Alg and MAC Alg are the 1 byte fields from the
  871. SKIP header.  The construction above has the property that knowing
  872. either one of E_kp or A_kp does not compromise any information about the
  873. other key, because of the one-way property of h(). This allows, e.g.,
  874. weak encryption keys to be used with strong authentication keys. Should
  875. E_kp be compromised, nothing at all is revealed about A_kp, and vice
  876. versa.
  877.  
  878. The actual number of key bits used is algorithm dependent.  If the
  879. algorithms require less than 256 bits, then the low order key-size bits
  880. of the output of the pseudo-random one-way functions are used as the
  881. actual keys. If less than 128 bits of encryption key is required, then
  882. only the MD5(Kp | Crypt Alg| 00h) function needs to be computed, because
  883. this provides the low order 128 bits of E_kp.  Similarly, if only 128
  884. bits or less are required for the authentication key A_kp, only the
  885. MD5(Kp | MAC Alg | 01h) function needs to be computed.
  886.  
  887.  
  888.  
  889.  
  890.  
  891. draft-ietf-ipsec-skip-07.txt                       [Page 16]
  892.  
  893.  
  894.  
  895. INTERNET-DRAFT              SKIP             August 14, 1996
  896.  
  897.  
  898.  
  899. When using MD5, the function specified above provides a total of 256
  900. bits, which is a sufficient number of key bits for the expected
  901. encryption and authentication algorithms that will be used with SKIP.
  902.  
  903. An implementation will use the maximum of the key-lengths indicated by
  904. Crypt Alg and MAC Alg when determining the length of the actual Kp that
  905. will be decrypted from the SKIP header. For example, if Crypt Alg
  906. specifies a 64-bit encryption key length, the MAC algorithm specifies a
  907. 128-bit authentication key length, then the length of Kp will be 128
  908. bits.  This 128-bit Kp will be input to the functions specified above to
  909. generate E_kp, which will be low-order 64-bits of the E_kp function, and
  910. A_kp, which will be low-order 128 bits of the A_kp function.
  911.  
  912. The length of the Encrypted Kp in the packet header is derived from the
  913. length of Kp and the key encryption algorithm, as indicated by Kij Alg.
  914. For example, if the length of Kp as discussed above turns out to be,
  915. say, 120 bits, and the key encryption algorithm (as specified by Kij
  916. Alg) is a 64-bit block cipher, then the length of the encrypted Kp in
  917. the SKIP header will be 128 bits, of which the upper 8 bits will be
  918. random fill. The random fill bits MUST be treated as zero for the E_kp
  919. and A_kp computation functions. In the example given above, the Kp input
  920. to the E_kp and A_kp functions would be 128 bits, with upper 8 bits set
  921. to zero.
  922.  
  923. Implementation Note: It is not necessary to perform a complicated set of
  924. conditional rules in order to determine the length of the encrypted Kp
  925. in an implementation of SKIP. A fast and simple way of doing this is to
  926. have a table indexed by the algorithm number, which produces the key
  927. lengths required for that algorithm. Since this table will be small
  928. enough to fit in most caches, this can result in a fast way to determine
  929. the appropriate encrypted key length in order to perform SKIP header
  930. decoding.
  931.  
  932. The key separation function described above is ALWAYS used, irrespective
  933. of whether only one or the other of authentication or encryption is
  934. being performed. Namely, even if encryption is being done in the absence
  935. of authentication or authentication is being done in the absence of
  936. encryption, the keys used for encryption and/or authentication MUST be
  937. derived separately as specified above. Kp is NEVER used directly to
  938. authenticate or encrypt traffic.
  939.  
  940.  
  941.  
  942.  
  943.  
  944.  
  945.  
  946.  
  947. draft-ietf-ipsec-skip-07.txt                       [Page 17]
  948.  
  949.  
  950.  
  951. INTERNET-DRAFT              SKIP             August 14, 1996
  952.  
  953.  
  954.  
  955. 1.10  SKIP for Authentication
  956.  
  957. This section describes how SKIP compliant implementations use SKIP
  958. originated keys to achieve packet authentication.
  959.  
  960. In order to achieve authentication in the absence of privacy, SKIP
  961. compliant implementations use the key A_kp to compute a Message
  962. Authentication Code (MAC) over the packet and invariant clear header
  963. fields. The term "MAC" is synonymous with the term "Authentication Data"
  964. in RFC 1826.
  965.  
  966. The MAC Alg field in the SKIP header MUST be used to lookup a specific
  967. authentication transform. The key A_kp is used as a key to compute a MAC
  968. using, for example, Keyed MD5. The MAC is inserted into the encapsulated
  969. protocol in whatever way the encapsulated protocol defines.
  970.  
  971. As always, Kij Alg identifies the encryption algorithm used to encrypt
  972. Kp.
  973.  
  974. 1.10.1  Scope of MAC computation
  975.  
  976. All non-reserved SKIP header fields MUST be included in the IP
  977. Authentication Header's calculation of Authentication Data.  The
  978. RESERVED fields in the SKIP header are zeroed for the purpose of IP
  979. Authentication Header's Authentication Data calculation.
  980.  
  981. 1.11  SKIP for Encryption
  982.  
  983. When SKIP is used to supply keying material for encryption only, the
  984. Crypt Alg indicates the packet encryption algorithm. E_kp is used as a
  985. key to the Crypt Alg. The Crypt Alg will be mapped to standard
  986. transforms such as [15]. These transforms will also contain information
  987. such as Initialization Vectors (IVs) or Message Indicators (MIs).
  988.  
  989. As always, Kij Alg identifies the encryption algorithm used to encrypt
  990. Kp.
  991.  
  992. 1.12  SKIP with combined transforms
  993.  
  994. For transforms which combine encryption and authentication such as ESP
  995. using Keyed MD5 with DES-CBC, only an one header, ESP in this case,  is
  996. needed.  The Crypt Alg in the SKIP header will indicate the transform
  997. and A_kp would be used for authentication and the E_kp (as discussed in
  998. section 1.9) would be used for encryption. The MAC Alg field MUST
  999. contain the same value as the Crypt Alg field, since this would be a
  1000.  
  1001.  
  1002.  
  1003. draft-ietf-ipsec-skip-07.txt                       [Page 18]
  1004.  
  1005.  
  1006.  
  1007. INTERNET-DRAFT              SKIP             August 14, 1996
  1008.  
  1009.  
  1010.  
  1011. combined authentication/encryption transform.
  1012.  
  1013. 1.13  Generic use of SKIP header
  1014.  
  1015. The SKIP header may be used for any protocol which requires keying
  1016. material. The next header in the SKIP header would specify this
  1017. protocol. A protocol being encapsulated SHOULD have a reserved value
  1018. which indicates that the keying material to be used is in the SKIP
  1019. header. An example of this kind of reserved value is SKIP_SPI which is
  1020. used by the AH and ESP protocols. The protocol will define how the
  1021. Crypt, MAC and Compression algorithms will be used. Kijn will be used to
  1022. encrypt Kp.
  1023.  
  1024.  
  1025. 2.  Security Considerations
  1026.  
  1027. 2.1  Generating Random Keys
  1028.  
  1029. One of the most important considerations in a software only
  1030. implementation of SKIP is to design an unpredictable pseudo-random
  1031. number generation procedure. Weak and unpredictable sources of random
  1032. number generation would be catastrophic to the security of SKIP or
  1033. indeed any scheme that implements cryptography, no matter what the
  1034. length of key and choice of encryption algorithm might be.
  1035.  
  1036. In particular, common mistakes that MUST be avoided in implementing this
  1037. unpredictable random number generator is to use values like the current
  1038. process id, the host id or ethernet address, the current time of day or
  1039. some simple combination of these as the sole input to generate a
  1040. cryptographic key. These values are really not all that unpredictable.
  1041.  
  1042. It must be ensured that there are at least as many truly random bits
  1043. used in the key production phase as are specified in the chosen key
  1044. length for that algorithm. None of these commonly used sources by
  1045. themselves provide sufficiently many random bits for commonly used
  1046. cryptographic algorithms.
  1047.  
  1048. For more information on the subject of generating random keys, RFC 1750
  1049. [12] is recommended reading.
  1050.  
  1051.  
  1052.  
  1053.  
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059. draft-ietf-ipsec-skip-07.txt                       [Page 19]
  1060.  
  1061.  
  1062.  
  1063. INTERNET-DRAFT              SKIP             August 14, 1996
  1064.  
  1065.  
  1066.  
  1067. 2.2  Key Update
  1068.  
  1069. The best way to frustrate cryptanalysis of encryption and authentication
  1070. keys is to periodically update the key used to encrypt or authenticate
  1071. packets. Whereas the exact frequency with which keys are updated SHOULD
  1072. be configurable based on site policies, some recommended parameters are
  1073. provided.
  1074.  
  1075. The traffic encryption/authentication key SHOULD be updated for every 10
  1076. Mbytes of protected traffic, or once every 2 minutes, which ever one
  1077. results in a more frequent update policy.
  1078.  
  1079. The traffic encryption/authentication key (derived using Kp) MUST be
  1080. updated every time a Kijn is updated. In addition, in case multiple
  1081. Kijn's exist on a given node, then Kp MUST NOT be shared among different
  1082. Kijns. Kp MUST be randomly generated for each end destination, and for
  1083. different principals on the same node.
  1084.  
  1085. 2.3  Choosing Key Strengths
  1086.  
  1087. When implementing different key-encryption, traffic encryption, and
  1088. key-agreement algorithms, a consistent set of key strengths MUST be
  1089. chosen. This means that if a traffic key is, say 128 bits strength, then
  1090. the key encryption key MUST be of strength 128-bits or greater. It isn't
  1091. sensible to choose strong traffic protection algorithms and then encrypt
  1092. the keys using weaker algorithms.
  1093.  
  1094. Similarly, when using 128-bit symmetric keys, the modulus lengths for
  1095. classic Diffie-Hellman (used to derive the master keys) MUST be 1024
  1096. bits or greater. The exponent size for classic Diffie-Hellman for
  1097. symmetric master key sizes of 128 bits MUST be 256 bits or greater.
  1098.  
  1099. Also, when a keyed hash is used, then the key-encryption algorithms
  1100. SHOULD have strength equal to or greater than the size of the resulting
  1101. hash.  For interoperability purposes, use of Algorithm #2 (3 key triple
  1102. DES-EDE-CBC with MD5 for key separation) is deemed mandatory to
  1103. implement for key encryption (Kij Alg), when implementing authentication
  1104. or any 128-bit strength traffic encryption algorithm (e.g. 2 or 3 key
  1105. triple DES or IDEA).
  1106.  
  1107.  
  1108.  
  1109.  
  1110.  
  1111.  
  1112.  
  1113.  
  1114.  
  1115. draft-ietf-ipsec-skip-07.txt                       [Page 20]
  1116.  
  1117.  
  1118.  
  1119. INTERNET-DRAFT              SKIP             August 14, 1996
  1120.  
  1121.  
  1122.  
  1123. 2.4  Forward Secrecy
  1124.  
  1125. Perfect forward secrecy as described in [3] is not addressed by the base
  1126. protocol described in this document. The protocol as described has a
  1127. small amount of bilateral state. The risk of compromise of past
  1128. encrypted traffic due to future compromise of long-term keying material
  1129. may be minimized by minimizing the longevity of any particular master
  1130. key. Future extensions to the base SKIP protocol may address forward
  1131. secrecy by either having short lived certified DH public values, or by
  1132. introducing an ephemeral DH component into the master key computation.
  1133. Doing the latter would introduce greater bilateral state and overhead
  1134. than is in the base SKIP protocol.
  1135.  
  1136.  
  1137. 3.  Informational Section
  1138.  
  1139. This section gives examples of how SKIP is used with various IP security
  1140. encapsulation protocols such as AH and ESP.
  1141.  
  1142. 3.1  SKIP with AH
  1143.  
  1144. The AH Protocol [9] is used to provide authentication for IP datagrams.
  1145. The SKIP header precedes the AH header and follows the IP header as
  1146. shown below:
  1147.  
  1148.     +-------------+----------+----------+-------------------------------+
  1149.     | IPv4 Header | SKIP Hdr | Auth Hdr |Inner Protocol(e.g.IP, TCP,UDP)|
  1150.     +-------------+----------+----------+-------------------------------+
  1151.  
  1152.                       IPv4 with SKIP/AH Example
  1153.  
  1154.  
  1155.  
  1156.  
  1157.  
  1158.  
  1159.  
  1160.  
  1161.  
  1162.  
  1163.  
  1164.  
  1165.  
  1166.  
  1167.  
  1168.  
  1169.  
  1170.  
  1171. draft-ietf-ipsec-skip-07.txt                       [Page 21]
  1172.  
  1173.  
  1174.  
  1175. INTERNET-DRAFT              SKIP             August 14, 1996
  1176.  
  1177.  
  1178.  
  1179. The detailed protocol encoding for SKIP followed by an AH header is
  1180. shown below.
  1181.  
  1182.     0                   1                   2                   3
  1183.     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
  1184.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1185.    |    Clear IP Header  protocol = SKIP... (typically 20-bytes)
  1186.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  ---
  1187.    |  Ver  | Rsvd. | Source NSID   | Dest NSID     |NEXT HEADER=AH |   |
  1188.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   |
  1189.    |                    Counter n                                  |
  1190.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ SKIP hdr
  1191.    |    Kij Alg    |   RESERVED    |  MAC Alg      |  Comp Alg     |
  1192.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   |
  1193.    |    Kp encrypted in Kijn...          (typically 8-16 bytes)        |
  1194.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  ---
  1195.    | Next Header   | Length        |           RESERVED            |   |
  1196.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1197.    |                       SKIP_SPI                                |  AH
  1198.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1199.    |  Authentication Data computed using A_kp (variable Length     |   |
  1200.    +---------------+---------------+                                  ---
  1201.  
  1202.  
  1203. The SPI field in the AH header is filled with SKIP_SPI to indicate that
  1204. keying material and algorithm information is present in the preceding
  1205. SKIP header. The authentication data and location of the computed MAC is
  1206. defined by the specific transforms. See, e.g., RFC 1828 [14], as an
  1207. example of an authentication transform.
  1208.  
  1209. 3.2  SKIP with ESP
  1210.  
  1211. An example of use of SKIP for encryption is SKIP combined with the ESP
  1212. protocol [10]. The ESP protocol can be used to provide confidentiality
  1213. of entire IP datagrams or the payload of IP datagrams, depending on
  1214. whether ESP is operating in tunnel or transport mode respectively. The
  1215. SKIP header follows the IP header and precedes the ESP header as shown
  1216. below:
  1217.  
  1218.     +-------------+----------+----------+-------------------------------+
  1219.     | IPv4 Header | SKIP Hdr | ESP Hdr  |Inner Protocol (e.g.IP,TCP,UDP)|
  1220.     +-------------+----------+----------+-------------------------------+
  1221.  
  1222.                       IPv4 with SKIP/ESP Example
  1223.  
  1224.  
  1225.  
  1226.  
  1227. draft-ietf-ipsec-skip-07.txt                       [Page 22]
  1228.  
  1229.  
  1230.  
  1231. INTERNET-DRAFT              SKIP             August 14, 1996
  1232.  
  1233.  
  1234.  
  1235. The detailed protocol encoding of SKIP combined with ESP is illustrated
  1236. below:
  1237.  
  1238.     0                   1                   2                   3
  1239.     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
  1240.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1241.    |    Clear IP Header  protocol = SKIP... (typically 20-bytes)
  1242.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  ---
  1243.    |  Ver  | Rsvd. | Source NSID   | Dest NSID     |NEXT HEADER=ESP|   |
  1244.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   |
  1245.    |                    Counter n                                  |
  1246.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ SKIP Hdr
  1247.    |    Kij Alg    |   Crypt Alg   |  RESERVED     |  Comp Alg     |
  1248.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+   |
  1249.    |    Kp encrypted in Kijn...          (typically 8-16 bytes)        |
  1250.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  ---
  1251.    |                    SPI=SKIP_SPI                               |   |
  1252.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  ESP Hdr
  1253.    |            Opaque Transform Data, variable Length             |   |
  1254.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  ---
  1255.  
  1256.  
  1257. The reserved SPI SKIP_SPI in the ESP header indicates that algorithm
  1258. information and keying material is contained in the preceding SKIP
  1259. header.  We assume that this reserved SPI has been assigned symbolic
  1260. value SKIP_SPI.  The SKIP_SPI value is specified later in this document.
  1261. The Source and Dest NSIDs are assumed to be zero, meaning that Master
  1262. Key-IDs are absent.
  1263.  
  1264. The Opaque transform data is defined by the particular transform (such
  1265. as DES-CBC in RFC 1829). This data will normally contain the encrypted
  1266. data and transform specific information such as the IV.
  1267.  
  1268. Kij Alg identifies the encryption algorithm used to encrypt Kp. Kp is
  1269. used to derive the key E_kp (as specified above) which is used to
  1270. encrypt the payload.
  1271.  
  1272. 3.3  SKIP with AH and ESP
  1273.  
  1274. SKIP can be used with combined AH/ESP modes. The Next protocol field in
  1275. the SKIP header would be AH and the Next protocol field in AH header
  1276. would ESP.
  1277.  
  1278.  
  1279.  
  1280.  
  1281.  
  1282.  
  1283. draft-ietf-ipsec-skip-07.txt                       [Page 23]
  1284.  
  1285.  
  1286.  
  1287. INTERNET-DRAFT              SKIP             August 14, 1996
  1288.  
  1289.  
  1290.  
  1291.   +----------+----------+----------+---------+------------------------------+
  1292.   | IPv4 Hdr | SKIP Hdr | Auth Hdr | ESP Hdr |Inner Protocol(e.g.IP,TCP,UDP)|
  1293.   +----------+----------+----------+---------+------------------------------+
  1294.  
  1295.                       IPv4 with SKIP/AH/ESP Example
  1296.  
  1297. A_Kp would be used for authentication and E_kp (as discussed in section
  1298. 1.9) would be used for encryption.
  1299.  
  1300. The following is an example of SKIP with AH and ESP. In Addition, the
  1301. use of Master Key-ID's is also demonstrated.
  1302.  
  1303. SKIP Header
  1304.  
  1305.     0                   1                   2                   3
  1306.     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
  1307.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1308.    |    Clear IP Header  protocol = SKIP... (typically 20-bytes)
  1309.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ---
  1310.    |  Ver  | Rsvd. | Source NSID   | Dest NSID     |NEXT HEADER=AH |  |
  1311.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  |
  1312.    |                    Counter n                                  |  |
  1313.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  |
  1314.    |    Kij Alg    |   Crypt Alg    |  MAC ALG      |  Comp Alg    |
  1315.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ SKIP Hdr
  1316.    |    Kp encrypted in Kijn...          (typically 8-16 bytes)
  1317.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  |
  1318.    |    Source Master Key-ID                                          |
  1319.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+  |
  1320.    |    Destination Master Key-ID                                     |
  1321.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ---
  1322.    | Next=ESP      | Length        |           RESERVED            |  |
  1323.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1324.    |                           SKIP_SPI                            | Auth Hdr
  1325.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1326.    |            Variable Length AH MAC, computed using A_kp           |
  1327.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                     ---
  1328.    |                            SKIP_SPI                              |
  1329.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ESP Hdr
  1330.    |    ESP transform data (e.g. IV), payload encrypted using E_kp |  |
  1331.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                                   ---
  1332.  
  1333.  
  1334.  
  1335.  
  1336.  
  1337.  
  1338.  
  1339. draft-ietf-ipsec-skip-07.txt                       [Page 24]
  1340.  
  1341.  
  1342.  
  1343. INTERNET-DRAFT              SKIP             August 14, 1996
  1344.  
  1345.  
  1346.  
  1347. 4.  Assigned Numbers
  1348.  
  1349. 4.1  SKIP protocol number
  1350.  
  1351. SKIP has been assigned the protocol number 57 by the Internet Assigned
  1352. Numbers Authority (IANA). This is what will be in the "protocol" field
  1353. in the IP header, when the SKIP header follows the IP header.
  1354.  
  1355. 4.2  SKIP SPI value
  1356.  
  1357. For use with the AH & ESP protocols, the value of 1 has been assigned by
  1358. IANA for use with SKIP. Therefore SKIP_SPI as used in earlier sections
  1359. should be treated as equal to 1.  This will be the value used in the SPI
  1360. fields of the AH & ESP protocols.
  1361.  
  1362. 4.3  Name Space Identifier (NSID) Assignments
  1363.  
  1364. Some of the name spaces that may be used with SKIP are assigned
  1365. identifiers here. Other name space identifiers will be assigned by IANA.
  1366.  
  1367.  
  1368.          NSID Value              Name Space              Master Key ID length
  1369.  
  1370.            1                     IPv4 Address Space              32-bits
  1371.            2                     POSIX/XOPEN User Ids            32-bits
  1372.            3                     IPv6 Address Space             128-bits
  1373.            4                     MD5 of DNS Names               128-bits
  1374.            5                     MD5 of ISO DN ASN.1 encoding   128-bits
  1375.            6                     MD5 of Arbitrary ASCII string  128-bits
  1376.            7                     802.x MAC Address               48-bits
  1377.            8                     MD5 of Principal's DH Pub Val  128-bits
  1378.            9                     MD5 of RFC-822 Mailbox Address 128-bits
  1379.            10                    MD5 of Bank Account #          128-bits
  1380.            11                    MD5 of NIS Name                128-bits
  1381.  
  1382.  
  1383. NSID values 1 through 11 are assigned as is described above.  NSID
  1384. values 12 through 249 inclusive are reserved to IANA for future
  1385. allocation as Assigned Numbers. Such future allocation by IANA will
  1386. normally require that a public specification exist for the Name Space
  1387. obtaining such allocation. NSIDs in the range 250 through 255 inclusive
  1388. are reserved for private use among consenting parties.  NSIDs in the
  1389. range 250 through 255 inclusive will hence only have local uniqueness
  1390. properties.
  1391.  
  1392.  
  1393.  
  1394.  
  1395. draft-ietf-ipsec-skip-07.txt                       [Page 25]
  1396.  
  1397.  
  1398.  
  1399. INTERNET-DRAFT              SKIP             August 14, 1996
  1400.  
  1401.  
  1402.  
  1403. 4.4  Assigned Algorithm Numbers
  1404.  
  1405. SKIP uses the following algorithms identifiers. Algorithm and type
  1406. identifiers are specified for each place in the protocol where algorithm
  1407. or type indicators are needed.
  1408.  
  1409. These fall into four categories. Algorithms for key-encryption (Kij
  1410. Alg), traffic encryption (Crypt Alg), traffic authentication (MAC Alg),
  1411. and traffic compression (Comp. Alg).
  1412.  
  1413. Key-Encryption Algorithms (Kij Alg)
  1414.  
  1415. 1       DES-CBC         (64 bit IV = 0, random fill up to multiple of 64-bits)
  1416.                         MD5 for Key separation
  1417.  
  1418. 2       3 key Triple DES-EDE-CBC (64 bit IV = 0, random fill upto multiple
  1419.                                         of 64-bits)
  1420.                         MD5 for key separation
  1421.  
  1422. 3       IDEA-CBC        (64 bit IV = 0, random fill up to multiple of 64-bits)
  1423.                         MD5 for key separation
  1424.  
  1425. Traffic Encryption Algorithms (Crypt Alg)
  1426.  
  1427. 1       DES-CBC         (specified in RFC 1829, 64 bit IV)
  1428. 2       3 key (k1, k2, k3) Triple DES (EDE-CBC) (specified in RFC 1851,
  1429.                                                  64 bit IV)
  1430.  
  1431. MAC Algorithms (MAC Alg)
  1432.  
  1433. 1       128-bit Keyed MD5       (RFC 1828)
  1434. 2       DES-CBC MAC
  1435. 3       Keyed SHA               (RFC 1852)
  1436.  
  1437. Compression Algorithms (Comp Alg)
  1438.  
  1439.         Reserved to IANA
  1440.  
  1441.  
  1442. IANA will assign the range 10-250 for the algorithm identifiers above.
  1443. The range 250-255 will remain reserved for use with proprietary
  1444. algorithms and will not be assigned by IANA. These values will only have
  1445. local uniqueness properties.
  1446.  
  1447.  
  1448.  
  1449.  
  1450.  
  1451. draft-ietf-ipsec-skip-07.txt                       [Page 26]
  1452.  
  1453.  
  1454.  
  1455. INTERNET-DRAFT              SKIP             August 14, 1996
  1456.  
  1457.  
  1458.  
  1459. 5.  Recommended Parameters and Implementation Notes
  1460.  
  1461. 5.1  n Update Frequency
  1462.  
  1463. Updating the counter "n" updates the master key.  For interoperability,
  1464. a standard start time and n update frequency are specified here. As
  1465. noted above, this prevents reuse of compromised packet authentication
  1466. keys.
  1467.  
  1468. The start time for computing "n" is Jan 1, 1995 00:00:00 UTC. The time
  1469. units of n are hours since this start time. Therefore the "n" counter is
  1470. incremented once every hour.
  1471.  
  1472. Symbolically, n is computed locally as
  1473.  
  1474. local n = (current time) - (start time) normalized to hours
  1475.  
  1476. A sending node uses the above method to compute (and update) n, and
  1477. using this value of n it computes the Kijn value, as specified in
  1478. section 1.2 above. A receiving node will independently compute n, and
  1479. check this against the value of n in the received SKIP header. If they
  1480. do not differ by more than 1, the packet is accepted.  If they differ by
  1481. more than 1, the packet MUST be rejected, as this may be an attempt to
  1482. reuse a past compromised authentication key.
  1483.  
  1484. Since n is a 32 bit quantity, there is no practical danger of overflow
  1485. of n, and hence there is no need to ever reset n. n is a monotonically
  1486. increasing number, even across certificate updates.
  1487.  
  1488. Note that this doesn't require the use of fine-grain synchronized clocks
  1489. or a secure clock synchronization protocol. Nodes should by default have
  1490. clocks synchronized within an hour of each other.  If they are not
  1491. synchronized even in this coarse-grain manner, then validating
  1492. certificates and CRLs becomes problematic.
  1493.  
  1494. 5.2  SKIP with the Certificate Discovery Protocol
  1495.  
  1496. The Certificate Discovery Protocol [19] may be used to exchange SKIP
  1497. certificates.  The Name field in the Name Record of Certificate
  1498. Discovery Protocol is the concatenation of the NSID and MKID values,
  1499. respectively.  For example, for NSID=01, MKID=7f000001, the name would
  1500. be 017f000001.
  1501.  
  1502.  
  1503.  
  1504.  
  1505.  
  1506.  
  1507. draft-ietf-ipsec-skip-07.txt                       [Page 27]
  1508.  
  1509.  
  1510.  
  1511. INTERNET-DRAFT              SKIP             August 14, 1996
  1512.  
  1513.  
  1514.  
  1515. 5.3  Recommended g & p values
  1516.  
  1517. For interoperability, the values g and p in g^i mod p are specified
  1518. here, for various modulus lengths.
  1519.  
  1520. 5.3.1  Prime generation method
  1521.  
  1522. The primes given below were generated using the following algorithm.
  1523. The prime generation method is given so it is possible to independently
  1524. verify how the primes were generated.
  1525.  
  1526. The prime generator is based on SHA.1, the FIPS 180.1 secure hash
  1527. algorithm.  This takes the given seed as input and produces a 160-bit
  1528. output sequence in 20 bytes.  These bytes are taken as a big-endian
  1529. number to produce a number n0 from 0 to 2^160-1.
  1530.  
  1531. (I.e. n0 = 2^152 * byte0 + 2^144 * byte1 + ... + 2^8 * byte19 + byte20.)
  1532.  
  1533. Then, the seed is incremented, as a big-endian array of bytes, modulo
  1534. its size (i.e. the last byte is incremented, propagating carry if
  1535. necessary), and hashed again to produce n1, then n2, etc.
  1536.  
  1537. A number of arbitrary size may be constructed by concatenating N = n0 +
  1538. 2^160 * n1 + 2^320 * n2 + ....  To get a number no larger than 2^k, take
  1539. the low-order k bits of N, N mod 2^k.  Obviously, if k is 1024, it is
  1540. only necessary to compute n0 through n6.
  1541.  
  1542. To generate a k-bit prime p (2^k > p >= 2^(k-1)), take t = N mod 2^(k-
  1543. 2), i.e. a number with at most k-2 significant bits.  Then add 2^(k-1),
  1544. to force the number into the desired range, and 2^(k-2), to force it
  1545. into the high half of the range.  This extra refinement makes an attack
  1546. more expensive, without affecting the time required to do computations
  1547. mod p.  Additional high-order 1 bits could be forced, but the
  1548. incremental benefit rapidly diminishes.
  1549.  
  1550. The resultant number t is used as the starting point in a search for a
  1551. suitable prime p.  p is chosen to be the first number >= t such that p
  1552. is prime and (p-1)/2 is prime.
  1553.  
  1554. Because SHA.1 is a cryptographic hash, it is computationally infeasible
  1555. to find an input which has a given output.  Indeed, there is no known
  1556. technique better than brute-force search to find an input which produces
  1557. an output with any special properties.  Assuming that there is an
  1558. unknown class of primes which are easy to solve the discrete logarithm
  1559. problem for, this ensures that the chance of choosing a prime p which is
  1560.  
  1561.  
  1562.  
  1563. draft-ietf-ipsec-skip-07.txt                       [Page 28]
  1564.  
  1565.  
  1566.  
  1567. INTERNET-DRAFT              SKIP             August 14, 1996
  1568.  
  1569.  
  1570.  
  1571. a member of that class is no better than random chance, regardless of
  1572. malice on the part of the party generating the prime.
  1573.  
  1574. The seed chosen is arbitrary, so was chosen for aesthetic reasons.  It
  1575. is the 79 bytes of the ASCII representation of a quote by Gandhi:
  1576.  
  1577. "Whatever you do will be insignificant, but it is very important that
  1578. you do it."
  1579.  
  1580. 5.3.2  Diffie-Hellman Parameters for 1024 bits Modulus
  1581.  
  1582.  
  1583. Base (g):
  1584.         0x02
  1585.  
  1586. Modulus (p) (MSB first):
  1587.         0xF4, 0x88, 0xFD, 0x58, 0x4E, 0x49, 0xDB, 0xCD,
  1588.         0x20, 0xB4, 0x9D, 0xE4, 0x91, 0x07, 0x36, 0x6B,
  1589.         0x33, 0x6C, 0x38, 0x0D, 0x45, 0x1D, 0x0F, 0x7C,
  1590.         0x88, 0xB3, 0x1C, 0x7C, 0x5B, 0x2D, 0x8E, 0xF6,
  1591.         0xF3, 0xC9, 0x23, 0xC0, 0x43, 0xF0, 0xA5, 0x5B,
  1592.         0x18, 0x8D, 0x8E, 0xBB, 0x55, 0x8C, 0xB8, 0x5D,
  1593.         0x38, 0xD3, 0x34, 0xFD, 0x7C, 0x17, 0x57, 0x43,
  1594.         0xA3, 0x1D, 0x18, 0x6C, 0xDE, 0x33, 0x21, 0x2C,
  1595.         0xB5, 0x2A, 0xFF, 0x3C, 0xE1, 0xB1, 0x29, 0x40,
  1596.         0x18, 0x11, 0x8D, 0x7C, 0x84, 0xA7, 0x0A, 0x72,
  1597.         0xD6, 0x86, 0xC4, 0x03, 0x19, 0xC8, 0x07, 0x29,
  1598.         0x7A, 0xCA, 0x95, 0x0C, 0xD9, 0x96, 0x9F, 0xAB,
  1599.         0xD0, 0x0A, 0x50, 0x9B, 0x02, 0x46, 0xD3, 0x08,
  1600.         0x3D, 0x66, 0xA4, 0x5D, 0x41, 0x9F, 0x9C, 0x7C,
  1601.         0xBD, 0x89, 0x4B, 0x22, 0x19, 0x26, 0xBA, 0xAB,
  1602.         0xA2, 0x5E, 0xC3, 0x55, 0xE9, 0x2F, 0x78, 0xC7
  1603.  
  1604.  
  1605.  
  1606. 5.3.3  Diffie-Hellman Parameters for 2048 bits Modulus:
  1607.  
  1608.  
  1609.  
  1610.  
  1611.  
  1612.  
  1613.  
  1614.  
  1615.  
  1616.  
  1617.  
  1618.  
  1619. draft-ietf-ipsec-skip-07.txt                       [Page 29]
  1620.  
  1621.  
  1622.  
  1623. INTERNET-DRAFT              SKIP             August 14, 1996
  1624.  
  1625.  
  1626.  
  1627.  
  1628. Base (g):
  1629.         0x02
  1630.  
  1631. Modulus (p) (MSB first):
  1632.         0xF6, 0x42, 0x57, 0xB7, 0x08, 0x7F, 0x08, 0x17,
  1633.         0x72, 0xA2, 0xBA, 0xD6, 0xA9, 0x42, 0xF3, 0x05,
  1634.         0xE8, 0xF9, 0x53, 0x11, 0x39, 0x4F, 0xB6, 0xF1,
  1635.         0x6E, 0xB9, 0x4B, 0x38, 0x20, 0xDA, 0x01, 0xA7,
  1636.         0x56, 0xA3, 0x14, 0xE9, 0x8F, 0x40, 0x55, 0xF3,
  1637.         0xD0, 0x07, 0xC6, 0xCB, 0x43, 0xA9, 0x94, 0xAD,
  1638.         0xF7, 0x4C, 0x64, 0x86, 0x49, 0xF8, 0x0C, 0x83,
  1639.         0xBD, 0x65, 0xE9, 0x17, 0xD4, 0xA1, 0xD3, 0x50,
  1640.         0xF8, 0xF5, 0x59, 0x5F, 0xDC, 0x76, 0x52, 0x4F,
  1641.         0x3D, 0x3D, 0x8D, 0xDB, 0xCE, 0x99, 0xE1, 0x57,
  1642.         0x92, 0x59, 0xCD, 0xFD, 0xB8, 0xAE, 0x74, 0x4F,
  1643.         0xC5, 0xFC, 0x76, 0xBC, 0x83, 0xC5, 0x47, 0x30,
  1644.         0x61, 0xCE, 0x7C, 0xC9, 0x66, 0xFF, 0x15, 0xF9,
  1645.         0xBB, 0xFD, 0x91, 0x5E, 0xC7, 0x01, 0xAA, 0xD3,
  1646.         0x5B, 0x9E, 0x8D, 0xA0, 0xA5, 0x72, 0x3A, 0xD4,
  1647.         0x1A, 0xF0, 0xBF, 0x46, 0x00, 0x58, 0x2B, 0xE5,
  1648.         0xF4, 0x88, 0xFD, 0x58, 0x4E, 0x49, 0xDB, 0xCD,
  1649.         0x20, 0xB4, 0x9D, 0xE4, 0x91, 0x07, 0x36, 0x6B,
  1650.         0x33, 0x6C, 0x38, 0x0D, 0x45, 0x1D, 0x0F, 0x7C,
  1651.         0x88, 0xB3, 0x1C, 0x7C, 0x5B, 0x2D, 0x8E, 0xF6,
  1652.         0xF3, 0xC9, 0x23, 0xC0, 0x43, 0xF0, 0xA5, 0x5B,
  1653.         0x18, 0x8D, 0x8E, 0xBB, 0x55, 0x8C, 0xB8, 0x5D,
  1654.         0x38, 0xD3, 0x34, 0xFD, 0x7C, 0x17, 0x57, 0x43,
  1655.         0xA3, 0x1D, 0x18, 0x6C, 0xDE, 0x33, 0x21, 0x2C,
  1656.         0xB5, 0x2A, 0xFF, 0x3C, 0xE1, 0xB1, 0x29, 0x40,
  1657.         0x18, 0x11, 0x8D, 0x7C, 0x84, 0xA7, 0x0A, 0x72,
  1658.         0xD6, 0x86, 0xC4, 0x03, 0x19, 0xC8, 0x07, 0x29,
  1659.         0x7A, 0xCA, 0x95, 0x0C, 0xD9, 0x96, 0x9F, 0xAB,
  1660.         0xD0, 0x0A, 0x50, 0x9B, 0x02, 0x46, 0xD3, 0x08,
  1661.         0x3D, 0x66, 0xA4, 0x5D, 0x41, 0x9F, 0x9C, 0x7C,
  1662.         0xBD, 0x89, 0x4B, 0x22, 0x19, 0x26, 0xBA, 0xAB,
  1663.         0xA2, 0x5E, 0xC3, 0x55, 0xE9, 0x32, 0x0B, 0x3B
  1664.  
  1665.  
  1666. 6.  Conclusions
  1667.  
  1668. We have described a scheme, Simple Key-Management for Internet Protocols
  1669. (SKIP) that is particularly well suited for use with connectionless
  1670. datagram protocols like IP and its replacement candidate IPv6. Both the
  1671. protocol and computational overheads of this scheme are relatively low.
  1672.  
  1673.  
  1674.  
  1675. draft-ietf-ipsec-skip-07.txt                       [Page 30]
  1676.  
  1677.  
  1678.  
  1679. INTERNET-DRAFT              SKIP             August 14, 1996
  1680.  
  1681.  
  1682.  
  1683. In-band signaled keys incur only the length overhead of the block size
  1684. of a shared-key cipher. Also, establishing and changing packet
  1685. encrypting keys involves only a shared-key cipher operation. Yet the
  1686. scheme has the scalability and robustness of an authenticated public-key
  1687. based infrastructure. In addition, there are no complicated crash
  1688. recovery considerations for intermediate or end nodes.
  1689.  
  1690.  
  1691. Acknowledgements
  1692.  
  1693. I would like to thank all of the people who helped make this draft
  1694. possible. (Any errors and shortcomings are only attributable to the
  1695. author.)
  1696.  
  1697. Whitfield Diffie for many helpful discussions on this subject. Geoff
  1698. Mulligan and Bill Danielson for reviewing this draft and providing
  1699. constructive suggestions. Martin Patterson for reviewing this draft, and
  1700. providing feedback and input based on extensive implementation and
  1701. testing.
  1702.  
  1703. Marc Dye for suggesting using name spaces other than IP addresses with
  1704. SKIP, and for the notion of a name space identifier.
  1705.  
  1706. Bob Hinden provided valuable suggestions, and created the first skeleton
  1707. SKIP document in the format of an Internet-Draft.
  1708.  
  1709. Hilarie Orman suggested the encapsulation scheme which is reflected in
  1710. this draft and provided other valuable input.  Cheryl Madson suggested
  1711. using SKIP to encapsulate protocols such as OSPF and RIP and other
  1712. protocols that may need keying material well as other valuable input and
  1713. critique.
  1714.  
  1715. Ran Atkinson provided detailed critique and feedback, and helped greatly
  1716. in making this document consistent with the IP security encapsulation
  1717. and security architecture documents.
  1718.  
  1719. Jeff Schiller suggested improvements to the draft in order to facilitate
  1720. building interoperable implementations.
  1721.  
  1722. Two separate groups independently "cleanroom" implemented SKIP based on
  1723. early drafts and provided invaluable feedback:  Michael Hauber and
  1724. Christian Schneider in Switzerland and Kanat Alimjanov, Alex Vopilov,
  1725. Nick Tzarev and Roman Sagalev in Russia deserve special credit for their
  1726. efforts.
  1727.  
  1728.  
  1729.  
  1730.  
  1731. draft-ietf-ipsec-skip-07.txt                       [Page 31]
  1732.  
  1733.  
  1734.  
  1735. INTERNET-DRAFT              SKIP             August 14, 1996
  1736.  
  1737.  
  1738.  
  1739. Germano Caronni suggested many useful SKIP protocol enhancements, and
  1740. also led the independent implementation of SKIP in Switzerland.
  1741.  
  1742. Phillip Zimmermann and Colin Plumb provided valuable information on
  1743. integrating a web-of-trust certification model, as exemplified in the
  1744. PGP secure mail package, with SKIP style certificates.  Colin Plumb also
  1745. contributed the section describing the generation of the prime values
  1746. used in SKIP.
  1747.  
  1748. Colin Plumb provided the prime generation software and algorithm
  1749. description given in the recommended primes section. The choice of the
  1750. quote used to seed the primes is due to Phillip Zimmermann and Colin
  1751. Plumb.
  1752.  
  1753. Joseph Reveane, Rich Skrenta and Ben Stoltz reviewed this draft and
  1754. provided constructive suggestions.
  1755.  
  1756. In addition the protocol has benefited greatly from discussions on the
  1757. ipsec mailing list. Many valuable improvements to the draft have come as
  1758. a result of this. Noteworthy contributions have come from the following
  1759. individuals: Amir Herzberg, Hugo Krawcyk, Steve Bellovin, Dragan
  1760. Grebovich, Charles Lynn, Russ Housely.
  1761.  
  1762.  
  1763. References
  1764.  
  1765. [1] RFCs 1421-1424, Privacy Enhanced Mail
  1766.  
  1767. [2] A Aziz, W Diffie, "Privacy and Authentication for Wireless LANs",
  1768.     IEEE Personal Communications, Feb 1994.
  1769.  
  1770. [3] W. Diffie, M. Wiener, P. Van Oorschot, "Authentication and
  1771.     Authenticated Key Exchanges.", in Designs Codes and Cryptography,
  1772.     Kluwer Academic Publishers, 1991.
  1773.  
  1774. [4] Diffie, W., Hellman, M., "New Directions in Cryptography", IEEE
  1775.     Transactions on Information Theory, Vol IT-22, Nov 1976, pp. 644-654
  1776.  
  1777. [5] Deering, S. E., "Host extensions for IP multicasting", RFC 1112
  1778.  
  1779. [6] Kent, S., "Certificate Based Key Management", RFC 1422
  1780.  
  1781. [7] "Public Key Cryptography Standards", PKCS#s 1-10 from RSA Data
  1782.     Security Inc., Redwood City, CA, ftp://ftp.rsa.com/pub/pkcs
  1783.  
  1784.  
  1785.  
  1786.  
  1787. draft-ietf-ipsec-skip-07.txt                       [Page 32]
  1788.  
  1789.  
  1790.  
  1791. INTERNET-DRAFT              SKIP             August 14, 1996
  1792.  
  1793.  
  1794.  
  1795. [8] Atkinson, R., "Security Architecture for the Internet Protocol", RFC
  1796.     1825, August 1995
  1797.  
  1798. [9] Atkinson, R., "IP Authentication Header", RFC 1826, August 1995
  1799.  
  1800. [10] Atkinson, R., "IP Encapsulating Payload", RFC 1827, August 1995
  1801.  
  1802. [11] Eastlake, D., Kaufman, C., "Domain Name Security Extensions", (I-D
  1803.     draft-ietf-dnssec-secext-04.txt), Work In Progress
  1804.  
  1805. [12] D. Eastlake, S. Crocker, J. Schiller, "Randomness Recommendations
  1806.     for Security", RFC 1750, December 1994
  1807.  
  1808. [13] Rivest, R., "The MD5 Message Digest Algorithm", RFC 1321, April
  1809.     1992
  1810.  
  1811. [14] P. Metzger, W. Simpson, "IP Authentication using Keyed MD5", RFC
  1812.     1828, August 1995
  1813.  
  1814. [15] P. Karn, P. Metzger, W. Simpson, "The ESP DES-CBC Transform", RFC
  1815.     1829, August 1995
  1816.  
  1817. [16] J. Moy, "OSPF Version 2", RFC 1583, March 1994
  1818.  
  1819. [17] A. Menezes, "Elliptic Curve Public Key Cryptosystems", Kluwer
  1820.     Academic Publishers, 1993
  1821.  
  1822. [18] R. Droms, "Dynamic Host Configuration Protocol", RFC 1531, October,
  1823.     1993
  1824.  
  1825. [19] Aziz, A., Markson, T., Prafullchandra, H., "Certificate Discovery
  1826.     Protocol", (I-D draft-ietf-ipsec-cdp-01.txt), Work in Progress
  1827.  
  1828. [20] Aziz, A., Markson, T., Prafullchandra, H., "Encoding of an Unsigned
  1829.     Diffie-Hellman Public Value", (I-D draft-ietf-ipsec-skip-udh-
  1830.     01.txt), Work in Progress
  1831.  
  1832. [21] Aziz, A., Markson, T., Prafullchandra, H., "SKIP Algorithm
  1833.     Discovery Protocol", (I-D draft-ietf-ipsec-skip-adp-01.txt), Work in
  1834.     Progress
  1835.  
  1836. [22] Aziz, A., Markson, T., Prafullchandra, H., "SKIP Extensions for IP
  1837.     Multicast", (I-D draft-ietf-ipsec-skip-mc-01.txt), Work in Progress
  1838.  
  1839. [23] Aziz, A., Markson, T., Prafullchandra, H., "X.509 Encoding of
  1840.  
  1841.  
  1842.  
  1843. draft-ietf-ipsec-skip-07.txt                       [Page 33]
  1844.  
  1845.  
  1846.  
  1847. INTERNET-DRAFT              SKIP             August 14, 1996
  1848.  
  1849.  
  1850.  
  1851.     Diffie-Hellman Public Value", (I-D draft-ietf-ipsec-skip-x509-
  1852.     01.txt), Work in Progress
  1853.  
  1854. [24] Atkins, D., Stallings, W., Zimmerman, P., "PGP Message Exchange
  1855.     Formats", (I-D draft-atkins-pgpformats-01.txt), Work In Progress
  1856.  
  1857.  
  1858. Author's Address(es)
  1859.  
  1860.      Ashar Aziz
  1861.      Sun Microsystems, Inc.
  1862.      M/S PAL1-550
  1863.      2550 Garcia Avenue
  1864.      Mountain View, CA 94043
  1865.  
  1866.      Email: ashar.aziz@eng.sun.com
  1867.      Alternate email address: ashar@incog.com
  1868.  
  1869.      Tom Markson
  1870.      Sun Microsystems, Inc.
  1871.      M/S PAL1-550
  1872.      2550 Garcia Avenue
  1873.      Mountain View, CA 94043
  1874.  
  1875.      Email: markson@incog.com
  1876.      Alternate email address: markson@eng.sun.com
  1877.  
  1878.      Hemma Prafullchandra
  1879.      Sun Microsystems, Inc.
  1880.      M/S PAL1-550
  1881.      2550 Garcia Avenue
  1882.      Mountain View, CA 94043
  1883.  
  1884.      Email: hemma@eng.sun.com
  1885.      Alternate email address: hemma@incog.com
  1886.  
  1887.  
  1888.  
  1889.  
  1890.  
  1891.  
  1892.  
  1893.  
  1894.  
  1895.  
  1896.  
  1897.  
  1898.  
  1899. draft-ietf-ipsec-skip-07.txt                       [Page 34]
  1900.  
  1901.  
  1902.  
  1903.  
  1904.  
  1905.  
  1906.  
  1907.                                 CONTENTS
  1908.  
  1909.  
  1910.     Status of this Memo.................................   1
  1911.  
  1912.     Abstract............................................   2
  1913.  
  1914. 1.  Simple Key-Management for Internet Protocols........   3
  1915.  
  1916.     1.1   Manual distribution of Kij....................   5
  1917.  
  1918.     1.2   Zero-Message Master Key Update Algorithm......   5
  1919.  
  1920.     1.3   Independence from Cryptographic
  1921.           Algorithms....................................   7
  1922.  
  1923.     1.4   High Availability and Load Balancing using
  1924.           SKIP..........................................   7
  1925.  
  1926.     1.5   Intermediate Authentication with End-to-End
  1927.           security using SKIP...........................   8
  1928.  
  1929.     1.6   Attacks that the protocol guards against......   9
  1930.  
  1931.           1.6.1   Intruder in the Middle Attacks   9
  1932.  
  1933.           1.6.2   Known Key Attacks   9
  1934.  
  1935.           1.6.3   Clogging Defense  10
  1936.  
  1937.     1.7   Naming, Name Spaces and Master Key-IDs........  10
  1938.  
  1939.     1.8   The SKIP Header...............................  13
  1940.  
  1941.     1.9   Deriving Keys for Packet Encryption and
  1942.           Authentication................................  16
  1943.  
  1944.     1.10  SKIP for Authentication.......................  18
  1945.  
  1946.           1.10.1  Scope of MAC computation  18
  1947.  
  1948.     1.11  SKIP for Encryption...........................  18
  1949.  
  1950.     1.12  SKIP with combined transforms.................  18
  1951.  
  1952.  
  1953.  
  1954.  
  1955.                            - i -
  1956.  
  1957.  
  1958.  
  1959.  
  1960.  
  1961.  
  1962.  
  1963.  
  1964.  
  1965.  
  1966.  
  1967.     1.13  Generic use of SKIP header....................  19
  1968.  
  1969. 2.  Security Considerations.............................  19
  1970.  
  1971.     2.1   Generating Random Keys........................  19
  1972.  
  1973.     2.2   Key Update....................................  20
  1974.  
  1975.     2.3   Choosing Key Strengths........................  20
  1976.  
  1977.     2.4   Forward Secrecy...............................  21
  1978.  
  1979. 3.  Informational Section...............................  21
  1980.  
  1981.     3.1   SKIP with AH..................................  21
  1982.  
  1983.     3.2   SKIP with ESP.................................  22
  1984.  
  1985.     3.3   SKIP with AH and ESP..........................  23
  1986.  
  1987. 4.  Assigned Numbers....................................  25
  1988.  
  1989.     4.1   SKIP protocol number..........................  25
  1990.  
  1991.     4.2   SKIP SPI value................................  25
  1992.  
  1993.     4.3   Name Space Identifier (NSID) Assignments......  25
  1994.  
  1995.     4.4   Assigned Algorithm Numbers....................  26
  1996.  
  1997. 5.  Recommended Parameters and Implementation Notes.....  27
  1998.  
  1999.     5.1   n Update Frequency............................  27
  2000.  
  2001.     5.2   SKIP with the Certificate Discovery
  2002.           Protocol......................................  27
  2003.  
  2004.     5.3   Recommended g & p values......................  28
  2005.  
  2006.           5.3.1   Prime generation method  28
  2007.  
  2008.           5.3.2   Diffie-Hellman Parameters for 1024
  2009.                   bits Modulus  29
  2010.  
  2011.  
  2012.  
  2013.  
  2014.  
  2015.                            - ii -
  2016.  
  2017.  
  2018.  
  2019.  
  2020.  
  2021.  
  2022.  
  2023.  
  2024.  
  2025.  
  2026.  
  2027.           5.3.3   Diffie-Hellman Parameters for 2048
  2028.                   bits Modulus:  29
  2029.  
  2030. 6.  Conclusions.........................................  30
  2031.  
  2032.     Acknowledgements....................................  31
  2033.  
  2034.     References..........................................  32
  2035.  
  2036.     Author's Address(es)................................  34
  2037.  
  2038.  
  2039.  
  2040.  
  2041.  
  2042.  
  2043.  
  2044.  
  2045.  
  2046.  
  2047.  
  2048.  
  2049.  
  2050.  
  2051.  
  2052.  
  2053.  
  2054.  
  2055.  
  2056.  
  2057.  
  2058.  
  2059.  
  2060.  
  2061.  
  2062.  
  2063.  
  2064.  
  2065.  
  2066.  
  2067.  
  2068.  
  2069.  
  2070.  
  2071.  
  2072.  
  2073.  
  2074.  
  2075.                           - iii -
  2076.  
  2077.  
  2078.  
  2079.  
  2080.