home *** CD-ROM | disk | FTP | other *** search
/ Internet Core Protocols / Oreilly-InternetCoreProtocols.iso / RFCs / rfc2523.txt < prev    next >
Encoding:
Text File  |  1999-10-14  |  38.4 KB  |  1,180 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. Network Working Group                                            P. Karn
  8. Request for Comments: 2523                                      Qualcomm
  9. Category: Experimental                                        W. Simpson
  10.                                                               DayDreamer
  11.                                                               March 1999
  12.  
  13.  
  14.                Photuris: Extended Schemes and Attributes
  15.  
  16.  
  17. Status of this Memo
  18.  
  19.    This document defines an Experimental Protocol for the Internet
  20.    community.  It does not specify an Internet standard of any kind.
  21.    Discussion and suggestions for improvement are requested.
  22.    Distribution of this memo is unlimited.
  23.  
  24. Copyright Notice
  25.  
  26.    Copyright (C) The Internet Society (1999).  Copyright (C) Philip Karn
  27.    and William Allen Simpson (1994-1999).  All Rights Reserved.
  28.  
  29. Abstract
  30.  
  31.    Photuris is a session-key management protocol.  Extensible Exchange-
  32.    Schemes are provided to enable future implementation changes without
  33.    affecting the basic protocol.
  34.  
  35.    Additional authentication attributes are included for use with the IP
  36.    Authentication Header (AH) or the IP Encapsulating Security Protocol
  37.    (ESP).
  38.  
  39.    Additional confidentiality attributes are included for use with ESP.
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58. Karn & Simpson                Experimental                      [Page i]
  59.  
  60. RFC 2523                 Schemes and Attributes               March 1999
  61.  
  62.  
  63. Table of Contents
  64.  
  65.  
  66.      1.     Additional Exchange-Schemes ...........................    1
  67.  
  68.      2.     Additional Key-Generation-Function ....................    5
  69.         2.1       SHA1 Hash .......................................    5
  70.  
  71.      3.     Additional Privacy-Methods ............................    5
  72.         3.1       DES-CBC over Mask ...............................    5
  73.         3.2       DES-EDE3-CBC over Mask ..........................    6
  74.  
  75.      4.     Additional Validity-Method ............................    6
  76.         4.1       SHA1-IPMAC Check ................................    6
  77.  
  78.      5.     Additional Attributes .................................    7
  79.         5.1       SHA1-IPMAC ......................................    7
  80.            5.1.1  Symmetric Identification ........................    8
  81.            5.1.2  Authentication ..................................    9
  82.         5.2       RIPEMD-160-IPMAC ................................    9
  83.            5.2.1  Symmetric Identification ........................   10
  84.            5.2.2  Authentication ..................................   11
  85.         5.3       DES-CBC .........................................   11
  86.         5.4       Invert (Decryption/Encryption) ..................   12
  87.         5.5       XOR Whitening ...................................   13
  88.  
  89.      APPENDICES ...................................................   15
  90.  
  91.      A.     Exchange-Scheme Selection .............................   15
  92.         A.1       Responder .......................................   15
  93.         A.2       Initiator .......................................   15
  94.  
  95.      SECURITY CONSIDERATIONS ......................................   16
  96.  
  97.      ACKNOWLEDGEMENTS .............................................   16
  98.  
  99.      REFERENCES ...................................................   17
  100.  
  101.      CONTACTS .....................................................   18
  102.  
  103.      COPYRIGHT ....................................................   19
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114. Karn & Simpson                Experimental                     [Page ii]
  115.  
  116. RFC 2523                 Schemes and Attributes               March 1999
  117.  
  118.  
  119. 1.  Additional Exchange-Schemes
  120.  
  121.    The packet format and basic facilities are already defined for
  122.    Photuris [RFC-2522].
  123.  
  124.    These optional Exchange-Schemes are specified separately, and no
  125.    single implementation is expected to support all of them.
  126.  
  127.    This document defines the following values:
  128.  
  129.    (3)   Implementation Optional.  Any modulus (p) with a recommended
  130.          generator (g) of 3.  When the Exchange-Scheme Size is non-zero,
  131.          the modulus is contained in the Exchange-Scheme Value field in
  132.          the list of Offered-Schemes.
  133.  
  134.          An Exchange-Scheme Size of zero is invalid.
  135.  
  136.          Key-Generation-Function     "MD5 Hash"
  137.          Privacy-Method              "Simple Masking"
  138.          Validity-Method             "MD5-IPMAC Check"
  139.  
  140.          This combination of features requires a modulus with at least
  141.          64-bits of cryptographic strength.
  142.  
  143.    (4)   Implementation Optional.  Any modulus (p) with a recommended
  144.          generator (g) of 2.  When the Exchange-Scheme Size is non-zero,
  145.          the modulus is contained in the Exchange-Scheme Value field in
  146.          the list of Offered-Schemes.
  147.  
  148.          When the Exchange-Scheme Size field is zero, includes by
  149.          reference all of the moduli specified in the list of Offered-
  150.          Schemes for Scheme #2.
  151.  
  152.          Key-Generation-Function     "MD5 Hash"
  153.          Privacy-Method              "DES-CBC over Mask"
  154.          Validity-Method             "MD5-IPMAC Check"
  155.  
  156.          This combination of features requires a modulus with at least
  157.          64-bits of cryptographic strength.
  158.  
  159.    (5)   Implementation Optional.  Any modulus (p) with a recommended
  160.          generator (g) of 5.  When the Exchange-Scheme Size is non-zero,
  161.          the modulus is contained in the Exchange-Scheme Value field in
  162.          the list of Offered-Schemes.
  163.  
  164.          An Exchange-Scheme Size of zero is invalid.
  165.  
  166.  
  167.  
  168.  
  169.  
  170. Karn & Simpson                Experimental                      [Page 1]
  171.  
  172. RFC 2523                 Schemes and Attributes               March 1999
  173.  
  174.  
  175.  
  176.          Key-Generation-Function     "MD5 Hash"
  177.          Privacy-Method              "Simple Masking"
  178.          Validity-Method             "MD5-IPMAC Check"
  179.  
  180.          This combination of features requires a modulus with at least
  181.          64-bits of cryptographic strength.
  182.  
  183.    (6)   Implementation Optional.  Any modulus (p) with a recommended
  184.          generator (g) of 3.  When the Exchange-Scheme Size is non-zero,
  185.          the modulus is contained in the Exchange-Scheme Value field in
  186.          the list of Offered-Schemes.
  187.  
  188.          When the Exchange-Scheme Size field is zero, includes by
  189.          reference all of the moduli specified in the list of Offered-
  190.          Schemes for Scheme #3.
  191.  
  192.          Key-Generation-Function     "MD5 Hash"
  193.          Privacy-Method              "DES-CBC over Mask"
  194.          Validity-Method             "MD5-IPMAC Check"
  195.  
  196.          This combination of features requires a modulus with at least
  197.          64-bits of cryptographic strength.
  198.  
  199.    (7)   Implementation Optional.  Any modulus (p) with a variable
  200.          generator (g).  When the Exchange-Scheme Size is non-zero, the
  201.          pair [g,p] is contained in the Exchange-Scheme Value field in
  202.          the list of Offered-Schemes.  Each is encoded in a separate
  203.          Variable Precision Integer (VPI).  The generator VPI is
  204.          followed by (concatenated to) the modulus VPI, and the result
  205.          is nested inside the Exchange-Scheme Value field.
  206.  
  207.          An Exchange-Scheme Size of zero is invalid.
  208.  
  209.          Key-Generation-Function     "MD5 Hash"
  210.          Privacy-Method              "Simple Masking"
  211.          Validity-Method             "MD5-IPMAC Check"
  212.  
  213.          This combination of features requires a modulus with at least
  214.          64-bits of cryptographic strength.
  215.  
  216.          When more than one modulus is specified for a given kind of
  217.          Scheme, the Size of the modulus MUST be unique, independent of
  218.          the Size of the generator.
  219.  
  220.    (8)   Implementation Optional.  Any modulus (p) with a recommended
  221.          generator (g) of 2.  When the Exchange-Scheme Size is non-zero,
  222.          the modulus is contained in the Exchange-Scheme Value field in
  223.  
  224.  
  225.  
  226. Karn & Simpson                Experimental                      [Page 2]
  227.  
  228. RFC 2523                 Schemes and Attributes               March 1999
  229.  
  230.  
  231.          the list of Offered-Schemes.
  232.  
  233.          When the Exchange-Scheme Size field is zero, includes by
  234.          reference all of the moduli specified in the list of Offered-
  235.          Schemes for Schemes #2 and #4.
  236.  
  237.          Key-Generation-Function     "SHA1 Hash"
  238.          Privacy-Method              "DES-EDE3-CBC over Mask"
  239.          Validity-Method             "SHA1-IPMAC Check"
  240.  
  241.          This combination of features requires a modulus with at least
  242.          112-bits of cryptographic strength.
  243.  
  244.    (10)  Implementation Optional.  Any modulus (p) with a recommended
  245.          generator (g) of 5.  When the Exchange-Scheme Size is non-zero,
  246.          the modulus is contained in the Exchange-Scheme Value field in
  247.          the list of Offered-Schemes.
  248.  
  249.          When the Exchange-Scheme Size field is zero, includes by
  250.          reference all of the moduli specified in the list of Offered-
  251.          Schemes for Scheme #5.
  252.  
  253.          Key-Generation-Function     "MD5 Hash"
  254.          Privacy-Method              "DES-CBC over Mask"
  255.          Validity-Method             "MD5-IPMAC Check"
  256.  
  257.          This combination of features requires a modulus with at least
  258.          64-bits of cryptographic strength.
  259.  
  260.    (12)  Implementation Optional.  Any modulus (p) with a recommended
  261.          generator (g) of 3.  When the Exchange-Scheme Size is non-zero,
  262.          the modulus is contained in the Exchange-Scheme Value field in
  263.          the list of Offered-Schemes.
  264.  
  265.          When the Exchange-Scheme Size field is zero, includes by
  266.          reference all of the moduli specified in the list of Offered-
  267.          Schemes for Schemes #3 and #6.
  268.  
  269.          Key-Generation-Function     "SHA1 Hash"
  270.          Privacy-Method              "DES-EDE3-CBC over Mask"
  271.          Validity-Method             "SHA1-IPMAC Check"
  272.  
  273.          This combination of features requires a modulus with at least
  274.          112-bits of cryptographic strength.
  275.  
  276.    (14)  Implementation Optional.  Any modulus (p) with a variable
  277.          generator (g).  When the Exchange-Scheme Size is non-zero, the
  278.          pair [g,p] is contained in the Exchange-Scheme Value field in
  279.  
  280.  
  281.  
  282. Karn & Simpson                Experimental                      [Page 3]
  283.  
  284. RFC 2523                 Schemes and Attributes               March 1999
  285.  
  286.  
  287.          the list of Offered-Schemes.  Each is encoded in a separate
  288.          Variable Precision Integer (VPI).  The generator VPI is
  289.          followed by (concatenated to) the modulus VPI, and the result
  290.          is nested inside the Exchange-Scheme Value field.
  291.  
  292.          When the Exchange-Scheme Size field is zero, includes by
  293.          reference all of the moduli specified in the list of Offered-
  294.          Schemes for Scheme #7.
  295.  
  296.          Key-Generation-Function     "MD5 Hash"
  297.          Privacy-Method              "DES-CBC over Mask"
  298.          Validity-Method             "MD5-IPMAC Check"
  299.  
  300.          This combination of features requires a modulus with at least
  301.          64-bits of cryptographic strength.
  302.  
  303.          When more than one modulus is specified for a given kind of
  304.          Scheme, the Size of the modulus MUST be unique, independent of
  305.          the Size of the generator.
  306.  
  307.    (20)  Implementation Optional.  Any modulus (p) with a recommended
  308.          generator (g) of 5.  When the Exchange-Scheme Size is non-zero,
  309.          the modulus is contained in the Exchange-Scheme Value field in
  310.          the list of Offered-Schemes.
  311.  
  312.          When the Exchange-Scheme Size field is zero, includes by
  313.          reference all of the moduli specified in the list of Offered-
  314.          Schemes for Schemes #5 and #10.
  315.  
  316.          Key-Generation-Function     "SHA1 Hash"
  317.          Privacy-Method              "DES-EDE3-CBC over Mask"
  318.          Validity-Method             "SHA1-IPMAC Check"
  319.  
  320.          This combination of features requires a modulus with at least
  321.          112-bits of cryptographic strength.
  322.  
  323.    (28)  Implementation Optional.  Any modulus (p) with a variable
  324.          generator (g).  When the Exchange-Scheme Size is non-zero, the
  325.          pair [g,p] is contained in the Exchange-Scheme Value field in
  326.          the list of Offered-Schemes.  Each is encoded in a separate
  327.          Variable Precision Integer (VPI).  The generator VPI is
  328.          followed by (concatenated to) the modulus VPI, and the result
  329.          is nested inside the Exchange-Scheme Value field.
  330.  
  331.          When the Exchange-Scheme Size field is zero, includes by
  332.          reference all of the moduli specified in the list of Offered-
  333.          Schemes for Schemes #7 and #14.
  334.  
  335.  
  336.  
  337.  
  338. Karn & Simpson                Experimental                      [Page 4]
  339.  
  340. RFC 2523                 Schemes and Attributes               March 1999
  341.  
  342.  
  343.  
  344.          Key-Generation-Function     "SHA1 Hash"
  345.          Privacy-Method              "DES-EDE3-CBC over Mask"
  346.          Validity-Method             "SHA1-IPMAC Check"
  347.  
  348.          This combination of features requires a modulus with at least
  349.          112-bits of cryptographic strength.
  350.  
  351.          When more than one modulus is specified for a given kind of
  352.          Scheme, the Size of the modulus MUST be unique, independent of
  353.          the Size of the generator.
  354.  
  355.  
  356.  
  357. 2.  Additional Key-Generation-Function
  358. 2.1.  SHA1 Hash
  359.  
  360.    SHA1 [FIPS-180-1] is used as a pseudo-random-function for generating
  361.    the key(s).  The key(s) begin with the most significant bits of the
  362.    hash.  SHA1 is iterated as needed to generate the requisite length of
  363.    key material.
  364.  
  365.    When an individual key does not use all 160-bits of the last hash,
  366.    any remaining unused (least significant) bits of the last hash are
  367.    discarded.  When combined with other uses of key generation for the
  368.    same purpose, the next key will begin with a new hash iteration.
  369.  
  370.  
  371. 3.  Additional Privacy-Methods
  372. 3.1.  DES-CBC over Mask
  373.  
  374.    As described in [RFC-2522] "Privacy-Key Computation", sufficient
  375.    privacy-key material is generated to match the message length,
  376.    beginning with the next field after the SPI, and including the
  377.    Padding.  The message is masked by XOR with the privacy-key.
  378.  
  379.    Then, the Key-Generation-Function is iterated to generate a DES key.
  380.    The most significant 64-bits (8 bytes) of the generated hash are used
  381.    for the privacy-key, and the remainder are discarded.  Although
  382.    extremely rare, the 64 weak, semi-weak, and possibly weak keys
  383.    [Schneier95, pages 280-282] are discarded.  The Key-Generation-
  384.    Function is iterated until a valid key is obtained.
  385.  
  386.    The least significant bit of each key byte is ignored (or set to
  387.    parity when the implementation requires).
  388.  
  389.    The 64-bit CBC IV is zero.  Message encryption begins with the next
  390.    field after the SPI, and continues to the end of the data indicated
  391.  
  392.  
  393.  
  394. Karn & Simpson                Experimental                      [Page 5]
  395.  
  396. RFC 2523                 Schemes and Attributes               March 1999
  397.  
  398.  
  399.    by the UDP Length.
  400.  
  401.  
  402. 3.2.  DES-EDE3-CBC over Mask
  403.  
  404.    This is "Triple DES" outer-CBC EDE encryption (and DED decryption)
  405.    with three 56-bit keys [KR96].
  406.  
  407.    As described in [RFC-2522] "Privacy-Key Computation", sufficient
  408.    privacy-key material is generated to match the message length,
  409.    beginning with the next field after the SPI, and including the
  410.    Padding.  The message is masked by XOR with the privacy-key.
  411.  
  412.    Then, the Key-Generation-Function is iterated (at least) three times
  413.    to generate the three DES keys.  The most significant 64-bits (8
  414.    bytes) of each generated hash are used for each successive privacy-
  415.    key, and the remainder are discarded.  Each key is examined
  416.    sequentially, in the order used for encryption.  A key that is
  417.    identical to a previous key MUST be discarded.  Although extremely
  418.    rare, the 64 weak, semi-weak, and possibly weak keys [Schneier95,
  419.    pages 280-282] MUST be discarded.  The Key-Generation-Function is
  420.    iterated until a valid key is obtained before generating the next
  421.    key.
  422.  
  423.    In all three keys, the least significant bit of each key byte is
  424.    ignored (or set to parity when the implementation requires).
  425.  
  426.    The 64-bit CBC IV is zero.  Message encryption begins with the next
  427.    field after the SPI, and continues to the end of the data indicated
  428.    by the UDP Length.
  429.  
  430.  
  431. 4.  Additional Validity-Method
  432. 4.1.  SHA1-IPMAC Check
  433.  
  434.    As described in [RFC-2522] "Validity Verification", the Verification
  435.    field value is the SHA1 [FIPS-180-1] hash over the concatenation of
  436.  
  437.       SHA1( key, keyfill, data, datafill, key, mdfill )
  438.  
  439.    where the key is the computed verification-key.
  440.  
  441.    The keyfill and datafill use the same pad-with-length technique
  442.    defined for mdfill.  This padding and length is implicit, and does
  443.    not appear in the datagram.
  444.  
  445.    The resulting Verification field is a 160-bit Variable Precision
  446.    Integer (22 bytes including Size).  When used in calculations, the
  447.  
  448.  
  449.  
  450. Karn & Simpson                Experimental                      [Page 6]
  451.  
  452. RFC 2523                 Schemes and Attributes               March 1999
  453.  
  454.  
  455.    Verification data includes both the Size and Value fields.
  456.  
  457.  
  458. 5.  Additional Attributes
  459.  
  460.    The attribute format and basic facilities are already defined for
  461.    Photuris [RFC-2522].
  462.  
  463.    These optional attributes are specified separately, and no single
  464.    implementation is expected to support all of them.
  465.  
  466.    This document defines the following values:
  467.  
  468.      Use    Type
  469.      AEI      6  SHA1-IPMAC
  470.      AEI      7  RIPEMD-160-IPMAC
  471.       E       8  DES-CBC
  472.       E       9  Invert (Decryption/Encryption)
  473.       E      10  XOR
  474.  
  475.      A      AH Attribute-Choice
  476.       E     ESP Attribute-Choice
  477.        I    Identity-Choice
  478.         X   dependent on list location
  479.  
  480.  
  481.  
  482. 5.1.  SHA1-IPMAC
  483.  
  484.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  485.    |   Attribute   |    Length     |
  486.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  487.  
  488.  
  489.    Attribute        6
  490.  
  491.    Length           0
  492.  
  493.  
  494.  
  495.  
  496.  
  497.  
  498.  
  499.  
  500.  
  501.  
  502.  
  503.  
  504.  
  505.  
  506. Karn & Simpson                Experimental                      [Page 7]
  507.  
  508. RFC 2523                 Schemes and Attributes               March 1999
  509.  
  510.  
  511. 5.1.1.  Symmetric Identification
  512.  
  513.    When selected as an Identity-Choice, the immediately following
  514.    Identification field contains an unstructured Variable Precision
  515.    Integer.  Valid Identifications and symmetric secret-keys are
  516.    preconfigured by the parties.
  517.  
  518.    There is no required format or content for the Identification value.
  519.    The value may be a number or string of any kind.  See [RFC-2522] "Use
  520.    of Identification and Secrets" for details.
  521.  
  522.    The symmetric secret-key (as specified) is selected based on the
  523.    contents of the Identification field.  All implementations MUST
  524.    support at least 62 bytes.  The selected symmetric secret-key SHOULD
  525.    provide at least 80-bits of cryptographic strength.
  526.  
  527.    As described in [RFC-2522] "Identity Verification", the Verification
  528.    field value is the SHA1 [FIPS-180-1] hash over the concatenation of:
  529.  
  530.       SHA1( key, keyfill, data, datafill, key, mdfill )
  531.  
  532.    where the key is the computed verification-key.
  533.  
  534.    The keyfill and datafill use the same pad-with-length technique
  535.    defined for mdfill.  This padding and length is implicit, and does
  536.    not appear in the datagram.
  537.  
  538.    The resulting Verification field is a 160-bit Variable Precision
  539.    Integer (22 bytes including Size).  When used in calculations, the
  540.    Verification data includes both the Size and Value fields.
  541.  
  542.    For both [RFC-2522] "Identity Verification" and "Validity
  543.    Verification", the verification-key is the SHA1 [FIPS-180-1] hash of
  544.    the following concatenated values:
  545.  
  546.     + the symmetric secret-key,
  547.     + the computed shared-secret.
  548.  
  549.    For [RFC-2522] "Session-Key Computation", the symmetric secret-key is
  550.    used directly as the generation-key.
  551.  
  552.    The symmetric secret-key is used in calculations in the same fashion
  553.    as [RFC-2522] "MD5-IPMAC Symmetric Identification".
  554.  
  555.  
  556.  
  557.  
  558.  
  559.  
  560.  
  561.  
  562. Karn & Simpson                Experimental                      [Page 8]
  563.  
  564. RFC 2523                 Schemes and Attributes               March 1999
  565.  
  566.  
  567. 5.1.2.  Authentication
  568.  
  569.    May be selected as an AH or ESP Attribute-Choice, pursuant to [RFC-
  570.    1852] et sequitur.  The selected Exchange-Scheme SHOULD provide at
  571.    least 80-bits of cryptographic strength.
  572.  
  573.    As described in [RFC-2522] "Session-Key Computation", the most
  574.    significant 384-bits (48 bytes) of the Key-Generation-Function
  575.    iterations are used for the key.
  576.  
  577.    Profile:
  578.  
  579.       When negotiated with Photuris, the transform differs slightly from
  580.       [RFC-1852].
  581.  
  582.       The form of the authenticated message is:
  583.  
  584.          SHA1( key, keyfill, datagram, datafill, key, mdfill )
  585.  
  586.       where the key is the SPI session-key.
  587.  
  588.       The additional datafill protects against the attack described in
  589.       [PO96].  The keyfill and datafill use the same pad-with-length
  590.       technique defined for mdfill.  This padding and length is
  591.       implicit, and does not appear in the datagram.
  592.  
  593.  
  594. 5.2.  RIPEMD-160-IPMAC
  595.  
  596.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  597.    |   Attribute   |    Length     |
  598.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  599.  
  600.  
  601.    Attribute        7
  602.  
  603.    Length           0
  604.  
  605.  
  606.  
  607.  
  608.  
  609.  
  610.  
  611.  
  612.  
  613.  
  614.  
  615.  
  616.  
  617.  
  618. Karn & Simpson                Experimental                      [Page 9]
  619.  
  620. RFC 2523                 Schemes and Attributes               March 1999
  621.  
  622.  
  623. 5.2.1.  Symmetric Identification
  624.  
  625.    When selected as an Identity-Choice, the immediately following
  626.    Identification field contains an unstructured Variable Precision
  627.    Integer.  Valid Identifications and symmetric secret-keys are
  628.    preconfigured by the parties.
  629.  
  630.    There is no required format or content for the Identification value.
  631.    The value may be a number or string of any kind.  See [RFC-2522] "Use
  632.    of Identification and Secrets" for details.
  633.  
  634.    The symmetric secret-key (as specified) is selected based on the
  635.    contents of the Identification field.  All implementations MUST
  636.    support at least 62 bytes.  The selected symmetric secret-key SHOULD
  637.    provide at least 80-bits of cryptographic strength.
  638.  
  639.    As described in [RFC-2522] "Identity Verification", the Verification
  640.    field value is the RIPEMD-160 [DBP96] hash over the concatenation of:
  641.  
  642.       RIPEMD160( key, keyfill, data, datafill, key, mdfill )
  643.  
  644.    where the key is the computed verification-key.
  645.  
  646.    The keyfill and datafill use the same pad-with-length technique
  647.    defined for mdfill.  This padding and length is implicit, and does
  648.    not appear in the datagram.
  649.  
  650.    The resulting Verification field is a 160-bit Variable Precision
  651.    Integer (22 bytes including Size).  When used in calculations, the
  652.    Verification data includes both the Size and Value fields.
  653.  
  654.    For both [RFC-2522] "Identity Verification" and "Validity
  655.    Verification", the verification-key is the RIPEMD-160 [DBP96] hash of
  656.    the following concatenated values:
  657.  
  658.     + the symmetric secret-key,
  659.     + the computed shared-secret.
  660.  
  661.    For [RFC-2522] "Session-Key Computation", the symmetric secret-key is
  662.    used directly as the generation-key.
  663.  
  664.    The symmetric secret-key is used in calculations in the same fashion
  665.    as [RFC-2522] "MD5-IPMAC Symmetric Identification".
  666.  
  667.  
  668.  
  669.  
  670.  
  671.  
  672.  
  673.  
  674. Karn & Simpson                Experimental                     [Page 10]
  675.  
  676. RFC 2523                 Schemes and Attributes               March 1999
  677.  
  678.  
  679. 5.2.2.  Authentication
  680.  
  681.    May be selected as an AH or ESP Attribute-Choice.  The selected
  682.    Exchange-Scheme SHOULD provide at least 80-bits of cryptographic
  683.    strength.
  684.  
  685.    As described in [RFC-2522] "Session-Key Computation", the most
  686.    significant 384-bits (48 bytes) of the Key-Generation-Function
  687.    iterations are used for the key.
  688.  
  689.    Profile:
  690.  
  691.       When negotiated with Photuris, the form of the authenticated
  692.       message is:
  693.  
  694.          RIPEMD160( key, keyfill, datagram, datafill, key, mdfill )
  695.  
  696.       where the key is the SPI session-key.
  697.  
  698.       The additional datafill protects against the attack described in
  699.       [PO96].  The keyfill and datafill use the same pad-with-length
  700.       technique defined for mdfill.  This padding and length is
  701.       implicit, and does not appear in the datagram.
  702.  
  703.  
  704. 5.3.  DES-CBC
  705.  
  706.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  707.    |   Attribute   |    Length     |
  708.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  709.  
  710.  
  711.    Attribute        8
  712.  
  713.    Length           0
  714.  
  715.    May be selected as an ESP Attribute-Choice, pursuant to [RFC-1829] et
  716.    sequitur.  The selected Exchange-Scheme SHOULD provide at least 56-
  717.    bits of cryptographic strength.
  718.  
  719.    As described in [RFC-2522] "Session-Key Computation", the most
  720.    significant 64-bits (8 bytes) of the Key-Generation iteration are
  721.    used for the key, and the remainder are discarded.  Although
  722.    extremely rare, the 64 weak, semi-weak, and possibly weak keys
  723.    [Schneier95, pages 280-282] MUST be discarded.  The Key-Generation-
  724.    Function is iterated until a valid key is obtained.
  725.  
  726.    The least significant bit of each key byte is ignored (or set to
  727.  
  728.  
  729.  
  730. Karn & Simpson                Experimental                     [Page 11]
  731.  
  732. RFC 2523                 Schemes and Attributes               March 1999
  733.  
  734.  
  735.    parity when the implementation requires).
  736.  
  737.    Profile:
  738.  
  739.       When negotiated with Photuris, the transform differs slightly from
  740.       [RFC-1829].
  741.  
  742.       The 32-bit Security Parameters Index (SPI) field is followed by a
  743.       32-bit Sequence Number (SN).
  744.  
  745.       The 64-bit CBC IV is generated from the 32-bit Security Parameters
  746.       Index (SPI) field followed by (concatenated with) the 32-bit
  747.       Sequence Number (SN) field.  Then, the bit-wise complement of the
  748.       32-bit Sequence Number (SN) value is XOR'd with the first 32-bits
  749.       (SPI):
  750.  
  751.          (SPI ^ -SN) || SN
  752.  
  753.       The Padding values begin with the value 1, and count up to the
  754.       number of padding bytes.  For example, if the plaintext length is
  755.       41, the padding values are 1, 2, 3, 4, 5, 6 and 7, plus any
  756.       additional obscuring padding.
  757.  
  758.       The PadLength and PayloadType are not appended.  Instead, the
  759.       PayloadType is indicated by the SPI, as specified by the ESP-
  760.       Attributes attribute (#2).
  761.  
  762.       After decryption, if the padding bytes are not the correct
  763.       sequential values, then the payload is discarded, and a
  764.       "Decryption Failed" error is indicated, as described in [RFC-
  765.       2521].
  766.  
  767.  
  768. 5.4.  Invert (Decryption/Encryption)
  769.  
  770.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  771.    |   Attribute   |    Length     |
  772.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  773.  
  774.  
  775.    Attribute        9
  776.  
  777.    Length           0
  778.  
  779.    May be selected as an ESP Attribute-Choice, immediately preceding an
  780.    encryption choice.  This indicates that the following attribute is
  781.    inverted from encryption to decryption (or decryption to encryption)
  782.    as the attributes are processed.
  783.  
  784.  
  785.  
  786. Karn & Simpson                Experimental                     [Page 12]
  787.  
  788. RFC 2523                 Schemes and Attributes               March 1999
  789.  
  790.  
  791.    For example, the combination
  792.  
  793.       "DES-CBC",
  794.       "Invert",
  795.       "DES-CBC",
  796.       "DES-CBC",
  797.  
  798.    indicates "Triple DES" outer-CBC EDE encryption (and DED decryption)
  799.    with three keys [KR96] pursuant to [RFC-1851] et sequitur.  The
  800.    selected Exchange-Scheme SHOULD provide at least 112-bits of
  801.    cryptographic strength.
  802.  
  803.    As described in [RFC-2522] "Session-Key Computation", the Key-
  804.    Generation-Function is iterated (at least) three times to generate
  805.    the three independent keys, in the order used for encryption.  The
  806.    most significant 64-bits (8 bytes) of each iteration are used for
  807.    each successive key, and the remainder are discarded.
  808.  
  809.    Each key is examined sequentially, in the order used for encryption.
  810.    A key that is identical to any previous key MUST be discarded.  Any
  811.    weak keys indicated for the algorithm MUST be discarded.  The Key-
  812.    Generation-Function is iterated until a valid key is obtained before
  813.    generating the next key.
  814.  
  815.    Profile:
  816.  
  817.       When negotiated with Photuris, the "DES-EDE3-CBC" transform
  818.       differs slightly from [RFC-1851], in the same fashion as "DES-CBC"
  819.       (described earlier).
  820.  
  821.  
  822. 5.5.  XOR Whitening
  823.  
  824.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  825.    |   Attribute   |    Length     |
  826.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  827.  
  828.  
  829.    Attribute        10
  830.  
  831.    Length           0
  832.  
  833.    May be selected as an ESP Attribute-Choice, pursuant to [XEX3] et
  834.    sequitur.  The combination
  835.  
  836.       "XOR",
  837.       "DES-CBC",
  838.       "XOR",
  839.  
  840.  
  841.  
  842. Karn & Simpson                Experimental                     [Page 13]
  843.  
  844. RFC 2523                 Schemes and Attributes               March 1999
  845.  
  846.  
  847.    indicates "DESX" encryption with three keys [KR96].  The selected
  848.    Exchange-Scheme SHOULD provide at least 104-bits of cryptographic
  849.    strength.
  850.  
  851.    As described in [RFC-2522] "Session-Key Computation", the Key-
  852.    Generation-Function is iterated (at least) three times to generate
  853.    the three independent keys, in the order used for encryption.  The
  854.    most significant bytes of each iteration are used for each successive
  855.    key, and the remainder are discarded.
  856.  
  857.    Note that this attribute may appear multiple times in the same ESP
  858.    attribute list, both before and after an encryption transform.  For
  859.    example,
  860.  
  861.       "XOR",
  862.       "DES-CBC",
  863.       "XOR",
  864.       "Invert",
  865.       "DES-CBC",
  866.       "XOR",
  867.       "DES-CBC",
  868.       "XOR",
  869.  
  870.    would be one possible combination with Triple DES.
  871.  
  872.  
  873.  
  874.  
  875.  
  876.  
  877.  
  878.  
  879.  
  880.  
  881.  
  882.  
  883.  
  884.  
  885.  
  886.  
  887.  
  888.  
  889.  
  890.  
  891.  
  892.  
  893.  
  894.  
  895.  
  896.  
  897.  
  898. Karn & Simpson                Experimental                     [Page 14]
  899.  
  900. RFC 2523                 Schemes and Attributes               March 1999
  901.  
  902.  
  903. A.  Exchange-Scheme Selection
  904.  
  905.    At first glance, there appear to be a large number of exchange-
  906.    schemes.  In practice, the selection is simple to automate.
  907.  
  908.    Each scheme indicates a needed strength.  This strength is based upon
  909.    the functions used in protecting the Photuris Exchanges themselves.
  910.  
  911.    Each keyed attribute also indicates a needed strength.  This strength
  912.    is based upon its cryptographic functions.
  913.  
  914.    Because the usage of these functions is orthogonal, the same strength
  915.    value can select an appropriate scheme that meets the needs of both
  916.    features.
  917.  
  918.  
  919. A.1.  Responder
  920.  
  921.    The attributes to be offered to the particular Initiator are
  922.    examined.  For each level of strength specified, a scheme that meets
  923.    or exceeds the requirements is offered.
  924.  
  925.    For example, a Responder offering MD5-IPMAC and SHA1-IPMAC might
  926.    offer scheme #2 with a 512-bit modulus and a 1024-bit modulus, and
  927.    scheme #4 with a zero Size (indicating moduli of #2).
  928.  
  929.  
  930. A.2.  Initiator
  931.  
  932.    The strength indicated by the application for the Security
  933.    Association, together with the party privacy policy of the system
  934.    operator, is used to select from the offered schemes.  The strength
  935.    indicates the minimal level to be chosen, while the party privacy
  936.    policy indicates whether to choose the minimal or maximal level of
  937.    available protection.
  938.  
  939.    For example, an application might indicate that it desires 80-bits of
  940.    strength.  In that case, only the 1024-bit modulus would be
  941.    appropriate.  The party privacy policy of the system operator would
  942.    indicate whether to choose scheme #2 with "Simple Masking" or scheme
  943.    #4 with "DES-CBC over Mask".
  944.  
  945.    Alternatively, an application might indicate that it desires 64-bits
  946.    of strength.  The party privacy policy of the system operator would
  947.    indicate whether to choose scheme #2 with the 512-bit modulus, or
  948.    scheme #4 with the 1024-bit modulus.
  949.  
  950.  
  951.  
  952.  
  953.  
  954. Karn & Simpson                Experimental                     [Page 15]
  955.  
  956. RFC 2523                 Schemes and Attributes               March 1999
  957.  
  958.  
  959. Security Considerations
  960.  
  961.    Provision for multiple generators does not enhance the security of
  962.    the Photuris protocol exchange itself.  Rather, it provides an
  963.    opportunity for novelty of moduli, by allowing more forms of moduli
  964.    to be used.  An abundance of moduli inhibits a determined attacker
  965.    from pre-calculating moduli exchange values, and discourages
  966.    dedication of resources for analysis of any particular modulus.  That
  967.    is, this protects the community of Photuris users.
  968.  
  969.    In addition to preventing various attacks by protecting verification
  970.    fields, the masking of the message plaintext before encryption is
  971.    intended to obscure the relation of the number of parties and SPIs
  972.    active between two IP nodes.  The privacy mask dependency on the SPI
  973.    and SPILT generates a different initial encrypted block for every SPI
  974.    creation message.
  975.  
  976.    This obscurement would be less effective when the SPI and SPILT are
  977.    invariant or are not created for a particular exchange direction.
  978.    The number of parties could be revealed by the number of exchanges
  979.    with differences in the initial encrypted blocks.
  980.  
  981.  
  982. Acknowledgements
  983.  
  984.    Phil Karn was principally responsible for the design of party privacy
  985.    protection, and provided much of the design rationale text (now
  986.    removed to a separate document).
  987.  
  988.    William Simpson was responsible for the packet formats, and
  989.    additional Exchange-Schemes, editing and formatting.  All such
  990.    mistakes are his responsibity.
  991.  
  992.    Use of encryption for privacy protection is also found in the
  993.    Station-To-Station authentication protocol [DOW92].
  994.  
  995.    Bart Preneel and Paul C van Oorschot in [PO96] recommended padding
  996.    between the data and trailing key when hashing for authentication.
  997.  
  998.    Niels Provos developed the first implementation with multiple schemes
  999.    and multiple moduli per scheme (circa July 1997).
  1000.  
  1001.    Special thanks to the Center for Information Technology Integration
  1002.    (CITI) for providing computing resources.
  1003.  
  1004.  
  1005.  
  1006.  
  1007.  
  1008.  
  1009.  
  1010. Karn & Simpson                Experimental                     [Page 16]
  1011.  
  1012. RFC 2523                 Schemes and Attributes               March 1999
  1013.  
  1014.  
  1015. References
  1016.  
  1017.    [DBP96]     Dobbertin, H., Bosselaers, A., and Preneel, B., "RIPEMD-
  1018.                160: a strengthened version of RIPEMD", Fast Software
  1019.                Encryption, Third International Workshop, Lecture Notes
  1020.                in Computer Science 1039 (1996), Springer-Verlag, pages
  1021.                71-82.
  1022.  
  1023.                See also corrections at
  1024.                ftp://ftp.esat.kuleuven.ac.be/pub/COSIC/bosselae/ripemd/.
  1025.  
  1026.    [DOW92]     Whitfield Diffie, Paul C van Oorshot, and Michael J
  1027.                Wiener, "Authentication and Authenticated Key Exchanges",
  1028.                Designs, Codes and Cryptography, v 2 pp 107-125, Kluwer
  1029.                Academic Publishers, 1992.
  1030.  
  1031.    [FIPS-180-1]
  1032.                "Secure Hash Standard", National Institute of Standards
  1033.                and Technology, U.S. Department Of Commerce, April 1995.
  1034.  
  1035.                Also known as: 59 Fed Reg 35317 (1994).
  1036.  
  1037.    [KR96]      Kaliski, B., and Robshaw, M., "Multiple Encryption:
  1038.                Weighing Security and Performance", Dr. Dobbs Journal,
  1039.                January 1996.
  1040.  
  1041.    [PO96]      Bart Preneel, and Paul C van Oorshot, "On the security of
  1042.                two MAC algorithms", Advances in Cryptology -- Eurocrypt
  1043.                '96, Lecture Notes in Computer Science 1070 (May 1996),
  1044.                Springer-Verlag, pages 19-32.
  1045.  
  1046.    [RFC-1829]  Karn, P., Metzger, P., Simpson, W., "The ESP DES-CBC
  1047.                Transform", July 1995.
  1048.  
  1049.    [RFC-1850]  Karn, P., Metzger, P., Simpson, W., "The ESP Triple DES
  1050.                Transform", September 1995.
  1051.  
  1052.    [RFC-1851]  Metzger, P., Simpson, W., "IP Authentication using Keyed
  1053.                SHA", September 1995.
  1054.  
  1055.    [RFC-2521]  Karn, P., and Simpson, W., "ICMP Security Failures
  1056.                Messages", March 1999.
  1057.  
  1058.    [RFC-2522]  Karn, P., and Simpson, W., "Photuris: Session-Key
  1059.                Management Protocol", March 1999.
  1060.  
  1061.    [XEX3]      Simpson, W., Baldwin, R., "The ESP DES-XEX3-CBC
  1062.                Transform", Work In Progress, June 1997.
  1063.  
  1064.  
  1065.  
  1066. Karn & Simpson                Experimental                     [Page 17]
  1067.  
  1068. RFC 2523                 Schemes and Attributes               March 1999
  1069.  
  1070.  
  1071. Contacts
  1072.  
  1073.    Comments about this document should be discussed on the
  1074.    photuris@adk.gr mailing list.
  1075.  
  1076.    Questions about this document can also be directed to:
  1077.  
  1078.       Phil Karn
  1079.       Qualcomm, Inc.
  1080.       6455 Lusk Blvd.
  1081.       San Diego, California  92121-2779
  1082.  
  1083.           karn@qualcomm.com
  1084.           karn@unix.ka9q.ampr.org (preferred)
  1085.  
  1086.  
  1087.       William Allen Simpson
  1088.       DayDreamer
  1089.       Computer Systems Consulting Services
  1090.       1384 Fontaine
  1091.       Madison Heights, Michigan  48071
  1092.  
  1093.           wsimpson@UMich.edu
  1094.           wsimpson@GreenDragon.com (preferred)
  1095.  
  1096.  
  1097.  
  1098.  
  1099.  
  1100.  
  1101.  
  1102.  
  1103.  
  1104.  
  1105.  
  1106.  
  1107.  
  1108.  
  1109.  
  1110.  
  1111.  
  1112.  
  1113.  
  1114.  
  1115.  
  1116.  
  1117.  
  1118.  
  1119.  
  1120.  
  1121.  
  1122. Karn & Simpson                Experimental                     [Page 18]
  1123.  
  1124. RFC 2523                 Schemes and Attributes               March 1999
  1125.  
  1126.  
  1127. Full Copyright Statement
  1128.  
  1129.    Copyright (C) The Internet Society (1999).  Copyright (C) Philip Karn
  1130.    and William Allen Simpson (1994-1999).  All Rights Reserved.
  1131.  
  1132.    This document and translations of it may be copied and furnished to
  1133.    others, and derivative works that comment on or otherwise explain it
  1134.    or assist in its implementation may be prepared, copied, published
  1135.    and distributed, in whole or in part, without restriction of any
  1136.    kind, provided that the above copyright notice and this paragraph are
  1137.    included on all such copies and derivative works.  However, this
  1138.    document itself may not be modified in any way, such as by removing
  1139.    the copyright notice or references to the Internet Society or other
  1140.    Internet organizations, except as needed for the purpose of
  1141.    developing Internet standards (in which case the procedures for
  1142.    copyrights defined in the Internet Standards process must be
  1143.    followed), or as required to translate it into languages other than
  1144.    English.
  1145.  
  1146.    The limited permissions granted above are perpetual and will not be
  1147.    revoked by the Internet Society or its successors or assigns.
  1148.  
  1149.    This document and the information contained herein is provided on an
  1150.    "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
  1151.    TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
  1152.    (BUT NOT LIMITED TO) ANY WARRANTY THAT THE USE OF THE INFORMATION
  1153.    HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
  1154.    MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
  1155.  
  1156.  
  1157.  
  1158.  
  1159.  
  1160.  
  1161.  
  1162.  
  1163.  
  1164.  
  1165.  
  1166.  
  1167.  
  1168.  
  1169.  
  1170.  
  1171.  
  1172.  
  1173.  
  1174.  
  1175.  
  1176.  
  1177.  
  1178. Karn & Simpson                Experimental                     [Page 19]
  1179.  
  1180.