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-inline-isakmp-01.txt < prev    next >
Text File  |  1997-03-27  |  19KB  |  560 lines

  1.  
  2.  
  3. IPSEC Working Group                                      Bill Sommerfeld
  4. INTERNET-DRAFT                                           Hewlett Packard
  5. draft-ietf-ipsec-inline-isakmp-01.txt                         March 1997
  6.  
  7.  
  8.  
  9.  
  10.      Inline Keying within the ISAKMP Framework.
  11.       <draft-ietf-ipsec-inline-isakmp-01.txt>
  12.  
  13.  
  14.  
  15.  
  16. STATUS OF THIS MEMO
  17.  
  18.    This document is an Internet-Draft.  Internet-Drafts are working
  19.    documents of the Internet Engineering Task Force (IETF), its areas,
  20.    and its working groups.  Note that other groups may also distribute
  21.    working documents as Internet-Drafts.
  22.  
  23.    Internet-Drafts are draft documents valid for a maximum of six months
  24.    and may be updated, replaced, or obsoleted by other documents at any
  25.    time.  It is inappropriate to use Internet-Drafts as reference
  26.    material or to cite them other than as ``work in progress.''
  27.  
  28.    To learn the current status of any Internet-Draft, please check the
  29.    ``1id-abstracts.txt'' listing contained in the Internet-Drafts Shadow
  30.    Directories on ftp.is.co.za (Africa), nic.nordu.net (Europe),
  31.    munnari.oz.au (Pacific Rim), ds.internic.net (US East Coast), or
  32.    ftp.isi.edu (US West Coast).
  33.  
  34.    Distribution of this document is unlimited.
  35.  
  36.    This particular Internet Draft is being published in order to focus
  37.    discussion on protocols for lightweight inline keying in the context
  38.    of ISAKMP/Oakley.  It is intended that this version will raise more
  39.    questions than it answers; there many ways to do inline keying and
  40.    the author does not pretend to have all the answers.  A future
  41.    version of this draft might become suitable for submission to the
  42.    IESG as a standards track protocol.
  43.  
  44. ABSTRACT
  45.  
  46.    The current proposal for IP-layer key management [ISAKMP, OAKLEY,
  47.    ISAOAK] has fairly high overhead.  Before a security association can
  48.    be established, at least one pair of messages need to be exchanged
  49.    between the communicating peers.  For efficiency, this suggests that
  50.    ISAKMP setup should be infrequent.  However, general principles of
  51.  
  52.  
  53.  
  54. Sommerfeld               Expires 1 October 1997                 [Page 1]
  55.  
  56. Internet Draft    draft-ietf-ipsec-inline-isakmp-01.txt      March 1997
  57.  
  58.  
  59.    key management suggest that individual keys should be used as little
  60.    as practical and changed as frequently as possible.  Steve Bellovin
  61.    has suggested that, ideally, different security associations should
  62.    be used for each different transport-level connection[BADESP].
  63.  
  64.    This document discusses a way of structuring a protocol to permit
  65.    this to happen with minimal overhead, both in round-trip delay at
  66.    connection setup, and in bandwidth once the connection is
  67.    established.
  68.  
  69.    The general concept of inline or in-band keying here was inspired by
  70.    SKIP[SKIP].  However, SKIP's approach is burdened by the addition of
  71.    an extra intermediate header of perhaps 20 to 28 bytes to every
  72.    protected packet, which doubles the bandwidth overhead of protected
  73.    traffic compared with ESP with fixed keying.  In order to minimise
  74.    the per-packet overhead, an inline keying header should be used only
  75.    until the desired security association is established, at which point
  76.    the peers will fall back to pure ESP/AH.
  77.  
  78. IN-BAND SECURITY ASSOCIATION SETUP
  79.  
  80.    AH and ESP security associations are identified by a 32-bit
  81.    identifier known as an SPI, which is assigned by the receiving end of
  82.    the association.  This makes it difficult to create a new security
  83.    association at the request of a traffic originator without at least
  84.    one round trip.
  85.  
  86.    However, most packets are sent either in response to another packet,
  87.    or in the expectation that a response will be received.
  88.  
  89.    We can exploit this, by having the sender allocate an SPI for return
  90.    traffic, and include a message informing the recipient of it in the
  91.    first message.  The reponse to this message can also contain a return
  92.    SPI, so further packets in the conversation can be directed to the
  93.    appropriate security association for the conversation.
  94.  
  95.    There are at least two applications for this protocol.  Hosts may
  96.    wish to use separate SPIs for separate transport-layer connections.
  97.    Similarly, routers doing tunnel-mode ESP may wish to establish
  98.    separate SPIs for each active host-pair they tunnel.
  99.  
  100.    In the former case, for a typical TCP exchange, the in-band keying
  101.    headers would piggyback on the SYN and SYN/ACK packets, and would
  102.    then be absent from subsequent traffic.
  103.  
  104.    No explicit acknowledgement of the creation of the new SPI is needed,
  105.    as use of the reply-SPI by the peer would (implicitly) acknowledge
  106.    the key change.
  107.  
  108.  
  109.  
  110. Sommerfeld               Expires 1 October 1997                 [Page 2]
  111.  
  112. Internet Draft    draft-ietf-ipsec-inline-isakmp-01.txt      March 1997
  113.  
  114.  
  115.    No explicit retransmission of in-band-keying requests is needed; if
  116.    the upper-level protocol retransmits before the full SPI pair is
  117.    created, the inline keying header is included in the retransmission.
  118.  
  119. PACKET PROCESSING
  120.  
  121.    Some additional logic needs to be added to an implementation's
  122.    outbound and inbound policy engines.  As this protocol has not yet
  123.    been implemented, the following is necessarily vague; suggestions on
  124.    how to improve it are welcomed.
  125.  
  126.    When sending a packet, if there isn't a valid outbound SPI we want to
  127.    use to reach the peer, and we have reason to believe the peer accepts
  128.    inline keying headers, we look up the inbound SPI we want our peer to
  129.    use (or create it if it's nonexistant) and insert an in-band keying
  130.    header in the outbound packet.
  131.  
  132.    On the other hand, if there is a valid outbound SPI, we use it.  If
  133.    there isn't a valid inbound SPI for a response, we create the inbound
  134.    SPI we want to receive replies on and insert an in-band-keying header
  135.    in the outbound packet, then send it using the outbound SPI.
  136.  
  137.    If an inbound packet contains a valid in-band-keying header with a
  138.    reply SPI in it, we create an outbound SPI with the appropriate TTL,
  139.    and then process the rest of the packet.
  140.  
  141. PARENT SPI PARAMETERS
  142.  
  143.    The parent SPI must have the following parameters specified or
  144.    negotiated:
  145.     - a shared secret
  146.     - the pseudo-random function (prf) to be used for key derivation.
  147.     - the algorithm to be used for encryption, and any algorithm-specific
  148.    parameters (other than the key).
  149.     - the algorithm to be used for message integrity protection, and any
  150.    algorithm-specific parameters (other than the key).
  151.  
  152. ESTABLISHING THE PARENT SPI.
  153.  
  154.    This scheme can only "spawn" new SPIs from old SPIs; therefore, there
  155.    needs to be a way to establish the "parent" SPI.
  156.  
  157.    There are several possible alternatives:
  158.  
  159.    One of the ISAKMP exchanges could be used to establish the parent
  160.    SPI.
  161.  
  162.    Another alternative, very similar to SKIP, would be for each system
  163.  
  164.  
  165.  
  166. Sommerfeld               Expires 1 October 1997                 [Page 3]
  167.  
  168. Internet Draft    draft-ietf-ipsec-inline-isakmp-01.txt      March 1997
  169.  
  170.  
  171.    to publish a certificate containing a Diffie-Hellman public key, a
  172.    "well known" SPI, and the additional parent-SPI parameters listed
  173.    above.  The shared secret actually used in the inline-keying protocol
  174.    would depend on the source address of the packet.  It is not clear
  175.    whether this variation is of interest and is included only for
  176.    completeness.
  177.  
  178. ENCODING OPTIONS
  179.  
  180.    There are a number of potential ways of encoding this protocol, with
  181.    different advantages and disadvantages; at this point, it is not
  182.    clear which way is best.  The primary areas of variability include:
  183.  
  184.     - how the SPI-creation message is framed
  185.  
  186.     - what is contained in the SPI-creation message
  187.  
  188.     - how the user payload "along for the ride" is protected.
  189.  
  190.    In order to minimize complexity, in the end, there should only be one
  191.    answer for each of these questions.  Several requirements on the
  192.    encoding exist:
  193.  
  194.     1) the SPI-creation message must be optional
  195.     2) there should be some "cryptographic distance" between the three
  196.    kinds of keys involved:
  197.     - the key(s) used to authenticate and/or encrypt the user
  198. payload which is along for the ride
  199.     - the key(s) used to authenticate the SPI-creation message
  200.     - the key(s) used by the newly-created reply SPI.
  201.     3) there should be as much commonality in encoding between this
  202.    protocol and the various sub-protocols of ESP and ISAKMP with similar
  203.    functionality.
  204.  
  205.     4) the inline keying header should be small.
  206.  
  207.  FRAMING
  208.  
  209.    Three alternatives suggest themselves:
  210.  
  211.     - special-case encoding within an ESP transform, perhaps using a bit
  212.    out of the pad length by mutual agreement between the communicating
  213.    peers.
  214.  
  215.     - a new IP-layer protocol
  216.  
  217.     - use of the "IPv6 destination options" IP-layer protocol.
  218.  
  219.  
  220.  
  221.  
  222. Sommerfeld               Expires 1 October 1997                 [Page 4]
  223.  
  224. Internet Draft    draft-ietf-ipsec-inline-isakmp-01.txt      March 1997
  225.  
  226.  
  227.    Using a new IP-layer protocol seems cleanest, though there has been
  228.    strong opposition to it from some implementors.  The use of the IPv6
  229.    destination options protocol would limits the size of a single option
  230.    to no more than 255 octets, which may be a significant constraint.
  231.  
  232.  REPLY-SPI-CREATION CONTENTS
  233.  
  234.    There are essentially two possibilities for the reply-SPI-creation
  235.    message: either an encapsulated quick mode message, or a custom
  236.    message simpler than, but similar to quick mode.
  237.  
  238.   Encapsulating ISAKMP/Oakley
  239.  
  240.    A simpler, but less efficient, alternative would be to encapsulate
  241.    various ISAKMP/Oakley quick-mode messages as the reply-SPI-creation
  242.    message.
  243.  
  244.   Custom Format
  245.  
  246.    Notation here is derived from the notation used in the Oakley draft.
  247.  
  248.    We assume the existance of a shared secret, sSPI between the
  249.    communicating parties, and a parent SPI corresponding to the shared
  250.    secret.  This can be established in a number of ways, which will be
  251.    discussed later.
  252.  
  253.    Fields:
  254.  
  255.         reply-SPI
  256.         reply-SPI-scope
  257.         reply-SPI-lifetime
  258.         reply-SPI-nonce
  259.         reply-SPI-parameters
  260.         peer-SPI-nonce
  261.  
  262.    spi-creation-fields is a set of fields which tell the receiver how to
  263.    create an outbound SPI for reponses to the payload of this datagram.
  264.    This set includes:
  265.  
  266.    Reply-SPI is the number of an SPI created by the sender for responses
  267.    to this packet.
  268.  
  269.    Reply-SPI-scope indicates the scope of the reply SPI; exact encoding
  270.    is TBS and should probably be similar to the way the scope is handled
  271.    in [DOI].  The scope should be able to select among (at least) four
  272.    possible scopes: host-range, host, protocol, protocol+port.
  273.  
  274.    Reply-SPI-lifetime is the lifetime (exact encoding TBS), of the
  275.  
  276.  
  277.  
  278. Sommerfeld               Expires 1 October 1997                 [Page 5]
  279.  
  280. Internet Draft    draft-ietf-ipsec-inline-isakmp-01.txt      March 1997
  281.  
  282.  
  283.    newly-created SPI.  A similar encoding to the one used by [DOI]
  284.    should be used here.
  285.  
  286.    reply-SPI-parameters are other parameters of the newly created SPI,
  287.    including the algorithm, and any algorithm-specific parameters.  An
  288.    encoding similar to the one used by [DOI] should be used.
  289.  
  290.    Peer-spi-nonce is either all zeros, or the peer's reply-SPI-nonce.
  291.  
  292.    The key(s) associated with the newly-created SPI are derived from:
  293.  
  294.         prf (sSPI, reply-TAG | peer-spi-nonce | reply-spi-nonce |
  295.    reply-SPI)
  296.  
  297.    reply-TAG is a well-known constant, TBD.
  298.  
  299.    sSPI is the shared secret associated with the parent SPI.
  300.  
  301.    prf(a, b) is a pseudo-random function as in Oakley; the exact
  302.    function to use is a parameter of the parent SPI.
  303.  
  304.    It may be desirable to include other fields from the header in both
  305.    of the key-derivation hashes.
  306.  
  307.  KEYING OF THE USER PAYLOAD
  308.  
  309.    If the "parent" algorithm is judged to be sufficently strong, the
  310.    initial user payload could simply be encrypted using the ESP in the
  311.    parent SPI.  However, the use of inline keying seems to suggest a
  312.    desire to segregate different communications under different keys.
  313.  
  314.    A extension to ESP suggests itself.  We can negotiate the addition of
  315.    a "key generation nonce" to the cleartext part of the ESP header, and
  316.    then generate the key for encrypting the ciphertext portion of the
  317.    packet using a keyed hash of the shared secret and the nonce:
  318.  
  319.         prf (sSPI, current-packet-nonce | SPI | other)
  320.  
  321.    sSPI is the SPI's shared secret;
  322.  
  323.    current-packet-nonce is a 128-bit random value generated by the
  324.    sender (ideally different for each packet).
  325.  
  326.    "SPI" is the numeric SPI value.
  327.  
  328.    "other" are any additional fields which might make sense to include
  329.    in the key-generation hash.
  330.  
  331.  
  332.  
  333.  
  334. Sommerfeld               Expires 1 October 1997                 [Page 6]
  335.  
  336. Internet Draft    draft-ietf-ipsec-inline-isakmp-01.txt      March 1997
  337.  
  338.  
  339. MISCELLANEOUS ISSUES
  340.  
  341.    There are a number of miscellaneous problems which arise as a result
  342.    of constructing a protocol of this form.  None of them seem to be
  343.    particularly insurmountable.  These considerations are based on the
  344.    author's experience with vaguely similar security protocols.
  345.  
  346.  Interaction With MTU Discovery
  347.  
  348.    Because insertion of the inline keying header will change the size of
  349.    the packet, there are likely to be interactions between this protocol
  350.    and MTU discovery when the first packet triggering the creation of a
  351.    new SA pair is near maximum size.
  352.  
  353.    Several potential solutions come to mind:
  354.  
  355.    1) With some cooperation between layers, it may be possible to reduce
  356.    the amount of data in the outbound packet (this may be possible for
  357.    TCP; it's almost certainly not possible for other protocols).
  358.  
  359.    2) MTU discovery could be deferred, by sending the packet with DF
  360.    cleared.
  361.  
  362.    Neither of these seem really satisfactory; suggestions on how to
  363.    handle this case are welcomed.
  364.  
  365.  SPI expiration and clock skew.
  366.  
  367.    This section perhaps belongs as an appendix to the a future version
  368.    of the Internet DOI specification [DOI].
  369.  
  370.    Inline SPI's expire after a defined time.  Since relative timestamps
  371.    are used in the protocol, clocks synchronized in phase are not
  372.    assumed; however, some minimal accuracy in frequency is assumed.
  373.  
  374.    It is assumed here that SPI timestamps are maintained in absolute
  375.    form internally and converted to and from relative form only for use
  376.    over the network.
  377.  
  378.    The explicit expiration time of the SPI indicates the time after
  379.    which the sender should no longer send to that SPI.  The recipient
  380.    should still honor inbound packets to that SPI for an additional
  381.    grace period of:
  382.         K1 * MSL + K2 * nominal-lifetime
  383.    where "MSL" is the maximum lifetime of a packet in the network as in
  384.    TCP, "K1" is a fudge factor allowing some margin around MSL, and "K2"
  385.    is a fudge factor allowing for a difference in clock frequency
  386.    between systems.
  387.  
  388.  
  389.  
  390. Sommerfeld               Expires 1 October 1997                 [Page 7]
  391.  
  392. Internet Draft    draft-ietf-ipsec-inline-isakmp-01.txt      March 1997
  393.  
  394.  
  395.    Proposed default values:
  396.         MSL: 120  (same as TCP)
  397.         K1: 2          (same as TCP)
  398.         K2: 1/32  (allow for ~3% frequency difference)
  399.    It may be useful for debugging purposes to allow these parameters to
  400.    be adjusted.
  401.  
  402.    With the above constants, a nominal 10-minute SPI would be valid for
  403.    about 14 minutes; and a nominal 2-hour SPI would be valid for
  404.    approximately 2 hours and 8 minutes.
  405.  
  406. EXAMPLE
  407.  
  408.    The following is a simplified example of the messages involved in
  409.    setting up a new SPI pair using inline keying.  A lot of detail has
  410.    been omitted to clarify the presentation.
  411.  
  412.    Assume per-connection inline keying is in use between two hosts A and
  413.    B, with a security association X existing from A to B.
  414.  
  415.    A wishes to establish a TCP connection to B.  Because per-connection
  416.    keying is in use, A would first create a new inbound SPI "Y", and
  417.    send:
  418.  
  419.         ESP [A-to-B, inline[N1, seq 0, Y], TCP [port 4352 to 21, SYN]]
  420.  
  421.    Upon receipt, B creates a new outbound SPI "Y", and a new inbound SPI
  422.    "Z", and hands off the TCP packet to its TCP.  It then responds with:
  423.  
  424.         ESP [Y, inline[N2, seq 0, Z], TCP [port 21 to 4352, SYN+ACK]]
  425.  
  426.    Upon receipt, A creates a new outbound SPI "Z".
  427.  
  428.    Receipt of a packet on spi Y acknowleges receipt of the inline-keying
  429.    message, so subsequent messages for this connection do not contain an
  430.    inline keying header, so A responds with:
  431.  
  432.         ESP [Z, TCP [port 4352 to 21, ACK, data1]]
  433.  
  434.    Similarly, B responds with:
  435.  
  436.         ESP [Y, TCP [port 21 to 4352, ACK, data2]]
  437.  
  438.    and the conversation would continue like this until the TCP
  439.    connection closed.
  440.  
  441. SECURITY CONSIDERATIONS
  442.  
  443.  
  444.  
  445.  
  446. Sommerfeld               Expires 1 October 1997                 [Page 8]
  447.  
  448. Internet Draft    draft-ietf-ipsec-inline-isakmp-01.txt      March 1997
  449.  
  450.  
  451.    This entire document concerns key management for the IP security
  452.    protocols.
  453.  
  454.    This protocol does not provide for Perfect Forward Secrecy by itself,
  455.    but if used in conjunction with ISAKMP, may provide a reasonable
  456.    engineering tradeoff between security and performance.
  457.  
  458.    As with Oakley's Quick Mode, this protocol can consume the entropy of
  459.    the shared secret[ISAOAK]. Implementors should take note of this fact
  460.    and be able to limit the number of inline-keying messages allowed per
  461.    shared secret.  This draft does not proscribe such a limit.
  462.  
  463. REFERENCES
  464.  
  465.    [BADESP]  Bellovin, S., "Problem Areas for the IP Security
  466.    Protocols", Proceedings of the Sixth Usenix UNIX security
  467.    symposium, July 1996 (available from
  468.    ftp://ftp.research.att.com/dist/smb/badesp.ps)
  469.  
  470.    [AH]      Atkinson, R., "IP Encapsulating Security Payload (ESP)",
  471.    RFC1826, August 1995.
  472.  
  473.    [DOI]     Piper, D., "The Internet IP Security Domain Of
  474.    Interpretation for ISAKMP", version 1, draft-ietf-ipsec-
  475.    ipsec-doi-00.txt.
  476.  
  477.    [ESP]     Atkinson, R., "IP Encapsulating Security Payload (ESP)",
  478.    RFC1827, August 1995.
  479.  
  480.    [IPSEC]   Randall Atkinson, "Security Architecture for the Internet
  481.    Protocol", Internet Draft draft-ietf-ipsec-arch-sec-01.txt,
  482.    10 November 1996
  483.  
  484.    [ISAKMP]  Maughhan, D., Schertler, M., Schneider, M., and Turner, J.,
  485.    "Internet Security Association and Key Management Protocol
  486.    (ISAKMP)", version 6, draft-ietf-ipsec-isakmp-06.{ps,txt}.
  487.  
  488.    [ISAOAK]  Harkins, D., Carrel, D., "The resolution of ISAKMP with
  489.    Oakley", draft-ietf-ipsec-isakmp-oakley-02.txt.
  490.  
  491.    [OAKLEY]  Orman, H., "The Oakley Key Determination Protocol", version
  492.    1, draft-ietf-ipsec-oakley-01.txt.
  493.  
  494.    [SKIP]    Aziz, A., Markson, T., Prafullchandra, H., "Simple Key-
  495.    Management For Internet Protocols", draft-ietf-ipsec-
  496.    skip-07.txt.
  497.  
  498. AUTHOR'S ADDRESS:
  499.  
  500.  
  501.  
  502. Sommerfeld               Expires 1 October 1997                 [Page 9]
  503.  
  504. Internet Draft    draft-ietf-ipsec-inline-isakmp-01.txt      March 1997
  505.  
  506.  
  507.    Bill Sommerfeld <sommerfeld@apollo.hp.com>
  508.    Hewlett Packard
  509.    300 Apollo Drive
  510.    Chelmsford MA 01824
  511.  
  512.    Telephone: +1 508 436 4352
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.  
  534.  
  535.  
  536.  
  537.  
  538.  
  539.  
  540.  
  541.  
  542.  
  543.  
  544.  
  545.  
  546.  
  547.  
  548.  
  549.  
  550.  
  551.  
  552.  
  553.  
  554.  
  555.  
  556.  
  557.  
  558. Sommerfeld               Expires 1 October 1997                [Page 10]
  559.  
  560.