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-revised-enc-mode-01.txt < prev    next >
Text File  |  1997-08-05  |  16KB  |  399 lines

  1. IPSEC Working Group                       R. Canetti, P. Cheng, H. Krawczyk 
  2. INTERNET-DRAFT                                IBM Research and the Technion
  3. draft-ietf-ipsec-revised-enc-mode-01.txt                         July  1997
  4. Expire in six months
  5.  
  6.  
  7.                A revised encryption mode for ISAKMP/Oakley
  8.                <draft-ietf-ipsec-revised-enc-mode-01.txt>
  9.  
  10.  
  11.                           Status of this Memo
  12.  
  13.    This document is an Internet Draft. Internet Drafts are working
  14.    documents of the Internet Engineering Task Force (IETF), its areas,
  15.    and working groups.  Note that other groups may also distribute
  16.    working documents as Internet Drafts.
  17.  
  18.    Internet Drafts are draft documents valid for a maximum of six months
  19.    and may be updated, replaced, or obsoleted by other documents at any
  20.    time. It is inappropriate to use Internet Drafts as reference
  21.    material or to cite them other than as "work in progress."
  22.  
  23.    To learn the current status of any Internet Draft, please check the
  24.    "1id-abstracts.txt" listing contained in the Internet Drafts Shadow
  25.    Directories on ftp.is.co.za (Africa), nic.nordu.net (Europe),
  26.    munnari.oz.au (Australia), ds.internic.net (US East Coast), or
  27.    ftp.isi.edu (US West Coast).
  28.  
  29.  
  30.  
  31.    1. Abstract
  32.  
  33.    The ISAKMP/Oakley document [HC97] describes a proposed standard for 
  34.    using the Oakley Key Exchange Protocol in conjunction with ISAKMP to 
  35.    obtain authenticated and secret keying material for use with ISAKMP, 
  36.    and for other security associations such as AH and ESP for the IETF 
  37.    IPsec DOI.
  38.  
  39.    The public-key encryption method of carrying out Phase 1 of the key
  40.    exchange in the ISAKMP/Oakley document provides significant security
  41.    advantages over the other alternatives and should be the method of
  42.    choice in many implementations. Unfortunately, as currently
  43.    described in [HC97] the method requires two public key 
  44.    encryption and decryption operations from both the Initiator and 
  45.    the Responder. The present document describes a small modification 
  46.    to this method. The resulting scheme requires only one public key 
  47.    encryption and decryption operation from each party, while maintaining 
  48.    (and even improving on) the strong security properties of the 
  49.    ISAKMP/Oakley public-key encryption mode.    
  50.  
  51.    Remark: This document is NOT self-contained, it is intended as an 
  52.    addendum to the authentication methods defined in [HC97].  
  53.    In particular, it uses notation and definitions of [HC97].  
  54.    Thus, it is best read in conjunction with [HC97].
  55.  
  56. Canetti, Cheng, Krawczyk                                           [Page i]
  57.  
  58. INTERNET DRAFT                                             July  1997
  59.  
  60.    2. Introduction
  61.  
  62.    The ISAKMP/Oakley  protocol [HC97] defines three alternative methods 
  63.    of carrying out Phase 1 of the key exchange. Two of these methods 
  64.    are usable by parties that do not already share a secret key. 
  65.    These are the Signature Method (Section 5.1 in [HC97]) and the 
  66.    Encryption Method (Section 5.2 in [HC97]).
  67.  
  68.    The Encryption Method enjoys several significant advantages over the 
  69.    Signature Method. These advantages are sketched in Section 5.
  70.    However, in the ISAKMP/Oakley draft the Encryption Method requires 
  71.    TWO public key encryption and decryption operations for each party. 
  72.    This is unnecessarily expensive. (In overloaded or weak processors 
  73.    the extra exponentiation may have a significantly adverse effect in 
  74.    performance.) 
  75.  
  76.    This document describes a simple modification of the ISAKMP/Oakley
  77.    Encryption Method. The resulting method enjoys the same security 
  78.    advantages, and requires only ONE public key encryption and decryption 
  79.    operation for each party. This method, called the Revised Encryption 
  80.    Method, is presented as an alternative method to the ISAKMP/Oakley 
  81.    Encryption Method. In fact, the revised method enjoys even additional 
  82.    security advantages on top of the ISAKMP/Oakley Encryption Method, 
  83.    as elaborated below. The required changes are minimal.
  84.  
  85.    The change from the ISAKMP/Oakley Encryption Method is basically as 
  86.    follows. There, each party's identity and nonce are encrypted via 
  87.    TWO separate applications of the public-key encryption algorithm. 
  88.    (In fact, if the party's identity is long then this may require 
  89.    additional applications of the public-key encryption algorithm.) 
  90.  
  91.    In the Revised Encryption Method the nonce is still encrypted
  92.    using the public-key encryption algorithm. However, the sending 
  93.    party's identity (and also the certificate, if it is sent) is 
  94.    encrypted via symmetric encryption (e.g. DES), with a key derived 
  95.    from the nonce. This solution adds no significant complexity to the
  96.    implementation and saves a costly long (RSA or other) exponentiation.
  97.    In addition, the Key Exchange payload (ie. the DH challenges) is also
  98.    encrypted using the same derived key. This provides additional 
  99.    protection against cryptanalysis of the DH exchange.
  100.    
  101.    The Revised Encryption mode has another advantage. The (optional)
  102.    Certificate payload is also encrypted using the same derived key. 
  103.    Consequently anonymity is preserved even if the certificate is sent 
  104.    as part of the exchange. 
  105.  
  106.    The rest of this document is organized as follows. In Section 3
  107.    the Revised Encryption Method is described. The description is 
  108.    written in a way so that Section 3 can be read as a replacement to 
  109.    Section 5.2 in [HC97]. Section 4 specifies default algorithms. 
  110.  
  111.  
  112. Canetti, Cheng, Krawczyk                                           [Page 1]
  113.  
  114. INTERNET DRAFT                                             July  1997
  115.  
  116.    Section 5 discusses some security advantages of the Encryption 
  117.    Method relative to the Signature method.   (These advantages are 
  118.    shared by the Revised Encryption Method.) Appendix A holds the 
  119.    authentication method value of the new method (see ISAKMP [MSST96] 
  120.    and Appendix A of [CH97]). 
  121.  
  122.    3. The new method: Revised Encryption Method of Oakley Phase 1 
  123.  
  124.    Using public key encryption to authenticate the exchange, the
  125.    ancillary information exchanged is encrypted nonces. Each party's
  126.    ability to reconstruct a hash (proving that the other party decrypted
  127.    the nonce) authenticates the exchange.
  128.  
  129.    In order to perform the public key encryption, the initiator must
  130.    already have the responder's public key. In the case where a party
  131.    has multiple public keys, a hash of the certificate of the initiator 
  132.    used to encrypt the ancillary information is passed as part of the
  133.    third message. In this way the responder can determine which
  134.    corresponding private key to use to decrypt the encrypted payloads
  135.    and identity protection is retained.
  136.  
  137.    The nonces are encrypted with the other party's public key.
  138.    The Key Exchange payloads (KE) and the identities 
  139.    of the parties (IDii and IDir) are encrypted with the negotiated 
  140.    symmetric encryption algorithm (e.g DES), using a key derived from 
  141.    the nonce. If the Initiator's certificate is passed from Initiator 
  142.    to Responder then, for anonymity, the certificate is also encrypted 
  143.    under the same key. In all these cases only the body of the payload 
  144.    is encrypted, the payload header is left in the clear; and the length
  145.    field in the payload header is the length of the ciphertext (including
  146.    any pre-pended information and padding) plus the size of the payload
  147.    header.
  148.    
  149.    That is, Phase 1 (Main Mode) is defined as follows.
  150.  
  151.  
  152.           Initiator                        Responder
  153.          -----------                      -----------
  154.           HDR, SA                   -->
  155.                                     <--    HDR, SA
  156.           HDR, [ HASH(1), ]
  157.             <Ni>PubKey_r            -->
  158.             <KE>Ke_i 
  159.             <IDii>Ke_i
  160.             [<Cert-I>Ke_i]
  161.                                     <--  HDR, <Nr>PubKey_i
  162.                                              <KE>Ke_r
  163.                                              <IDir>Ke_r
  164.           HDR*, HASH_I              -->
  165.                                     <--    HDR*, HASH_R
  166.  
  167.  
  168.  
  169.  
  170.  
  171. Canetti, Cheng, Krawczyk                                           [Page 2]
  172.  
  173. INTERNET DRAFT                                             July  1997
  174.  
  175.  
  176.  
  177.    HASH(1) is a hash (using the negotiated hash function) of the 
  178.    responder's certificate which the initiator is using to encrypt 
  179.    the nonce.
  180.  
  181.    The values of HASH_I and HASH_R are as defined in [HC97], namely,
  182.  
  183.       HASH_I = prf(SKEYID, g^xi | g^xr | CKY-I | CKY-R | SAp | IDii)
  184.       HASH_R = prf(SKEYID, g^xr | g^xi | CKY-R | CKY-I | SAp | IDir)
  185.  
  186.    with SKEYID (also defined in [HC97]) being:
  187.  
  188.       SKEYID = prf(Ni | Nr, CKY-I | CKY-R)
  189.  
  190.    The notation <...>PubKey refers to public key encryption
  191.    (e.g.  using the RSA algorithm) while the notation <...>Ke
  192.    refers to encryption under the negotiated symmetric cipher.
  193.    The keys for the symmetric cipher are derived as follows.
  194.    First, compute the values Ne_i and Ne_r:
  195.  
  196.          Ne_i = prf(Ni, CKY-I)
  197.          Ne_r = prf(Nr, CKY-R)
  198.  
  199.    Next, the keys Ke_i and Ke_r are derived from Ne_i and Ne_r,
  200.    respectively, in the way described in Appendix B of [HC97].
  201.    That is, to derive Ke_i run the procedure described in Appendix B of
  202.    [HC97] for deriving encryption keys used to protect the ISAKMP SA, 
  203.    but replacing SKEYID_e with Ne_i. To derive Ke_r run the
  204.    procedure described in Appendix B of [HC97], where SKEYID_e is 
  205.    replaced by Ne_r. 
  206.  
  207.    For completeness, we detail the  procedure for deriving Ke_i.
  208.    Ke_r is derived analogously. If the desired length of Ke_i is 
  209.    at most the length of Ne_i then Ke_i is the sufficient number 
  210.    of most significant bits of Ne_i. If the desired length of Ke_i 
  211.    exceeds the length of Ne_i then more bits are generated by applying 
  212.    the prf with Ne_i as the key and a byte of 0 as the input. 
  213.    The output of the prf is fed back into itself until sufficient 
  214.    number of bits are generated. For example, if the output of prf 
  215.    is 128-bit long and Ne_i needs to be 320-bit long, then Ne_i is 
  216.    the most significant 320 bits of K, where K = K1 | K2 | K3  and
  217.  
  218.            K1 = prf(Ne_i, 0)   
  219.            K2 = prf(Ne_i, K1)
  220.            K3 = prf(Ne_i, K2)
  221.  
  222.    Note that the values of Ke_i and Ke_r are ephemeral and discarded 
  223.    after this use. 
  224.  
  225.  
  226.  
  227. Canetti, Cheng, Krawczyk                                           [Page 3]
  228.  
  229. INTERNET DRAFT                                             July  1997
  230.  
  231.    If CBC mode is used for the symmetric encryption then the 
  232.    initialization vectors (IV) are set as follows. The IV for 
  233.    encrypting KE is set to 0. The IV for encrypting IDii (resp., IDir)   
  234.    is the last ciphertext block of <KE>Ke_i (resp., <KE>Ke_r). 
  235.    The IV for encrypting the certificate 
  236.    is the last ciphertext block of <IDii>Ke_i (resp., <IDir>Ke_r).
  237.    Encrypted payloads are padded up to the nearest block 
  238.    size. All padding bytes, except for the last one, contain 0x00. 
  239.    The last byte of the padding contains the number of the padding 
  240.    bytes used, excluding the last one.
  241.    Note that this means that there will always be padding.
  242.    Note also that the IV chaining method used here implies that KE,
  243.    the ID and the certificate have to be encrypted in that order.
  244.    (We stress that this encryption order does not require that these
  245.    payloads appear in that same order in the ISAKMP message; indeed 
  246.    [MSST96] does allow for arbitrary ordering of these payloads).
  247.  
  248.    When a Certificate payload is sent in the context of the Revised
  249.    Encryption Method, it MUST be encrypted in the manner described above.
  250.  
  251.  
  252.    Oakley Aggressive Mode in conjunction with the Revised Encryption 
  253.    Method is described as follows (using the same notation as above):
  254.  
  255.           Initiator                        Responder
  256.          -----------                      -----------
  257.           HDR, SA, [ HASH(1),] 
  258.             <Ni>Pubkey_r,
  259.             <KE>Ke_i  
  260.             <IDii>Ke_i               -->
  261.             [<Cert-I>Ke_i]
  262.                                            HDR, SA, <Nr>PubKey_i,
  263.                                                 <KE>Ke_r
  264.                                     <--         <IDir>Ke_r, HASH_R
  265.           HDR, HASH_I               -->
  266.  
  267.  
  268.  
  269.    RSA encryption MUST be encoded in PKCS #1 format.  The PKCS
  270.    #1 encoding allows for determination of the actual length of the
  271.    cleartext payload upon decryption.
  272.  
  273.  
  274.    4. Algorithms
  275.  
  276.    The above mode can use any public key encryption algorithm.
  277.    Implementations SHOULD support RSA encryption (see Appendix A
  278.    for the corresponding authentication method value), and MUST 
  279.    support DES-CBC as specified in [HC97] for payload encryption.
  280.  
  281. Canetti, Cheng, Krawczyk                                           [Page 4]
  282.  
  283. INTERNET DRAFT                                             July  1997
  284.  
  285.    5. Security Considerations 
  286.  
  287.    In this section we sketch the advantages of authentication by 
  288.    public-key encryption, as opposed to authentication by signature.
  289.    First, in the Encryption mode an attacker has to break BOTH the
  290.    the public key encryption in use (e.g. RSA) and DH exchange
  291.    in order to learn the agreed key. In the Signature Mode breaking the
  292.    DH exchange is sufficient. This is a substantial security advantage
  293.    in a scenario where the same prime is used  to secure a large number
  294.    of exchanges: such a prime will become an attractive
  295.    target for cryptanalysis, thus it may provide only weak security.
  296.    It also adds protection against a party that chooses weak parameters
  297.    in the DH exchange, such as a weak prime or short exponents.
  298.    This aspect of security is further enhanced by the encryption of the 
  299.    KE payload.
  300.  
  301.    Next, using encryption for authentication provides for a plausibly
  302.    deniable exchange. There is no proof (in contrast to the use of
  303.    digital signatures) that the conversation ever took place since each
  304.    party could have generated both sides of the exchange.
  305.  
  306.    Furthermore, unlike other authentication methods, authentication with
  307.    public key encryption allows for identity protection even in
  308.    Aggressive Mode (even certificates are protected in this case).
  309.  
  310.    We remark that both the ISAKMP/Oakley Encryption Method and the
  311.    Revised Encryption method described here are based on a similar
  312.    mode in [Kra96] where a more extensive discussion on the above issues
  313.    and analysis of security can be found.
  314.  
  315.  
  316.    6. Acknowledgments
  317.  
  318.    We thank Dan Harkins for helpful discussions and suggestions.
  319.  
  320.  
  321.    7. References
  322.  
  323.    [HC97] Harkins, D. and D. Carrel, "The resolution of ISAKMP with
  324.    Oakley", draft-ietf-ipsec-isakmp-oakley-04.txt, July 1997.
  325.  
  326.    [Kra96] Krawczyk, H., "SKEME: A Versatile Secure Key Exchange
  327.    Mechanism for Internet", from IEEE Proceedings of the 1996 Symposium
  328.    on Network and Distributed Systems Security.
  329.  
  330.    [MSST96] Maughhan, D., Schertler, M., Schneider, M., and Turner, J.,
  331.    "Internet Security Association and Key Management Protocol (ISAKMP)",
  332.    version 8, draft-ietf-ipsec-isakmp-08.{ps,txt}.
  333.  
  334.    [Pip96] Piper, D., "The Internet IP Security Domain Of Interpretation
  335.    for ISAKMP", version 3, draft-ietf-ipsec-ipsec-doi-03.txt.
  336.  
  337. Canetti, Cheng, Krawczyk                                           [Page 5]
  338.  
  339. INTERNET DRAFT                                             July  1997
  340.  
  341.    Appendix A: XCHG attribute assigned number
  342.    =========================================
  343.  
  344.    This Appendix defines a new authentication method value for the
  345.    Revised Encryption Method.  This value is to be negotiated in
  346.    Phase 1 (see [MSST96] and Appendix A in [HC97]).  The value is:
  347.  
  348.  
  349.              authentication method value
  350.              ---------------------------
  351.  
  352.               Revised RSA Encryption              5
  353.  
  354.  
  355.  
  356.  
  357.  
  358.  
  359.  
  360.  
  361.  
  362.  
  363.    Authors'  Addresses:
  364.    ====================
  365.  
  366.  
  367. Ran Canetti                              Pau-Chen Cheng
  368. IBM TJ Watson Research Center            IBM TJ Watson Research Center
  369. POB. 704, Yorktown Heights,              POB. 704, Yorktown Heights,
  370. NY 10598                                 NY 10598
  371. Tel. 1-914-784-7076                      Tel. 1-914-784-7446
  372. canetti@watson.ibm.com                   pau@watson.ibm.com
  373.  
  374. Hugo Krawczyk
  375. IBM TJ Watson Research Center            
  376. POB. 704, Yorktown Heights,             
  377. NY 10598       
  378. hugo@ee.technion.ac.il
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393. Canetti, Cheng, Krawczyk                                           [Page 6]
  394.  
  395.  
  396.  
  397.  
  398.  
  399.