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

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. Network Working Group                                            P. Karn
  8. Request for Comments: 2522                                      Qualcomm
  9. Category: Experimental                                        W. Simpson
  10.                                                               DayDreamer
  11.                                                               March 1999
  12.  
  13.  
  14.                Photuris: Session-Key Management Protocol
  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 intended for use with
  32.    the IP Security Protocols (AH and ESP).  This document defines the
  33.    basic protocol mechanisms.
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  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 2522                   Photuris Protocol                  March 1999
  61.  
  62.  
  63. Table of Contents
  64.  
  65.  
  66.      1.     Introduction ..........................................    1
  67.         1.1       Terminology .....................................    1
  68.         1.2       Protocol Overview ...............................    3
  69.         1.3       Security Parameters .............................    5
  70.         1.4       LifeTimes .......................................    6
  71.            1.4.1  Exchange LifeTimes ..............................    6
  72.            1.4.2  SPI LifeTimes ...................................    7
  73.         1.5       Random Number Generation ........................    8
  74.  
  75.      2.     Protocol Details ......................................    9
  76.         2.1       UDP .............................................    9
  77.         2.2       Header Format ...................................   10
  78.         2.3       Variable Precision Integers .....................   11
  79.         2.4       Exchange-Schemes ................................   13
  80.         2.5       Attributes ......................................   13
  81.  
  82.      3.     Cookie Exchange .......................................   14
  83.            3.0.1  Send Cookie_Request .............................   14
  84.            3.0.2  Receive Cookie_Request ..........................   15
  85.            3.0.3  Send Cookie_Response ............................   15
  86.            3.0.4  Receive Cookie_Response .........................   16
  87.         3.1       Cookie_Request ..................................   17
  88.         3.2       Cookie_Response .................................   18
  89.         3.3       Cookie Generation ...............................   19
  90.            3.3.1  Initiator Cookie ................................   19
  91.            3.3.2  Responder Cookie ................................   20
  92.  
  93.      4.     Value Exchange ........................................   21
  94.            4.0.1  Send Value_Request ..............................   21
  95.            4.0.2  Receive Value_Request ...........................   22
  96.            4.0.3  Send Value_Response .............................   22
  97.            4.0.4  Receive Value_Response ..........................   23
  98.         4.1       Value_Request ...................................   24
  99.         4.2       Value_Response ..................................   25
  100.         4.3       Offered Attribute List ..........................   26
  101.  
  102.      5.     Identification Exchange ...............................   28
  103.            5.0.1  Send Identity_Request ...........................   29
  104.            5.0.2  Receive Identity_Request ........................   29
  105.            5.0.3  Send Identity_Response ..........................   30
  106.            5.0.4  Receive Identity_Response .......................   30
  107.         5.1       Identity_Messages ...............................   31
  108.         5.2       Attribute Choices List ..........................   33
  109.         5.3       Shared-Secret ...................................   34
  110.         5.4       Identity Verification ...........................   34
  111.  
  112.  
  113.  
  114. Karn & Simpson                Experimental                     [Page ii]
  115.  
  116. RFC 2522                   Photuris Protocol                  March 1999
  117.  
  118.  
  119.         5.5       Privacy-Key Computation .........................   36
  120.         5.6       Session-Key Computation .........................   37
  121.  
  122.      6.     SPI Messages ..........................................   38
  123.            6.0.1  Send SPI_Needed .................................   38
  124.            6.0.2  Receive SPI_Needed ..............................   39
  125.            6.0.3  Send SPI_Update .................................   39
  126.            6.0.4  Receive SPI_Update ..............................   39
  127.            6.0.5  Automated SPI_Updates ...........................   40
  128.         6.1       SPI_Needed ......................................   41
  129.         6.2       SPI_Update ......................................   43
  130.            6.2.1  Creation ........................................   44
  131.            6.2.2  Deletion ........................................   45
  132.            6.2.3  Modification ....................................   45
  133.         6.3       Validity Verification ...........................   45
  134.  
  135.      7.     Error Messages ........................................   46
  136.         7.1       Bad_Cookie ......................................   47
  137.         7.2       Resource_Limit ..................................   47
  138.         7.3       Verification_Failure ............................   48
  139.         7.4       Message_Reject ..................................   49
  140.  
  141.      8.     Public Value Exchanges ................................   50
  142.         8.1       Modular Exponentiation Groups ...................   50
  143.         8.2       Moduli Selection ................................   50
  144.            8.2.1  Bootstrap Moduli ................................   51
  145.            8.2.2  Learning Moduli .................................   51
  146.         8.3       Generator Selection .............................   51
  147.         8.4       Exponent Selection ..............................   52
  148.         8.5       Defective Exchange Values .......................   53
  149.  
  150.      9.     Basic Exchange-Schemes ................................   54
  151.  
  152.      10.    Basic Key-Generation-Function .........................   55
  153.         10.1      MD5 Hash ........................................   55
  154.  
  155.      11.    Basic Privacy-Method ..................................   55
  156.         11.1      Simple Masking ..................................   55
  157.  
  158.      12.    Basic Validity-Method .................................   55
  159.         12.1      MD5-IPMAC Check .................................   55
  160.  
  161.      13.    Basic Attributes ......................................   56
  162.         13.1      Padding .........................................   56
  163.         13.2      AH-Attributes ...................................   57
  164.         13.3      ESP-Attributes ..................................   57
  165.         13.4      MD5-IPMAC .......................................   58
  166.            13.4.1 Symmetric Identification ........................   58
  167.  
  168.  
  169.  
  170. Karn & Simpson                Experimental                    [Page iii]
  171.  
  172. RFC 2522                   Photuris Protocol                  March 1999
  173.  
  174.  
  175.            13.4.2 Authentication ..................................   59
  176.         13.5      Organizational ..................................   60
  177.  
  178.      APPENDICES ...................................................   61
  179.  
  180.      A.     Automaton .............................................   61
  181.         A.1       State Transition Table ..........................   62
  182.         A.2       States ..........................................   65
  183.            A.2.1  Initial .........................................   65
  184.            A.2.2  Cookie ..........................................   66
  185.            A.2.3  Value ...........................................   66
  186.            A.2.4  Identity ........................................   66
  187.            A.2.5  Ready ...........................................   66
  188.            A.2.6  Update ..........................................   66
  189.  
  190.      B.     Use of Identification and Secrets .....................   67
  191.         B.1       Identification ..................................   67
  192.         B.2       Group Identity With Group Secret ................   67
  193.         B.3       Multiple Identities With Group Secrets ..........   68
  194.         B.4       Multiple Identities With Multiple Secrets .......   69
  195.  
  196.      OPERATIONAL CONSIDERATIONS ...................................   70
  197.  
  198.      SECURITY CONSIDERATIONS ......................................   70
  199.  
  200.      HISTORY ......................................................   71
  201.  
  202.      ACKNOWLEDGEMENTS .............................................   72
  203.  
  204.      REFERENCES ...................................................   73
  205.  
  206.      CONTACTS .....................................................   75
  207.  
  208.      COPYRIGHT ....................................................   76
  209.  
  210.  
  211.  
  212.  
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230. Karn & Simpson                Experimental                     [Page iv]
  231.  
  232. RFC 2522                   Photuris Protocol                  March 1999
  233.  
  234.  
  235. 1.  Introduction
  236.  
  237.    Photuris [Firefly] establishes short-lived session-keys between two
  238.    parties, without passing the session-keys across the Internet.  These
  239.    session-keys directly replace the long-lived secret-keys (such as
  240.    passwords and passphrases) that have been historically configured for
  241.    security purposes.
  242.  
  243.    The basic Photuris protocol utilizes these existing previously
  244.    configured secret-keys for identification of the parties.  This is
  245.    intended to speed deployment and reduce administrative configuration
  246.    changes.
  247.  
  248.    This document is primarily intended for implementing the Photuris
  249.    protocol.  It does not detail service and application interface
  250.    definitions, although it does mention some basic policy areas
  251.    required for the proper implementation and operation of the protocol
  252.    mechanisms.
  253.  
  254.    Since the basic Photuris protocol is extensible, new data types and
  255.    protocol behaviour should be expected.  The implementor is especially
  256.    cautioned not to depend on values that appear in examples to be
  257.    current or complete, since their purpose is primarily pedagogical.
  258.  
  259.  
  260. 1.1.  Terminology
  261.  
  262.    In this document, the key words "MAY", "MUST, "MUST NOT", "optional",
  263.    "recommended", "SHOULD", and "SHOULD NOT", are to be interpreted as
  264.    described in [RFC-2119].
  265.  
  266.    byte             An 8-bit quantity; also known as "octet" in
  267.                     standardese.
  268.  
  269.    exchange-value   The publically distributable value used to calculate
  270.                     a shared-secret.  As used in this document, refers
  271.                     to a Diffie-Hellman exchange, not the public part of
  272.                     a public/private key-pair.
  273.  
  274.    private-key      A value that is kept secret, and is part of an
  275.                     asymmetric public/private key-pair.
  276.  
  277.    public-key       A publically distributable value that is part of an
  278.                     asymmetric public/private key-pair.
  279.  
  280.    secret-key       A symmetric key that is not publically
  281.                     distributable.  As used in this document, this is
  282.                     distinguished from an asymmetric public/private
  283.  
  284.  
  285.  
  286. Karn & Simpson                Experimental                      [Page 1]
  287.  
  288. RFC 2522                   Photuris Protocol                  March 1999
  289.  
  290.  
  291.                     key-pair.  An example is a user password.
  292.  
  293.    Security Association (SA)
  294.                     A collection of parameters describing the security
  295.                     relationship between two nodes.  These parameters
  296.                     include the identities of the parties, the transform
  297.                     (including algorithm and algorithm mode), the key(s)
  298.                     (such as a session-key, secret-key, or appropriate
  299.                     public/private key-pair), and possibly other
  300.                     information such as sensitivity labelling.
  301.  
  302.    Security Parameters Index (SPI)
  303.                     A number that indicates a particular set of uni-
  304.                     directional attributes used under a Security
  305.                     Association, such as transform(s) and session-
  306.                     key(s).  The number is relative to the IP
  307.                     Destination, which is the SPI Owner, and is unique
  308.                     per IP (Next Header) Protocol.  That is, the same
  309.                     value MAY be used by multiple protocols to
  310.                     concurrently indicate different Security Association
  311.                     parameters.
  312.  
  313.    session-key      A key that is independently derived from a shared-
  314.                     secret by the parties, and used for keying one
  315.                     direction of traffic.  This key is changed
  316.                     frequently.
  317.  
  318.    shared-secret    As used in this document, the calculated result of
  319.                     the Photuris exchange.
  320.  
  321.    SPI Owner        The party that corresponds to the IP Destination;
  322.                     the intended recipient of a protected datagram.
  323.  
  324.    SPI User         The party that corresponds to the IP Source; the
  325.                     sender of a protected datagram.
  326.  
  327.    transform        A cryptographic manipulation of a particular set of
  328.                     data.  As used in this document, refers to certain
  329.                     well-specified methods (defined elsewhere).  For
  330.                     example, AH-MD5 [RFC-1828] transforms an IP datagram
  331.                     into a cryptographic hash, and ESP-DES-CBC [RFC-
  332.                     1829] transforms plaintext to ciphertext and back
  333.                     again.
  334.  
  335.  
  336.  
  337.  
  338.  
  339.  
  340.  
  341.  
  342. Karn & Simpson                Experimental                      [Page 2]
  343.  
  344. RFC 2522                   Photuris Protocol                  March 1999
  345.  
  346.  
  347.    Many of these terms are hierarchically related:
  348.  
  349.       Security Association (bi-directional)
  350.        - one or more lists of Security Parameters (uni-directional)
  351.         -- one or more Attributes
  352.          --- may have a key
  353.          --- may indicate a transform
  354.  
  355.    Implementors will find details of cryptographic hashing (such as
  356.    MD5), encryption algorithms and modes (such as DES), digital
  357.    signatures (such as DSS), and other algorithms in [Schneier95].
  358.  
  359.  
  360. 1.2.  Protocol Overview
  361.  
  362.    The Photuris protocol consists of several simple phases:
  363.  
  364.    1. A "Cookie" Exchange guards against simple flooding attacks sent
  365.       with bogus IP Sources or UDP Ports.  Each party passes a "cookie"
  366.       to the other.
  367.  
  368.       In return, a list of supported Exchange-Schemes are offered by the
  369.       Responder for calculating a shared-secret.
  370.  
  371.    2. A Value Exchange establishes a shared-secret between the parties.
  372.       Each party passes an Exchange-Value to the other.  These values
  373.       are used to calculate a shared-secret.  The Responder remains
  374.       stateless until a shared-secret has been created.
  375.  
  376.       In addition, supported attributes are offered by each party for
  377.       use in establishing new Security Parameters.
  378.  
  379.    3. An Identification Exchange identifies the parties to each other,
  380.       and verifies the integrity of values sent in phases 1 and 2.
  381.  
  382.       In addition, the shared-secret provides a basis to generate
  383.       separate session-keys in each direction, which are in turn used
  384.       for conventional authentication or encryption.  Additional
  385.       security attributes are also exchanged as needed.
  386.  
  387.       This exchange is masked for party privacy protection using a
  388.       message privacy-key based on the shared-secret.  This protects the
  389.       identities of the parties, hides the Security Parameter attribute
  390.       values, and improves security for the exchange protocol and
  391.       security transforms.
  392.  
  393.    4. Additional messages may be exchanged to periodically change the
  394.       session-keys, and to establish new or revised Security Parameters.
  395.  
  396.  
  397.  
  398. Karn & Simpson                Experimental                      [Page 3]
  399.  
  400. RFC 2522                   Photuris Protocol                  March 1999
  401.  
  402.  
  403.       These exchanges are also masked for party privacy protection in
  404.       the same fashion as above.
  405.  
  406.    The sequence of message types and their purposes are summarized in
  407.    the diagram below.  The first three phases (cookie, exchange, and
  408.    identification) must be carried out in their entirety before any
  409.    Security Association can be used.
  410.  
  411.    Initiator                            Responder
  412.    =========                            =========
  413.    Cookie_Request                 ->
  414.                                    <-   Cookie_Response
  415.                                            offer schemes
  416.    Value_Request                  ->
  417.       pick scheme
  418.       offer value
  419.       offer attributes
  420.                                    <-   Value_Response
  421.                                            offer value
  422.                                            offer attributes
  423.  
  424.              [generate shared-secret from exchanged values]
  425.  
  426.  
  427.    Identity_Request               ->
  428.       make SPI
  429.       pick SPI attribute(s)
  430.       identify self
  431.       authenticate
  432.       make privacy key(s)
  433.       mask/encrypt message
  434.                                    <-   Identity_Response
  435.                                            make SPI
  436.                                            pick SPI attribute(s)
  437.                                            identify self
  438.                                            authenticate
  439.                                            make privacy key(s)
  440.                                            mask/encrypt message
  441.  
  442.                [make SPI session-keys in each direction]
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454. Karn & Simpson                Experimental                      [Page 4]
  455.  
  456. RFC 2522                   Photuris Protocol                  March 1999
  457.  
  458.  
  459.  
  460.    SPI User                             SPI Owner
  461.    ========                             =========
  462.    SPI_Needed                     ->
  463.       list SPI attribute(s)
  464.       make validity key
  465.       authenticate
  466.       make privacy key(s)
  467.       mask/encrypt message
  468.                                    <-   SPI_Update
  469.                                            make SPI
  470.                                            pick SPI attribute(s)
  471.                                            make SPI session-key(s)
  472.                                            make validity key
  473.                                            authenticate
  474.                                            make privacy key(s)
  475.                                            mask/encrypt message
  476.  
  477.    Either party may initiate an exchange at any time.  For example, the
  478.    Initiator need not be a "caller" in a telephony link.
  479.  
  480.    The Initiator is responsible for recovering from all message losses
  481.    by retransmission.
  482.  
  483.  
  484. 1.3.  Security Parameters
  485.  
  486.    A Photuris exchange between two parties results in a pair of SPI
  487.    values (one in each direction).  Each SPI is used in creating
  488.    separate session-key(s) in each direction.
  489.  
  490.    The SPI is assigned by the entity controlling the IP Destination: the
  491.    SPI Owner (receiver).  The parties use the combination of IP
  492.    Destination, IP (Next Header) Protocol, and SPI to distinguish the
  493.    correct Security Association.
  494.  
  495.    When both parties initiate Photuris exchanges concurrently, or one
  496.    party initiates more than one Photuris exchange, the Initiator
  497.    Cookies (and UDP Ports) keep the exchanges separate.  This results in
  498.    more than one initial SPI for each Destination.
  499.  
  500.    To create multiple SPIs with different parameters, the parties may
  501.    also send SPI_Updates.
  502.  
  503.    There is no requirement that all such outstanding SPIs be used.  The
  504.    SPI User (sender) selects an appropriate SPI for each datagram
  505.    transmission.
  506.  
  507.  
  508.  
  509.  
  510. Karn & Simpson                Experimental                      [Page 5]
  511.  
  512. RFC 2522                   Photuris Protocol                  March 1999
  513.  
  514.  
  515.    Implementation Notes:
  516.  
  517.       The method used for SPI assignment is implementation dependent.
  518.       The only requirement is that the SPI be unique for the IP
  519.       Destination and IP (Next Header) Protocol.
  520.  
  521.       However, selection of a cryptographically random SPI value can
  522.       help prevent attacks that depend on a predicatable sequence of
  523.       values.  The implementor MUST NOT expect SPI values to have a
  524.       particular order or range.
  525.  
  526.  
  527. 1.4.  LifeTimes
  528.  
  529.    The Photuris exchange results in two kinds of state, each with
  530.    separate LifeTimes.
  531.  
  532.    1) The Exchange LifeTime of the small amount of state associated with
  533.       the Photuris exchange itself.  This state may be viewed as between
  534.       Internet nodes.
  535.  
  536.    2) The SPI LifeTimes of the individual SPIs that are established.
  537.       This state may be viewed as between users and nodes.
  538.  
  539.    The SPI LifeTimes may be shorter or longer than the Exchange
  540.    LifeTime.  These LifeTimes are not required to be related to each
  541.    other.
  542.  
  543.    When an Exchange-Value expires (or is replaced by a newer value), any
  544.    unexpired derived SPIs are not affected.  This is important to allow
  545.    traffic to continue without interruption during new Photuris
  546.    exchanges.
  547.  
  548.  
  549. 1.4.1.  Exchange LifeTimes
  550.  
  551.    All retained exchange state of both parties has an associated
  552.    Exchange LifeTime (ELT), and is subject to periodic expiration.  This
  553.    depends on the physical and logistical security of the machine, and
  554.    is typically in the range of 10 minutes to one day (default 30
  555.    minutes).
  556.  
  557.    In addition, during a Photuris exchange, an Exchange TimeOut (ETO)
  558.    limits the wait for the exchange to complete.  This timeout includes
  559.    the packet round trips, and the time for completing the
  560.    Identification Exchange calculations.  The time is bounded by both
  561.    the maximum amount of calculation delay expected for the processing
  562.    power of an unknown peer, and the minimum user expectation for
  563.  
  564.  
  565.  
  566. Karn & Simpson                Experimental                      [Page 6]
  567.  
  568. RFC 2522                   Photuris Protocol                  March 1999
  569.  
  570.  
  571.    results (default 30 seconds).
  572.  
  573.    These Exchange LifeTimes and TimeOuts are implementation dependent
  574.    and are not disclosed in any Photuris message.  The paranoid operator
  575.    will have a fairly short Exchange LifeTime, but it MUST NOT be less
  576.    than twice the ETO.
  577.  
  578.    To prevent synchronization between Photuris exchanges, the
  579.    implementation SHOULD randomly vary each Exchange LifeTime within
  580.    twice the range of seconds that are required to calculate a new
  581.    Exchange-Value.  For example, when the Responder uses a base ELT of
  582.    30 minutes, and takes 10 seconds to calculate the new Exchange-Value,
  583.    the equation might be (in milliseconds):
  584.  
  585.       1790000 + urandom(20000)
  586.  
  587.    The Exchange-Scheme, Exchange-Values, and resulting shared-secret MAY
  588.    be cached in short-term storage for the Exchange LifeTime.  When
  589.    repetitive Photuris exchanges occur between the same parties, and the
  590.    Exchange-Values are discovered to be unchanged, the previously
  591.    calculated shared-secret can be used to rapidly generate new
  592.    session-keys.
  593.  
  594.  
  595. 1.4.2.  SPI LifeTimes
  596.  
  597.    Each SPI has an associated LifeTime, specified by the SPI owner
  598.    (receiver).  This SPI LifeTime (SPILT) is usually related to the
  599.    speed of the link (typically 2 to 30 minutes), but it MUST NOT be
  600.    less than thrice the ETO.
  601.  
  602.    The SPI can also be deleted by the SPI Owner using the SPI_Update.
  603.    Once the SPI has expired or been deleted, the parties cease using the
  604.    SPI.
  605.  
  606.    To prevent synchronization between multiple Photuris exchanges, the
  607.    implementation SHOULD randomly vary each SPI LifeTime.  For example,
  608.    when the Responder uses a base SPILT of 5 minutes, and 30 seconds for
  609.    the ETO, the equation might be (in milliseconds):
  610.  
  611.       285000 + urandom(30000)
  612.  
  613.    There is no requirement that a long LifeTime be accepted by the SPI
  614.    User.  The SPI User might never use an established SPI, or cease
  615.    using the SPI at any time.
  616.  
  617.    When more than one unexpired SPI is available to the SPI User for the
  618.    same function, a common implementation technique is to select the SPI
  619.  
  620.  
  621.  
  622. Karn & Simpson                Experimental                      [Page 7]
  623.  
  624. RFC 2522                   Photuris Protocol                  March 1999
  625.  
  626.  
  627.    with the greatest remaining LifeTime.  However, selecting randomly
  628.    among a large number of SPIs might provide some defense against
  629.    traffic analysis.
  630.  
  631.    To prevent resurrection of deleted or expired SPIs, SPI Owners SHOULD
  632.    remember those SPIs, but mark them as unusable until the Photuris
  633.    exchange shared-secret used to create them also expires and purges
  634.    the associated state.
  635.  
  636.    When the SPI Owner detects an incoming SPI that has recently expired,
  637.    but the associated exchange state has not yet been purged, the
  638.    implementation MAY accept the SPI.  The length of time allowed is
  639.    highly dependent on clock drift and variable packet round trip time,
  640.    and is therefore implementation dependent.
  641.  
  642.  
  643. 1.5.  Random Number Generation
  644.  
  645.    The security of Photuris critically depends on the quality of the
  646.    secret random numbers generated by each party.  A poor random number
  647.    generator at either party will compromise the shared-secret produced
  648.    by the algorithm.
  649.  
  650.    Generating cryptographic quality random numbers on a general purpose
  651.    computer without hardware assistance is a very tricky problem.  In
  652.    general, this requires using a cryptographic hashing function to
  653.    "distill" the entropy from a large number of semi-random external
  654.    events, such as the timing of key strokes.  An excellent discussion
  655.    can be found in [RFC-1750].
  656.  
  657.  
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664.  
  665.  
  666.  
  667.  
  668.  
  669.  
  670.  
  671.  
  672.  
  673.  
  674.  
  675.  
  676.  
  677.  
  678. Karn & Simpson                Experimental                      [Page 8]
  679.  
  680. RFC 2522                   Photuris Protocol                  March 1999
  681.  
  682.  
  683. 2.  Protocol Details
  684.  
  685.    The Initiator begins a Photuris exchange under several circumstances:
  686.  
  687.    -  The Initiator has a datagram that it wishes to send with
  688.       confidentiality, and has no current Photuris exchange state with
  689.       the IP Destination.  This datagram is discarded, and a
  690.       Cookie_Request is sent instead.
  691.  
  692.    -  The Initiator has received the ICMP message [RFC-1812] Destination
  693.       Unreachable: Communication Administratively Prohibited (Type 3,
  694.       Code 13), and has no current Photuris exchange state with the ICMP
  695.       Source.
  696.  
  697.    -  The Initiator has received the ICMP message [RFC-2521] Security
  698.       Failures: Bad SPI (Type 40, Code 0), that matches current Photuris
  699.       exchange state with the ICMP Source.
  700.  
  701.    -  The Initiator has received the ICMP message [RFC-2521] Security
  702.       Failures: Need Authentication (Type 40, Code 4), and has no
  703.       current Photuris exchange state with the ICMP Source.
  704.  
  705.    -  The Initiator has received the ICMP message [RFC-2521] Security
  706.       Failures: Need Authorization (Type 40, Code 5), that matches
  707.       current Photuris exchange state with the ICMP Source.
  708.  
  709.    When the event is an ICMP message, special care MUST be taken that
  710.    the ICMP message actually includes information that matches a
  711.    previously sent IP datagram.  Otherwise, this could provide an
  712.    opportunity for a clogging attack, by stimulating a new Photuris
  713.    Exchange.
  714.  
  715.  
  716. 2.1.  UDP
  717.  
  718.    All Photuris messages use the User Datagram Protocol header [RFC-
  719.    768].  The Initiator sends to UDP Destination Port 468.
  720.  
  721.    When replying to the Initiator, the Responder swaps the IP Source and
  722.    Destination, and the UDP Source and Destination Ports.
  723.  
  724.    The UDP checksum MUST be correctly calculated when sent.  When a
  725.    message is received with an incorrect UDP checksum, it is silently
  726.    discarded.
  727.  
  728.  
  729.  
  730.  
  731.  
  732.  
  733.  
  734. Karn & Simpson                Experimental                      [Page 9]
  735.  
  736. RFC 2522                   Photuris Protocol                  March 1999
  737.  
  738.  
  739.    Implementation Notes:
  740.  
  741.       It is expected that installation of Photuris will ensure that UDP
  742.       checksum calculations are enabled for the computer operating
  743.       system and later disabling by operators is prevented.
  744.  
  745.       Internet Protocol version 4 [RFC-791] restricts the maximum
  746.       reassembled datagram to 576 bytes.
  747.  
  748.       When processing datagrams containing variable size values, the
  749.       length must be checked against the overall datagram length.  An
  750.       invalid size (too long or short) that causes a poorly coded
  751.       receiver to abort could be used as a denial of service attack.
  752.  
  753.  
  754. 2.2.  Header Format
  755.  
  756.    All of the messages have a format similar to the following, as
  757.    transmitted left to right in network order (most significant to least
  758.    significant):
  759.  
  760.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  761.    |                                                               |
  762.    ~                       Initiator-Cookie                        ~
  763.    |                                                               |
  764.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  765.    |                                                               |
  766.    ~                       Responder-Cookie                        ~
  767.    |                                                               |
  768.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  769.    |    Message    |
  770.    +-+-+-+-+-+-+-+-+
  771.  
  772.  
  773.    Initiator-Cookie  16 bytes.
  774.  
  775.    Responder-Cookie  16 bytes.
  776.  
  777.    Message          1 byte.  Each message type has a unique value.
  778.                     Initial values are assigned as follows:
  779.  
  780.  
  781.  
  782.  
  783.  
  784.  
  785.  
  786.  
  787.  
  788.  
  789.  
  790. Karn & Simpson                Experimental                     [Page 10]
  791.  
  792. RFC 2522                   Photuris Protocol                  March 1999
  793.  
  794.  
  795.  
  796.                         0  Cookie_Request
  797.                         1  Cookie_Response
  798.                         2  Value_Request
  799.                         3  Value_Response
  800.                         4  Identity_Request
  801.                         5  Secret_Response (optional)
  802.                         6  Secret_Request (optional)
  803.                         7  Identity_Response
  804.                         8  SPI_Needed
  805.                         9  SPI_Update
  806.                        10  Bad_Cookie
  807.                        11  Resource_Limit
  808.                        12  Verification_Failure
  809.                        13  Message_Reject
  810.  
  811.  
  812.    Further details and differences are elaborated in the individual
  813.    messages.
  814.  
  815.  
  816. 2.3.  Variable Precision Integers
  817.  
  818.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  819.    |             Size              |             Value ...
  820.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  821.  
  822.  
  823.    Size             2, 4, or 8 bytes.  The number of significant bits
  824.                     used in the Value field.  Always transmitted most
  825.                     significant byte first.
  826.  
  827.                     When the Size is zero, no Value field is present;
  828.                     there are no significant bits.  This means "missing"
  829.                     or "null".  It should not be confused with the value
  830.                     zero, which includes an indication of the number of
  831.                     significant bits.
  832.  
  833.                     When the most significant byte is in the range 0
  834.                     through 254 (0xfe), the field is 2 bytes.  Both
  835.                     bytes are used to indicate the size of the Value
  836.                     field, which ranges from 1 to 65,279 significant
  837.                     bits (in 1 to 8,160 bytes).
  838.  
  839.                     When the most significant byte is 255 (0xff), the
  840.                     field is 4 bytes.  The remaining 3 bytes are added
  841.                     to 65,280 to indicate the size of the Value field,
  842.                     which is limited to 16,776,959 significant bits (in
  843.  
  844.  
  845.  
  846. Karn & Simpson                Experimental                     [Page 11]
  847.  
  848. RFC 2522                   Photuris Protocol                  March 1999
  849.  
  850.  
  851.                     2,097,120 bytes).
  852.  
  853.                     When the most significant 2 bytes are 65,535
  854.                     (0xffff), the field is 8 bytes.  The remaining 6
  855.                     bytes are added to 16,776,960 to indicate the size
  856.                     of the Value field.
  857.  
  858.    Value            0 or more bytes.  Always transmitted most
  859.                     significant byte first.
  860.  
  861.                     The bits used are right justified within byte
  862.                     boundaries; that is, any unused bits are in the most
  863.                     significant byte.  When there are no unused bits, or
  864.                     unused bits are zero filled, the value is assumed to
  865.                     be an unsigned positive integer.
  866.  
  867.                     When the leading unused bits are ones filled, the
  868.                     number is assumed to be a two's-complement negative
  869.                     integer.  A negative integer will always have at
  870.                     least one unused leading sign bit in the most
  871.                     significant byte.
  872.  
  873.    Shortened forms SHOULD NOT be used when the Value includes a number
  874.    of leading zero significant bits.  The Size SHOULD indicate the
  875.    correct number of significant bits.
  876.  
  877.    Implementation Notes:
  878.  
  879.       Negative integers are not required to be supported, but are
  880.       included for completeness.
  881.  
  882.       No more than 65,279 significant bits are required to be supported.
  883.       Other ranges are vastly too long for these UDP messages, but are
  884.       included for completeness.
  885.  
  886.  
  887.  
  888.  
  889.  
  890.  
  891.  
  892.  
  893.  
  894.  
  895.  
  896.  
  897.  
  898.  
  899.  
  900.  
  901.  
  902. Karn & Simpson                Experimental                     [Page 12]
  903.  
  904. RFC 2522                   Photuris Protocol                  March 1999
  905.  
  906.  
  907. 2.4.  Exchange-Schemes
  908.  
  909.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  910.    |            Scheme             |             Size              |
  911.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  912.    |             Value ...
  913.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  914.  
  915.  
  916.    Scheme           2 bytes.  A unique value indicating the Exchange-
  917.                     Scheme.  See the "Basic Exchange-Schemes" for
  918.                     details.
  919.  
  920.    Size             2 bytes, ranging from 0 to 65,279.  See "Variable
  921.                     Precision Integer".
  922.  
  923.    Value            0 or more bytes.  See "Variable Precision Integer".
  924.  
  925.    The Size MUST NOT be assumed to be constant for a particular Scheme.
  926.    Multiple kinds of the same Scheme with varying Sizes MAY be present
  927.    in any list of schemes.
  928.  
  929.    However, only one of each Scheme and Size combination will be present
  930.    in any list of schemes.
  931.  
  932.  
  933. 2.5.  Attributes
  934.  
  935.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  936.    |   Attribute   |    Length     |  Value(s) ...
  937.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  938.  
  939.  
  940.    Attribute        1 byte.  A unique value indicating the kind of
  941.                     attribute.  See the "Basic Attributes" for details.
  942.  
  943.                     When the value is zero (padding), no Length field is
  944.                     present (always zero).
  945.  
  946.    Length           1 byte.  The size of the Value(s) field in bytes.
  947.  
  948.                     When the Length is zero, no Value(s) field is
  949.                     present.
  950.  
  951.    Value(s)         0 or more bytes.  See the "Basic Attributes" for
  952.                     details.
  953.  
  954.    The Length MUST NOT be assumed to be constant for a particular
  955.  
  956.  
  957.  
  958. Karn & Simpson                Experimental                     [Page 13]
  959.  
  960. RFC 2522                   Photuris Protocol                  March 1999
  961.  
  962.  
  963.    Attribute.  Multiple kinds of the same Attribute with varying Lengths
  964.    MAY be present in any list of attributes.
  965.  
  966.  
  967. 3.  Cookie Exchange
  968.  
  969.    Initiator                            Responder
  970.    =========                            =========
  971.    Cookie_Request                 ->
  972.                                    <-   Cookie_Response
  973.                                            offer schemes
  974.  
  975.  
  976.  
  977. 3.0.1.  Send Cookie_Request
  978.  
  979.    The Initiator initializes local state, and generates a unique
  980.    "cookie".  The Initiator-Cookie MUST be different in each new
  981.    Cookie_Request between the same parties.  See "Cookie Generation" for
  982.    details.
  983.  
  984.    -  If any previous exchange between the peer IP nodes has not expired
  985.       in which this party was the Initiator, this Responder-Cookie is
  986.       set to the most recent Responder-Cookie, and this Counter is set
  987.       to the corresponding Counter.
  988.  
  989.       For example, a new Virtual Private Network (VPN) tunnel is about
  990.       to be established to an existing partner.  The Counter is the same
  991.       value received in the prior Cookie_Response, the Responder-Cookie
  992.       remains the same, and a new Initiator-Cookie is generated.
  993.  
  994.    -  If the new Cookie_Request is in response to a message of a
  995.       previous exchange in which this party was the Responder, this
  996.       Responder-Cookie is set to the previous Initiator-Cookie, and this
  997.       Counter is set to zero.
  998.  
  999.       For example, a Bad_Cookie message was received from the previous
  1000.       Initiator in response to SPI_Needed.  The Responder-Cookie is
  1001.       replaced with the Initiator-Cookie, and a new Initiator-Cookie is
  1002.       generated.  This provides bookkeeping to detect bogus Bad_Cookie
  1003.       messages.
  1004.  
  1005.       Also, can be used for bi-directional User, Transport, and Process
  1006.       oriented keying.  Such mechanisms are outside the scope of this
  1007.       document.
  1008.  
  1009.    -  Otherwise, this Responder-Cookie and Counter are both set to zero.
  1010.  
  1011.  
  1012.  
  1013.  
  1014. Karn & Simpson                Experimental                     [Page 14]
  1015.  
  1016. RFC 2522                   Photuris Protocol                  March 1999
  1017.  
  1018.  
  1019.       By default, the Initiator operates in the same manner as when all
  1020.       of its previous exchange state has expired.  The Responder will
  1021.       send a Resource_Limit when its own exchange state has not expired.
  1022.  
  1023.    The Initiator also starts a retransmission timer.  If no valid
  1024.    Cookie_Response arrives within the time limit, the same
  1025.    Cookie_Request is retransmitted for the remaining number of
  1026.    Retransmissions.  The Initiator-Cookie value MUST be the same in each
  1027.    such retransmission to the same IP Destination and UDP Port.
  1028.  
  1029.    When Retransmissions have been exceeded, if a Resource_Limit message
  1030.    has been received during the exchange, the Initiator SHOULD begin the
  1031.    Photuris exchange again by sending a new Cookie_Request with updated
  1032.    values.
  1033.  
  1034.  
  1035. 3.0.2.  Receive Cookie_Request
  1036.  
  1037.    On receipt of a Cookie_Request, the Responder determines whether
  1038.    there are sufficient resources to begin another Photuris exchange.
  1039.  
  1040.    -  When too many SPI values are already in use for this particular
  1041.       peer, or too many concurrent exchanges are in progress, or some
  1042.       other resource limit is reached, a Resource_Limit message is sent.
  1043.  
  1044.    -  When any previous exchange initiated by this particular peer has
  1045.       not exceeded the Exchange TimeOut, and the Responder-Cookie does
  1046.       not specify one of these previous exchanges, a Resource_Limit
  1047.       message is sent.
  1048.  
  1049.    Otherwise, the Responder returns a Cookie_Response.
  1050.  
  1051.    Note that the Responder creates no additional state at this time.
  1052.  
  1053.  
  1054. 3.0.3.  Send Cookie_Response
  1055.  
  1056.    The IP Source for the Initiator is examined.  If any previous
  1057.    exchange between the peer IP nodes has not expired, the response
  1058.    Counter is set to the most recent exchange Counter plus one (allowing
  1059.    for out of order retransmissions).  Otherwise, the response Counter
  1060.    is set to the request Counter plus one.
  1061.  
  1062.    If (through rollover of the Counter) the new Counter value is zero
  1063.    (modulo 256), the value is set to one.
  1064.  
  1065.    If this new Counter value matches some previous exchange initiated by
  1066.    this particular peer that has not yet exceeded the Exchange TimeOut,
  1067.  
  1068.  
  1069.  
  1070. Karn & Simpson                Experimental                     [Page 15]
  1071.  
  1072. RFC 2522                   Photuris Protocol                  March 1999
  1073.  
  1074.  
  1075.    the Counter is incremented again, until a unique Counter value is
  1076.    reached.
  1077.  
  1078.    Nota Bene:
  1079.       No more than 254 concurrent exchanges between the same two peers
  1080.       are supported.
  1081.  
  1082.    The Responder generates a unique cookie.  The Responder-Cookie value
  1083.    in each successive response SHOULD be different.  See "Cookie
  1084.    Generation" for details.
  1085.  
  1086.    The Exchange-Schemes available between the peers are listed in the
  1087.    Offered-Schemes.
  1088.  
  1089.  
  1090. 3.0.4.  Receive Cookie_Response
  1091.  
  1092.    The Initiator validates the Initiator-Cookie, and the Offered-
  1093.    Schemes.
  1094.  
  1095.    -  When an invalid/expired Initiator-Cookie is detected, the message
  1096.       is silently discarded.
  1097.  
  1098.    -  When the variable length Offered-Schemes do not match the UDP
  1099.       Length, or all Offered-Schemes are obviously defective and/or
  1100.       insufficient for the purposes intended, the message is silently
  1101.       discarded; the implementation SHOULD log the occurance, and notify
  1102.       an operator as appropriate.
  1103.  
  1104.    -  Once a valid message has been received, later Cookie_Responses
  1105.       with matching Initiator-Cookies are also silently discarded, until
  1106.       a new Cookie_Request is sent.
  1107.  
  1108.    When the message is valid, an Exchange-Scheme is chosen from the list
  1109.    of Offered-Schemes.
  1110.  
  1111.    This Scheme-Choice may affect the next Photuris message sent.  By
  1112.    default, the next Photuris message is a Value_Request.
  1113.  
  1114.    Implementation Notes:
  1115.  
  1116.       Only the Initiator-Cookie is used to identify the exchange.  The
  1117.       Counter and Responder-Cookie will both be different from the
  1118.       Cookie_Request.
  1119.  
  1120.       Various proposals for extensions utilize the Scheme-Choice to
  1121.       indicate a different message sequence.  Such mechanisms are
  1122.       outside the scope of this document.
  1123.  
  1124.  
  1125.  
  1126. Karn & Simpson                Experimental                     [Page 16]
  1127.  
  1128. RFC 2522                   Photuris Protocol                  March 1999
  1129.  
  1130.  
  1131. 3.1.  Cookie_Request
  1132.  
  1133.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1134.    |                                                               |
  1135.    ~                       Initiator-Cookie                        ~
  1136.    |                                                               |
  1137.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1138.    |                                                               |
  1139.    ~                       Responder-Cookie                        ~
  1140.    |                                                               |
  1141.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1142.    |    Message    |    Counter    |
  1143.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1144.  
  1145.  
  1146.    Initiator-Cookie  16 bytes.  A randomized value that identifies the
  1147.                     exchange.  The value MUST NOT be zero.  See "Cookie
  1148.                     Generation" for details.
  1149.  
  1150.    Responder-Cookie  16 bytes.  Identifies a specific previous exchange.
  1151.                     Copied from a previous Cookie_Response.
  1152.  
  1153.                     When zero, no previous exchange is specified.
  1154.  
  1155.                     When non-zero, and the Counter is zero, contains the
  1156.                     Initiator-Cookie of a previous exchange.  The
  1157.                     specified party is requested to be the Responder in
  1158.                     this exchange, to retain previous party pairings.
  1159.  
  1160.                     When non-zero, and the Counter is also non-zero,
  1161.                     contains the Responder-Cookie of a previous
  1162.                     exchange.  The specified party is requested to be
  1163.                     the Responder in this exchange, to retain previous
  1164.                     party pairings.
  1165.  
  1166.    Message          0
  1167.  
  1168.    Counter          1 byte.  Indicates the number of previous exchanges.
  1169.  
  1170.                     When zero, the Responder-Cookie indicates the
  1171.                     Initiator of a previous exchange, or no previous
  1172.                     exchange is specified.
  1173.  
  1174.                     When non-zero, the Responder-Cookie indicates the
  1175.                     Responder to a previous exchange.  This value is set
  1176.                     to the Counter from the corresponding
  1177.                     Cookie_Response or from a Resource_Limit.
  1178.  
  1179.  
  1180.  
  1181.  
  1182. Karn & Simpson                Experimental                     [Page 17]
  1183.  
  1184. RFC 2522                   Photuris Protocol                  March 1999
  1185.  
  1186.  
  1187. 3.2.  Cookie_Response
  1188.  
  1189.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1190.    |                                                               |
  1191.    ~                       Initiator-Cookie                        ~
  1192.    |                                                               |
  1193.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1194.    |                                                               |
  1195.    ~                       Responder-Cookie                        ~
  1196.    |                                                               |
  1197.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1198.    |    Message    |    Counter    |  Offered-Schemes ...
  1199.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1200.  
  1201.  
  1202.    Initiator-Cookie  16 bytes.  Copied from the Cookie_Request.
  1203.  
  1204.    Responder-Cookie  16 bytes.  A randomized value that identifies the
  1205.                     exchange.  The value MUST NOT be zero.  See "Cookie
  1206.                     Generation" for details.
  1207.  
  1208.    Message          1
  1209.  
  1210.    Counter          1 byte.  Indicates the number of the current
  1211.                     exchange.  Must be greater than zero.
  1212.  
  1213.    Offered-Schemes  4 or more bytes.  A list of one or more Exchange-
  1214.                     Schemes supported by the Responder, ordered from
  1215.                     most to least preferable.  See the "Basic Exchange-
  1216.                     Schemes" for details.
  1217.  
  1218.                     Only one Scheme (#2) is required to be supported,
  1219.                     and SHOULD be present in every Offered-Schemes list.
  1220.  
  1221.                     More than one of each kind of Scheme may be offered,
  1222.                     but each is distinguished by its Size.  The end of
  1223.                     the list is indicated by the UDP Length.
  1224.  
  1225.  
  1226.  
  1227.  
  1228.  
  1229.  
  1230.  
  1231.  
  1232.  
  1233.  
  1234.  
  1235.  
  1236.  
  1237.  
  1238. Karn & Simpson                Experimental                     [Page 18]
  1239.  
  1240. RFC 2522                   Photuris Protocol                  March 1999
  1241.  
  1242.  
  1243. 3.3.  Cookie Generation
  1244.  
  1245.    The exact technique by which a Photuris party generates a cookie is
  1246.    implementation dependent.  The method chosen must satisfy some basic
  1247.    requirements:
  1248.  
  1249.    1. The cookie MUST depend on the specific parties.  This prevents an
  1250.       attacker from obtaining a cookie using a real IP address and UDP
  1251.       port, and then using it to swamp the victim with requests from
  1252.       randomly chosen IP addresses or ports.
  1253.  
  1254.    2. It MUST NOT be possible for anyone other than the issuing entity
  1255.       to generate cookies that will be accepted by that entity.  This
  1256.       implies that the issuing entity will use local secret information
  1257.       in the generation and subsequent verification of a cookie.  It
  1258.       must not be possible to deduce this secret information from any
  1259.       particular cookie.
  1260.  
  1261.    3. The cookie generation and verification methods MUST be fast to
  1262.       thwart attacks intended to sabotage CPU resources.
  1263.  
  1264.    A recommended technique is to use a cryptographic hashing function
  1265.    (such as MD5).
  1266.  
  1267.    An incoming cookie can be verified at any time by regenerating it
  1268.    locally from values contained in the incoming datagram and the local
  1269.    secret random value.
  1270.  
  1271.  
  1272. 3.3.1.  Initiator Cookie
  1273.  
  1274.    The Initiator secret value that affects its cookie SHOULD change for
  1275.    each new Photuris exchange, and is thereafter internally cached on a
  1276.    per Responder basis.  This provides improved synchronization and
  1277.    protection against replay attacks.
  1278.  
  1279.    An alternative is to cache the cookie instead of the secret value.
  1280.    Incoming cookies can be compared directly without the computational
  1281.    cost of regeneration.
  1282.  
  1283.    It is recommended that the cookie be calculated over the secret
  1284.    value, the IP Source and Destination addresses, and the UDP Source
  1285.    and Destination ports.
  1286.  
  1287.  
  1288.  
  1289.  
  1290.  
  1291.  
  1292.  
  1293.  
  1294. Karn & Simpson                Experimental                     [Page 19]
  1295.  
  1296. RFC 2522                   Photuris Protocol                  March 1999
  1297.  
  1298.  
  1299.    Implementation Notes:
  1300.  
  1301.       Although the recommendation includes the UDP Source port, this is
  1302.       very implementation specific.  For example, it might not be
  1303.       included when the value is constant.
  1304.  
  1305.       However, it is important that the implementation protect mutually
  1306.       suspicious users of the same machine from generating the same
  1307.       cookie.
  1308.  
  1309.  
  1310. 3.3.2.  Responder Cookie
  1311.  
  1312.    The Responder secret value that affects its cookies MAY remain the
  1313.    same for many different Initiators.  However, this secret SHOULD be
  1314.    changed periodically to limit the time for use of its cookies
  1315.    (typically each 60 seconds).
  1316.  
  1317.    The Responder-Cookie SHOULD include the Initiator-Cookie.  The
  1318.    Responder-Cookie MUST include the Counter (that is returned in the
  1319.    Cookie_Response).  This provides improved synchronization and
  1320.    protection against replay attacks.
  1321.  
  1322.    It is recommended that the cookie be calculated over the secret
  1323.    value, the IP Source and Destination addresses, its own UDP
  1324.    Destination port, the Counter, the Initiator-Cookie, and the
  1325.    currently Offered-Schemes.
  1326.  
  1327.    The cookie is not cached per Initiator to avoid saving state during
  1328.    the initial Cookie Exchange.  On receipt of a Value_Request
  1329.    (described later), the Responder regenerates its cookie for
  1330.    validation.
  1331.  
  1332.    Once the Value_Response is sent (also described later), both
  1333.    Initiator and Responder cookies are cached to identify the exchange.
  1334.  
  1335.    Implementation Notes:
  1336.  
  1337.       Although the recommendation does not include the UDP Source port,
  1338.       this is very implementation specific.  It might be successfully
  1339.       included in some variants.
  1340.  
  1341.       However, it is important that the UDP Source port not be included
  1342.       when matching existing Photuris exchanges for determining the
  1343.       appropriate Counter.
  1344.  
  1345.       The recommendation includes the Offered-Schemes to detect a
  1346.       dynamic change of scheme value between the Cookie_Response and
  1347.  
  1348.  
  1349.  
  1350. Karn & Simpson                Experimental                     [Page 20]
  1351.  
  1352. RFC 2522                   Photuris Protocol                  March 1999
  1353.  
  1354.  
  1355.       Value_Response.
  1356.  
  1357.       Some mechanism MAY be needed to detect a dynamic change of pre-
  1358.       calculated Responder Exchange-Value between the Value_Response and
  1359.       Identity_Response.  For example, change the secret value to render
  1360.       the cookie invalid, or explicitly mark the Photuris exchange state
  1361.       as expired.
  1362.  
  1363.  
  1364. 4.  Value Exchange
  1365.  
  1366.    Initiator                            Responder
  1367.    =========                            =========
  1368.    Value_Request                  ->
  1369.       pick scheme
  1370.       offer value
  1371.       offer attributes
  1372.                                    <-   Value_Response
  1373.                                            offer value
  1374.                                            offer attributes
  1375.  
  1376.              [generate shared-secret from exchanged values]
  1377.  
  1378.  
  1379.  
  1380. 4.0.1.  Send Value_Request
  1381.  
  1382.    The Initiator generates an appropriate Exchange-Value for the
  1383.    Scheme-Choice.  This Exchange-Value may be pre-calculated and used
  1384.    for multiple Responders.
  1385.  
  1386.    The IP Destination for the Responder is examined, and the attributes
  1387.    available between the parties are listed in the Offered-Attributes.
  1388.  
  1389.    The Initiator also starts a retransmission timer.  If no valid
  1390.    Value_Response arrives within the time limit, the same Value_Request
  1391.    is retransmitted for the remaining number of Retransmissions.
  1392.  
  1393.    When Retransmissions have been exceeded, if a Bad_Cookie or
  1394.    Resource_Limit message has been received during the exchange, the
  1395.    Initiator SHOULD begin the Photuris exchange again by sending a new
  1396.    Cookie_Request.
  1397.  
  1398.  
  1399.  
  1400.  
  1401.  
  1402.  
  1403.  
  1404.  
  1405.  
  1406. Karn & Simpson                Experimental                     [Page 21]
  1407.  
  1408. RFC 2522                   Photuris Protocol                  March 1999
  1409.  
  1410.  
  1411. 4.0.2.  Receive Value_Request
  1412.  
  1413.    The Responder validates the Responder-Cookie, the Counter, the
  1414.    Scheme-Choice, the Exchange-Value, and the Offered-Attributes.
  1415.  
  1416.    -  When an invalid/expired Responder-Cookie is detected, a Bad_Cookie
  1417.       message is sent.
  1418.  
  1419.    -  When too many SPI values are already in use for this particular
  1420.       peer, or too many concurrent exchanges are in progress, or some
  1421.       other resource limit is reached, a Resource_Limit message is sent.
  1422.  
  1423.    -  When an invalid Scheme-Choice is detected, or the Exchange-Value
  1424.       is obviously defective, or the variable length Offered-Attributes
  1425.       do not match the UDP Length, the message is silently discarded;
  1426.       the implementation SHOULD log the occurance, and notify an
  1427.       operator as appropriate.
  1428.  
  1429.    When the message is valid, the Responder sets its Exchange timer to
  1430.    the Exchange TimeOut, and returns a Value_Response.
  1431.  
  1432.    The Responder keeps a copy of the incoming Value_Request cookie pair,
  1433.    and its Value_Response.  If a duplicate Value_Request is received, it
  1434.    merely resends its previous Value_Response, and takes no further
  1435.    action.
  1436.  
  1437.  
  1438. 4.0.3.  Send Value_Response
  1439.  
  1440.    The Responder generates an appropriate Exchange-Value for the
  1441.    Scheme-Choice.  This Exchange-Value may be pre-calculated and used
  1442.    for multiple Initiators.
  1443.  
  1444.    The IP Source for the Initiator is examined, and the attributes
  1445.    available between the parties are listed in the Offered-Attributes.
  1446.  
  1447.    Implementation Notes:
  1448.  
  1449.       At this time, the Responder begins calculation of the shared-
  1450.       secret.  Calculation of the shared-secret is executed in parallel
  1451.       to minimize delay.
  1452.  
  1453.       This may take a substantial amount of time.  The implementor
  1454.       should ensure that retransmission is not blocked by this
  1455.       calculation.  This is not usually a problem, as retransmission
  1456.       timeouts typically exceed calculation time.
  1457.  
  1458.  
  1459.  
  1460.  
  1461.  
  1462. Karn & Simpson                Experimental                     [Page 22]
  1463.  
  1464. RFC 2522                   Photuris Protocol                  March 1999
  1465.  
  1466.  
  1467. 4.0.4.  Receive Value_Response
  1468.  
  1469.    The Initiator validates the pair of Cookies, the Exchange-Value, and
  1470.    the Offered-Attributes.
  1471.  
  1472.    -  When an invalid/expired cookie is detected, the message is
  1473.       silently discarded.
  1474.  
  1475.    -  When the Exchange-Value is obviously defective, or the variable
  1476.       length Offered-Attributes do not match the UDP Length, the message
  1477.       is silently discarded; the implementation SHOULD log the
  1478.       occurance, and notify an operator as appropriate.
  1479.  
  1480.    -  Once a valid message has been received, later Value_Responses with
  1481.       both matching cookies are also silently discarded, until a new
  1482.       Cookie_Request is sent.
  1483.  
  1484.    When the message is valid, the Initiator begins its parallel
  1485.    computation of the shared-secret.
  1486.  
  1487.    When the Initiator completes computation, it sends an
  1488.    Identity_Request to the Responder.
  1489.  
  1490.  
  1491.  
  1492.  
  1493.  
  1494.  
  1495.  
  1496.  
  1497.  
  1498.  
  1499.  
  1500.  
  1501.  
  1502.  
  1503.  
  1504.  
  1505.  
  1506.  
  1507.  
  1508.  
  1509.  
  1510.  
  1511.  
  1512.  
  1513.  
  1514.  
  1515.  
  1516.  
  1517.  
  1518. Karn & Simpson                Experimental                     [Page 23]
  1519.  
  1520. RFC 2522                   Photuris Protocol                  March 1999
  1521.  
  1522.  
  1523. 4.1.  Value_Request
  1524.  
  1525.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1526.    |                                                               |
  1527.    ~                       Initiator-Cookie                        ~
  1528.    |                                                               |
  1529.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1530.    |                                                               |
  1531.    ~                       Responder-Cookie                        ~
  1532.    |                                                               |
  1533.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1534.    |    Message    |    Counter    |         Scheme-Choice         |
  1535.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1536.    |                                                               |
  1537.    ~                   Initiator-Exchange-Value                    ~
  1538.    |                                                               |
  1539.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1540.    |  Initiator-Offered-Attributes ...
  1541.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
  1542.  
  1543.  
  1544.    Initiator-Cookie  16 bytes.  Copied from the Cookie_Response.
  1545.  
  1546.    Responder-Cookie  16 bytes.  Copied from the Cookie_Response.
  1547.  
  1548.    Message          2
  1549.  
  1550.    Counter          1 byte.  Copied from the Cookie_Response.
  1551.  
  1552.    Scheme-Choice    2 bytes.  A value selected by the Initiator from the
  1553.                     list of Offered-Schemes in the Cookie_Response.
  1554.  
  1555.                     Only the Scheme is specified; the Size will match
  1556.                     the Initiator-Exchange-Value, and the Value(s) are
  1557.                     implicit.
  1558.  
  1559.    Initiator-Exchange-Value
  1560.                     Variable Precision Integer.  Provided by the
  1561.                     Initiator for calculating a shared-secret between
  1562.                     the parties.  The Value format is indicated by the
  1563.                     Scheme-Choice.
  1564.  
  1565.                     The field may be any integral number of bytes in
  1566.                     length, as indicated by its Size field.  It does not
  1567.                     require any particular alignment.  The 32-bit
  1568.                     alignment shown is for convenience in the
  1569.                     illustration.
  1570.  
  1571.  
  1572.  
  1573.  
  1574. Karn & Simpson                Experimental                     [Page 24]
  1575.  
  1576. RFC 2522                   Photuris Protocol                  March 1999
  1577.  
  1578.  
  1579.    Initiator-Offered-Attributes
  1580.                     4 or more bytes.  A list of Security Parameter
  1581.                     attributes supported by the Initiator.
  1582.  
  1583.                     The contents and usage of this list are further
  1584.                     described in "Offered Attributes List".  The end of
  1585.                     the list is indicated by the UDP Length.
  1586.  
  1587.  
  1588.  
  1589. 4.2.  Value_Response
  1590.  
  1591.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1592.    |                                                               |
  1593.    ~                       Initiator-Cookie                        ~
  1594.    |                                                               |
  1595.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1596.    |                                                               |
  1597.    ~                       Responder-Cookie                        ~
  1598.    |                                                               |
  1599.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1600.    |    Message    |                    Reserved                   |
  1601.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1602.    |                                                               |
  1603.    ~                   Responder-Exchange-Value                    ~
  1604.    |                                                               |
  1605.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1606.    |  Responder-Offered-Attributes ...
  1607.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
  1608.  
  1609.  
  1610.    Initiator-Cookie  16 bytes.  Copied from the Value_Request.
  1611.  
  1612.    Responder-Cookie  16 bytes.  Copied from the Value_Request.
  1613.  
  1614.    Message          3
  1615.  
  1616.    Reserved         3 bytes.  For future use; MUST be set to zero when
  1617.                     transmitted, and MUST be ignored when received.
  1618.  
  1619.    Responder-Exchange-Value
  1620.                     Variable Precision Integer.  Provided by the
  1621.                     Responder for calculating a shared-secret between
  1622.                     the parties.  The Value format is indicated by the
  1623.                     current Scheme-Choice specified in the
  1624.                     Value_Request.
  1625.  
  1626.                     The field may be any integral number of bytes in
  1627.  
  1628.  
  1629.  
  1630. Karn & Simpson                Experimental                     [Page 25]
  1631.  
  1632. RFC 2522                   Photuris Protocol                  March 1999
  1633.  
  1634.  
  1635.                     length, as indicated by its Size field.  It does not
  1636.                     require any particular alignment.  The 32-bit
  1637.                     alignment shown is for convenience in the
  1638.                     illustration.
  1639.  
  1640.    Responder-Offered-Attributes
  1641.                     4 or more bytes.  A list of Security Parameter
  1642.                     attributes supported by the Responder.
  1643.  
  1644.                     The contents and usage of this list are further
  1645.                     described in "Offered Attributes List".  The end of
  1646.                     the list is indicated by the UDP Length.
  1647.  
  1648.  
  1649.  
  1650. 4.3.  Offered Attribute List
  1651.  
  1652.    This list includes those attributes supported by the party that are
  1653.    available to the other party.  The attribute formats are specified in
  1654.    the "Basic Attributes".
  1655.  
  1656.    The list is composed of two or three sections: Identification-
  1657.    Attributes, Authentication-Attributes, and (optional) Encapsulation-
  1658.    Attributes.  Within each section, the attributes are ordered from
  1659.    most to least preferable.
  1660.  
  1661.    The first section of the list includes methods of identification.  An
  1662.    Identity-Choice is selected from this list.
  1663.  
  1664.    The second section of the list begins with "AH-Attributes" (#1).  It
  1665.    includes methods of authentication, and other operational types.
  1666.  
  1667.    The third section of the list begins with "ESP-Attributes" (#2).  It
  1668.    includes methods of authentication, compression, encryption, and
  1669.    other operational types.  When no Encapsulation-Attributes are
  1670.    offered, the "ESP-Attributes" attribute itself is omitted from the
  1671.    list.
  1672.  
  1673.    Attribute-Choices are selected from the latter two sections of the
  1674.    list.
  1675.  
  1676.    Support is required for the "MD5-IPMAC" (#5) attribute for both
  1677.    "Symmetric Identification" and "Authentication" and they SHOULD be
  1678.    present in every Offered-Attributes list.
  1679.  
  1680.  
  1681.  
  1682.  
  1683.  
  1684.  
  1685.  
  1686. Karn & Simpson                Experimental                     [Page 26]
  1687.  
  1688. RFC 2522                   Photuris Protocol                  March 1999
  1689.  
  1690.  
  1691.    Implementation Notes:
  1692.  
  1693.       For example,
  1694.  
  1695.          "MD5-IPMAC" (Symmetric Identification),
  1696.          "AH-Attributes",
  1697.          "MD5-IPMAC" (Authentication).
  1698.  
  1699.       Since the offer is made by the prospective SPI User (sender),
  1700.       order of preference likely reflects the capabilities and
  1701.       engineering tradeoffs of a particular implementation.
  1702.  
  1703.       However, the critical processing bottlenecks are frequently in the
  1704.       receiver.  The SPI Owner (receiver) may express its needs by
  1705.       choosing a less preferable attribute.
  1706.  
  1707.       The order may also be affected by operational policy and requested
  1708.       services for an application.  Such considerations are outside the
  1709.       scope of this document.
  1710.  
  1711.       The list may be divided into additional sections.  These sections
  1712.       will always follow the ESP-Attributes section, and are
  1713.       indistinguishable from unrecognized attributes.
  1714.  
  1715.       The authentication, compression, encryption and identification
  1716.       mechanisms chosen, as well as the encapsulation modes (if any),
  1717.       need not be the same in both directions.
  1718.  
  1719.  
  1720.  
  1721.  
  1722.  
  1723.  
  1724.  
  1725.  
  1726.  
  1727.  
  1728.  
  1729.  
  1730.  
  1731.  
  1732.  
  1733.  
  1734.  
  1735.  
  1736.  
  1737.  
  1738.  
  1739.  
  1740.  
  1741.  
  1742. Karn & Simpson                Experimental                     [Page 27]
  1743.  
  1744. RFC 2522                   Photuris Protocol                  March 1999
  1745.  
  1746.  
  1747. 5.  Identification Exchange
  1748.  
  1749.    Initiator                            Responder
  1750.    =========                            =========
  1751.    Identity_Request               ->
  1752.       make SPI
  1753.       pick SPI attribute(s)
  1754.       identify self
  1755.       authenticate
  1756.       make privacy key(s)
  1757.       mask/encrypt message
  1758.                                    <-   Identity_Response
  1759.                                            make SPI
  1760.                                            pick SPI attribute(s)
  1761.                                            identify self
  1762.                                            authenticate
  1763.                                            make privacy key(s)
  1764.                                            mask/encrypt message
  1765.  
  1766.                [make SPI session-keys in each direction]
  1767.  
  1768.    The exchange of messages is ordered, although the formats and
  1769.    meanings of the messages are identical in each direction.  The
  1770.    messages are easily distinguished by the parties themselves, by
  1771.    examining the Message and Identification fields.
  1772.  
  1773.    Implementation Notes:
  1774.  
  1775.       The amount of time for the calculation may be dependent on the
  1776.       value of particular bits in secret values used in generating the
  1777.       shared-secret or identity verification.  To prevent analysis of
  1778.       these secret bits by recording the time for calculation, sending
  1779.       of the Identity_Messages SHOULD be delayed until the time expected
  1780.       for the longest calculation.  This will be different for different
  1781.       processor speeds, different algorithms, and different length
  1782.       variables.  Therefore, the method for estimating time is
  1783.       implementation dependent.
  1784.  
  1785.       Any authenticated and/or encrypted user datagrams received before
  1786.       the completion of identity verification can be placed on a queue
  1787.       pending completion of this step.  If verification succeeds, the
  1788.       queue is processed as though the datagrams had arrived subsequent
  1789.       to the verification.  If verification fails, the queue is
  1790.       discarded.
  1791.  
  1792.  
  1793.  
  1794.  
  1795.  
  1796.  
  1797.  
  1798. Karn & Simpson                Experimental                     [Page 28]
  1799.  
  1800. RFC 2522                   Photuris Protocol                  March 1999
  1801.  
  1802.  
  1803. 5.0.1.  Send Identity_Request
  1804.  
  1805.    The Initiator chooses an appropriate Identification, the SPI and
  1806.    SPILT, a set of Attributes for the SPI, calculates the Verification,
  1807.    and masks the message using the Privacy-Method indicated by the
  1808.    current Scheme-Choice.
  1809.  
  1810.    The Initiator also starts a retransmission timer.  If no valid
  1811.    Identity_Response arrives within the time limit, its previous
  1812.    Identity_Request is retransmitted for the remaining number of
  1813.    Retransmissions.
  1814.  
  1815.    When Retransmissions have been exceeded, if a Bad_Cookie message has
  1816.    been received during the exchange, the Initiator SHOULD begin the
  1817.    Photuris exchange again by sending a new Cookie_Request.
  1818.  
  1819.  
  1820. 5.0.2.  Receive Identity_Request
  1821.  
  1822.    The Responder validates the pair of Cookies, the Padding, the
  1823.    Identification, the Verification, and the Attribute-Choices.
  1824.  
  1825.    -  When an invalid/expired cookie is detected, a Bad_Cookie message
  1826.       is sent.
  1827.  
  1828.    -  After unmasking, when invalid Padding is detected, the variable
  1829.       length Attribute-Choices do not match the UDP Length, or an
  1830.       attribute was not in the Offered-Attributes, the message is
  1831.       silently discarded.
  1832.  
  1833.    -  When an invalid Identification is detected, or the message
  1834.       verification fails, a Verification_Failure message is sent.
  1835.  
  1836.    -  Whenever such a problem is detected, the Security Association is
  1837.       not established; the implementation SHOULD log the occurance, and
  1838.       notify an operator as appropriate.
  1839.  
  1840.    When the message is valid, the Responder sets its Exchange timer to
  1841.    the Exchange LifeTime (if this has not already been done for a
  1842.    previous exchange).  When its parallel computation of the shared-
  1843.    secret is complete, the Responder returns an Identity_Response.
  1844.  
  1845.    The Responder keeps a copy of the incoming Identity_Request values,
  1846.    and its Identity_Response.  If a duplicate Identity_Request is
  1847.    received, it merely resends its previous Identity_Response, and takes
  1848.    no further action.
  1849.  
  1850.  
  1851.  
  1852.  
  1853.  
  1854. Karn & Simpson                Experimental                     [Page 29]
  1855.  
  1856. RFC 2522                   Photuris Protocol                  March 1999
  1857.  
  1858.  
  1859. 5.0.3.  Send Identity_Response
  1860.  
  1861.    The Responder chooses an appropriate Identification, the SPI and
  1862.    SPILT, a set of Attributes for the SPI, calculates the Verification,
  1863.    and masks the message using the Privacy-Method indicated by the
  1864.    current Scheme-Choice.
  1865.  
  1866.    The Responder calculates the SPI session-keys in both directions.
  1867.  
  1868.    At this time, the Responder begins the authentication and/or
  1869.    encryption of user datagrams.
  1870.  
  1871.  
  1872. 5.0.4.  Receive Identity_Response
  1873.  
  1874.    The Initiator validates the pair of Cookies, the Padding, the
  1875.    Identification, the Verification, and the Attribute-Choices.
  1876.  
  1877.    -  When an invalid/expired cookie is detected, the message is
  1878.       silently discarded.
  1879.  
  1880.    -  After unmasking, when invalid Padding is detected, the variable
  1881.       length Attribute-Choices do not match the UDP Length, or an
  1882.       attribute was not in the Offered-Attributes, the message is
  1883.       silently discarded.
  1884.  
  1885.    -  When an invalid Identification is detected, or the message
  1886.       verification fails, a Verification_Failure message is sent.
  1887.  
  1888.    -  Whenever such a problem is detected, the Security Association is
  1889.       not established; the implementation SHOULD log the occurance, and
  1890.       notify an operator as appropriate.
  1891.  
  1892.    -  Once a valid message has been received, later Identity_Responses
  1893.       with both matching cookies are also silently discarded, until a
  1894.       new Cookie_Request is sent.
  1895.  
  1896.    When the message is valid, the Initiator sets its Exchange timer to
  1897.    the Exchange LifeTime (if this has not already been done for a
  1898.    previous exchange).
  1899.  
  1900.    The Initiator calculates the SPI session-keys in both directions.
  1901.  
  1902.    At this time, the Initiator begins the authentication and/or
  1903.    encryption of user datagrams.
  1904.  
  1905.  
  1906.  
  1907.  
  1908.  
  1909.  
  1910. Karn & Simpson                Experimental                     [Page 30]
  1911.  
  1912. RFC 2522                   Photuris Protocol                  March 1999
  1913.  
  1914.  
  1915. 5.1.  Identity_Messages
  1916.  
  1917.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1918.    |                                                               |
  1919.    ~                       Initiator-Cookie                        ~
  1920.    |                                                               |
  1921.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1922.    |                                                               |
  1923.    ~                       Responder-Cookie                        ~
  1924.    |                                                               |
  1925.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1926.    |    Message    |                    LifeTime                   |
  1927.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1928.    |                   Security-Parameters-Index                   |
  1929.    +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
  1930.    |        Identity-Choice        |                               |
  1931.    + + + + + + + + + + + + + + + + +                               +
  1932.    |                                                               |
  1933.    ~                        Identification                         ~
  1934.    |                                                               |
  1935.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1936.    |                                                               |
  1937.    ~                         Verification                          ~
  1938.    |                                                               |
  1939.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1940.    |  Attribute-Choices ...
  1941.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1942.                                                       ... Padding  |
  1943.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1944.  
  1945.  
  1946.    Initiator-Cookie  16 bytes.  Copied from the Value_Request.
  1947.  
  1948.    Responder-Cookie  16 bytes.  Copied from the Value_Request.
  1949.  
  1950.    Message          4 (Request) or 7 (Response)
  1951.  
  1952.    LifeTime         3 bytes.  The number of seconds remaining before the
  1953.                     indicated SPI expires.
  1954.  
  1955.                     When the SPI is zero, this field MUST be filled with
  1956.                     a random non-zero value.
  1957.  
  1958.    Security-Parameters-Index (SPI)
  1959.                     4 bytes.  The SPI to be used for incoming
  1960.                     communications.
  1961.  
  1962.                     When zero, indicates that no SPI is created in this
  1963.  
  1964.  
  1965.  
  1966. Karn & Simpson                Experimental                     [Page 31]
  1967.  
  1968. RFC 2522                   Photuris Protocol                  March 1999
  1969.  
  1970.  
  1971.                     direction.
  1972.  
  1973.    Identity-Choice  2 or more bytes.  An identity attribute is selected
  1974.                     from the list of Offered-Attributes sent by the
  1975.                     peer, and is used to calculate the Verification.
  1976.  
  1977.                     The field may be any integral number of bytes in
  1978.                     length, as indicated by its Length field.  It does
  1979.                     not require any particular alignment.  The 16-bit
  1980.                     alignment shown is for convenience in the
  1981.                     illustration.
  1982.  
  1983.    Identification   Variable Precision Integer, or alternative format
  1984.                     indicated by the Identity-Choice.  See the "Basic
  1985.                     Attributes" for details.
  1986.  
  1987.                     The field may be any integral number of bytes in
  1988.                     length.  It does not require any particular
  1989.                     alignment.  The 32-bit alignment shown is for
  1990.                     convenience in the illustration.
  1991.  
  1992.    Verification     Variable Precision Integer, or alternative format
  1993.                     indicated by the Identity-Choice.  The calculation
  1994.                     of the value is described in "Identity
  1995.                     Verification".
  1996.  
  1997.                     The field may be any integral number of bytes in
  1998.                     length.  It does not require any particular
  1999.                     alignment.  The 32-bit alignment shown is for
  2000.                     convenience in the illustration.
  2001.  
  2002.    Attribute-Choices
  2003.                     0 or more bytes.  When the SPI is non-zero, a list
  2004.                     of attributes selected from the list of Offered-
  2005.                     Attributes supported by the peer.
  2006.  
  2007.                     The contents and usage of this list are further
  2008.                     described in "Attribute Choices List".  The end of
  2009.                     the list is indicated by the UDP Length after
  2010.                     removing the Padding (UDP Length - last Padding
  2011.                     value).
  2012.  
  2013.    Padding          8 to 255 bytes.  This field is filled up to at least
  2014.                     a 128 byte boundary, measured from the beginning of
  2015.                     the message.  The number of pad bytes are chosen
  2016.                     randomly.
  2017.  
  2018.                     In addition, when a Privacy-Method indicated by the
  2019.  
  2020.  
  2021.  
  2022. Karn & Simpson                Experimental                     [Page 32]
  2023.  
  2024. RFC 2522                   Photuris Protocol                  March 1999
  2025.  
  2026.  
  2027.                     current Scheme-Choice requires the plaintext to be a
  2028.                     multiple of some number of bytes (the block size of
  2029.                     a block cipher), this field is adjusted as necessary
  2030.                     to the size required by the algorithm.
  2031.  
  2032.                     Self-Describing-Padding begins with the value 1.
  2033.                     Each byte contains the index of that byte.  Thus,
  2034.                     the final pad byte indicates the number of pad bytes
  2035.                     to remove.  For example, when the unpadded message
  2036.                     length is 120 bytes, the padding values might be 1,
  2037.                     2, 3, 4, 5, 6, 7, and 8.
  2038.  
  2039.    The portion of the message after the SPI field is masked using the
  2040.    Privacy-Method indicated by the current Scheme-Choice.
  2041.  
  2042.    The fields following the SPI are opaque.  That is, the values are set
  2043.    prior to masking (and optional encryption), and examined only after
  2044.    unmasking (and optional decryption).
  2045.  
  2046.  
  2047. 5.2.  Attribute Choices List
  2048.  
  2049.    This list specifies the attributes of the SPI.  The attribute formats
  2050.    are specified in the "Basic Attributes".
  2051.  
  2052.    The list is composed of one or two sections: Authentication-
  2053.    Attributes, and/or Encapsulation-Attributes.
  2054.  
  2055.    When sending from the SPI User to the SPI Owner, the attributes are
  2056.    processed in the order listed.  For example,
  2057.  
  2058.       "ESP-Attributes",
  2059.       "Deflate" (Compression),
  2060.       "XOR" (Encryption),
  2061.       "DES-CBC" (Encryption),
  2062.       "XOR" (Encryption),
  2063.       "AH-Attributes",
  2064.       "AH-Sequence",
  2065.       "MD5-IPMAC" (Authentication),
  2066.  
  2067.    would result in ESP with compression and triple encryption (inside),
  2068.    and then AH authentication with sequence numbers (outside) of the ESP
  2069.    payload.
  2070.  
  2071.    The SPI Owner will naturally process the datagram in the reverse
  2072.    order.
  2073.  
  2074.    This ordering also affects the order of key generation.  Both SPI
  2075.  
  2076.  
  2077.  
  2078. Karn & Simpson                Experimental                     [Page 33]
  2079.  
  2080. RFC 2522                   Photuris Protocol                  March 1999
  2081.  
  2082.  
  2083.    Owner and SPI User generate the keys in the order listed.
  2084.  
  2085.    Implementation Notes:
  2086.  
  2087.       When choices are made from the list of Offered-Attributes, it is
  2088.       not required that any Security Association include every kind of
  2089.       offered attribute in any single SPI, or that a separate SPI be
  2090.       created for every offered attribute.
  2091.  
  2092.       Some kinds of attributes may be included more than once in a
  2093.       single SPI.  The set of allowable combinations of attributes are
  2094.       dependent on implementation and operational policy.  Such
  2095.       considerations are outside the scope of this document.
  2096.  
  2097.       The list may be divided into additional sections.  This can occur
  2098.       only when both parties recognize the affected attributes.
  2099.  
  2100.       The authentication, compression, encryption and identification
  2101.       mechanisms chosen, as well as the encapsulation modes (if any),
  2102.       need not be the same in both directions.
  2103.  
  2104.  
  2105. 5.3.  Shared-Secret
  2106.  
  2107.    A shared-secret is used in a number of calculations.  Regardless of
  2108.    the internal representation of the shared-secret, when used in
  2109.    calculations it is in the same form as the Value part of a Variable
  2110.    Precision Integer:
  2111.  
  2112.     - most significant byte first.
  2113.     - bits used are right justified within byte boundaries.
  2114.     - any unused bits are in the most significant byte.
  2115.     - unused bits are zero filled.
  2116.  
  2117.    The shared-secret does not include a Size field.
  2118.  
  2119.  
  2120. 5.4.  Identity Verification
  2121.  
  2122.    These messages are authenticated using the Identity-Choice.  The
  2123.    Verification value is calculated prior to masking (and optional
  2124.    encryption), and verified after unmasking (and optional decryption).
  2125.  
  2126.    The Identity-Choice authentication function is supplied with two
  2127.    input values:
  2128.  
  2129.     - the sender (SPI Owner) verification-key,
  2130.     - the data to be verified (as a concatenated sequence of bytes).
  2131.  
  2132.  
  2133.  
  2134. Karn & Simpson                Experimental                     [Page 34]
  2135.  
  2136. RFC 2522                   Photuris Protocol                  March 1999
  2137.  
  2138.  
  2139.    The resulting output value is stored in the Verification field.
  2140.  
  2141.    The Identity-Choice verification data consists of the following
  2142.    concatenated values:
  2143.  
  2144.     + the Initiator Cookie,
  2145.     + the Responder Cookie,
  2146.     + the Message, LifeTime and SPI fields,
  2147.     + the Identity-Choice and Identification,
  2148.     + the SPI User Identity Verification (response only),
  2149.     + the Attribute-Choices following the Verification field,
  2150.     + the Padding,
  2151.     + the SPI Owner TBV,
  2152.     + the SPI Owner Exchange-Value,
  2153.     + the SPI Owner Offered-Attributes,
  2154.     + the SPI User TBV,
  2155.     + the SPI User Exchange-Value,
  2156.     + the SPI User Offered-Attributes,
  2157.     + the Responder Offered-Schemes.
  2158.  
  2159.    The TBV (Three Byte Value) consists of the Counter and Scheme-Choice
  2160.    fields from the Value_Request, or the Reserved field from the
  2161.    Value_Response, immediately preceding the associated Exchange-Value.
  2162.  
  2163.    Note that the order of the Exchange-Value and Offered-Attributes
  2164.    fields is different in each direction, and the Identification and SPI
  2165.    fields are also likely to be different in each direction.  Note also
  2166.    that the SPI User Identity Verification (from the Identity_Request)
  2167.    is present only in the Identity_Response.
  2168.  
  2169.    If the verification fails, the users are notified, and a
  2170.    Verification_Failure message is sent, without adding any SPI.  On
  2171.    success, normal operation begins with the authentication and/or
  2172.    encryption of user datagrams.
  2173.  
  2174.    Implementation Notes:
  2175.  
  2176.       This is distinct from any authentication method specified for the
  2177.       SPI.
  2178.  
  2179.       The exact details of the Identification and verification-key
  2180.       included in the Verification calculation are dependent on the
  2181.       Identity-Choice, as described in the "Basic Attributes".
  2182.  
  2183.       Each party may wish to keep their own trusted databases, such as
  2184.       the Pretty Good Privacy (PGP) web of trust, and accept only those
  2185.       identities found there.  Failure to find the Identification in
  2186.       either an internal or external database results in the same
  2187.  
  2188.  
  2189.  
  2190. Karn & Simpson                Experimental                     [Page 35]
  2191.  
  2192. RFC 2522                   Photuris Protocol                  March 1999
  2193.  
  2194.  
  2195.       Verification_Failure message as failure of the verification
  2196.       computation.
  2197.  
  2198.       The Exchange-Value data includes both the Size and Value fields.
  2199.       The Offered-Attributes and Attribute-Choices data includes the
  2200.       Attribute, Length and Value fields.
  2201.  
  2202.  
  2203. 5.5.  Privacy-Key Computation
  2204.  
  2205.    Identification Exchange messages are masked using the Privacy-Method
  2206.    indicated by the current Scheme-Choice.  Masking begins with the next
  2207.    field after the SPI, and continues to the end of the data indicated
  2208.    by the UDP Length, including the Padding.
  2209.  
  2210.    The Scheme-Choice specified Key-Generation-Function is used to create
  2211.    a special privacy-key for each message.  This function is calculated
  2212.    over the following concatenated values:
  2213.  
  2214.     + the SPI Owner Exchange-Value,
  2215.     + the SPI User Exchange-Value,
  2216.     + the Initiator Cookie,
  2217.     + the Responder Cookie,
  2218.     + the Message, LifeTime and SPI (or Reserved) fields,
  2219.     + the computed shared-secret.
  2220.  
  2221.    Since the order of the Exchange-Value fields is different in each
  2222.    direction, and the Message, LifeTime and SPI fields are also
  2223.    different in each direction, the resulting privacy-key will usually
  2224.    be different in each direction.
  2225.  
  2226.    When a larger number of keying-bits are needed than are available
  2227.    from one iteration of the specified Key-Generation-Function, more
  2228.    keying-bits are generated by duplicating the trailing shared-secret,
  2229.    and recalculating the function.  That is, the first iteration will
  2230.    have one trailing copy of the shared-secret, the second iteration
  2231.    will have two trailing copies of the shared-secret, and so forth.
  2232.  
  2233.    Implementation Notes:
  2234.  
  2235.       This is distinct from any encryption method specified for the SPI.
  2236.  
  2237.       The length of the Padding, and other details, are dependent on the
  2238.       Privacy-Method.  See the "Basic Privacy-Method" list for details.
  2239.  
  2240.       To avoid keeping the Exchange-Values in memory after the initial
  2241.       verification, it is often possible to pre-compute the function
  2242.       over the initial bytes of the concatenated data values for each
  2243.  
  2244.  
  2245.  
  2246. Karn & Simpson                Experimental                     [Page 36]
  2247.  
  2248. RFC 2522                   Photuris Protocol                  March 1999
  2249.  
  2250.  
  2251.       direction, and append the trailing copies of the shared-secret.
  2252.  
  2253.       The Exchange-Value data includes both the Size and Value fields.
  2254.  
  2255.  
  2256. 5.6.  Session-Key Computation
  2257.  
  2258.    Each SPI has one or more session-keys.  These keys are generated
  2259.    based on the attributes of the SPI.  See the "Basic Attributes" for
  2260.    details.
  2261.  
  2262.    The Scheme-Choice specified Key-Generation-Function is used to create
  2263.    the SPI session-key for that particular attribute.  This function is
  2264.    calculated over the following concatenated values:
  2265.  
  2266.     + the Initiator Cookie,
  2267.     + the Responder Cookie,
  2268.     + the SPI Owner generation-key,
  2269.     + the SPI User generation-key,
  2270.     + the message Verification field,
  2271.     + the computed shared-secret.
  2272.  
  2273.    Since the order of the generation-keys is different in each
  2274.    direction, and the Verification field is also likely to be different
  2275.    in each direction, the resulting session-key will usually be
  2276.    different in each direction.
  2277.  
  2278.    When a larger number of keying-bits are needed than are available
  2279.    from one iteration of the specified Key-Generation-Function, more
  2280.    keying-bits are generated by duplicating the trailing shared-secret,
  2281.    and recalculating the function.  That is, the first iteration will
  2282.    have one trailing copy of the shared-secret, the second iteration
  2283.    will have two trailing copies of the shared-secret, and so forth.
  2284.  
  2285.    Implementation Notes:
  2286.  
  2287.       This is distinct from any privacy-key generated for the Photuris
  2288.       exchange.  Different initialization data is used, and iterations
  2289.       are maintained separately.
  2290.  
  2291.       The exact details of the Verification field and generation-keys
  2292.       that are included in the session-key calculation are dependent on
  2293.       the Identity-Choices, as described in the "Basic Attributes".
  2294.  
  2295.       To avoid keeping the generation-keys in memory after the initial
  2296.       verification, it is often possible to pre-compute the function
  2297.       over the initial bytes of the concatenated data values for each
  2298.       direction, and append the trailing copies of the shared-secret.
  2299.  
  2300.  
  2301.  
  2302. Karn & Simpson                Experimental                     [Page 37]
  2303.  
  2304. RFC 2522                   Photuris Protocol                  March 1999
  2305.  
  2306.  
  2307.       When both authentication and encryption attributes are used for
  2308.       the same SPI, there may be multiple session-keys associated with
  2309.       the same SPI.  These session-keys are generated in the order of
  2310.       the Attribute-Choices list.
  2311.  
  2312.  
  2313. 6.  SPI Messages
  2314.  
  2315.    SPI User                             SPI Owner
  2316.    ========                             =========
  2317.    SPI_Needed                     ->
  2318.       list SPI attribute(s)
  2319.       make validity key
  2320.       authenticate
  2321.       make privacy key(s)
  2322.       mask/encrypt message
  2323.                                    <-   SPI_Update
  2324.                                            make SPI
  2325.                                            pick SPI attribute(s)
  2326.                                            make SPI session-key(s)
  2327.                                            make validity key
  2328.                                            authenticate
  2329.                                            make privacy key(s)
  2330.                                            mask/encrypt message
  2331.  
  2332.    The exchange of messages is not related to the Initiator and
  2333.    Responder.  Instead, either party may send one of these messages at
  2334.    any time.  The messages are easily distinguished by the parties.
  2335.  
  2336.  
  2337. 6.0.1.  Send SPI_Needed
  2338.  
  2339.    At any time after completion of the Identification Exchange, either
  2340.    party can send SPI_Needed.  This message is sent when a prospective
  2341.    SPI User needs particular attributes for a datagram (such as
  2342.    confidentiality), and no current SPI has those attributes.
  2343.  
  2344.    The prospective SPI User selects from the intersection of attributes
  2345.    that both parties have previously offered, calculates the
  2346.    Verification, and masks the message using the Privacy-Method
  2347.    indicated by the current Scheme-Choice.
  2348.  
  2349.  
  2350.  
  2351.  
  2352.  
  2353.  
  2354.  
  2355.  
  2356.  
  2357.  
  2358. Karn & Simpson                Experimental                     [Page 38]
  2359.  
  2360. RFC 2522                   Photuris Protocol                  March 1999
  2361.  
  2362.  
  2363. 6.0.2.  Receive SPI_Needed
  2364.  
  2365.    The potential SPI Owner validates the pair of Cookies, the Padding,
  2366.    the Verification, and the Attributes-Needed.
  2367.  
  2368.    -  When an invalid/expired cookie is detected, a Bad_Cookie message
  2369.       is sent.
  2370.  
  2371.    -  When too many SPI values are already in use for this particular
  2372.       peer, or some other resource limit is reached, a Resource_Limit
  2373.       message is sent.
  2374.  
  2375.    -  After unmasking, when invalid Padding is detected, the variable
  2376.       length Attributes-Needed do not match the UDP Length, or an
  2377.       attribute was not in the Offered-Attributes, the message is
  2378.       silently discarded.
  2379.  
  2380.    -  When the message verification fails, a Verification_Failure
  2381.       message is sent.
  2382.  
  2383.    -  Whenever such a problem is detected, the SPI is not established;
  2384.       the implementation SHOULD log the occurance, and notify an
  2385.       operator as appropriate.
  2386.  
  2387.    When the message is valid, the party SHOULD send SPI_Update with the
  2388.    necessary attributes.
  2389.  
  2390.    If an existing SPI has those attributes, that SPI is returned in the
  2391.    SPI_Update with the remaining SPILT.
  2392.  
  2393.  
  2394. 6.0.3.  Send SPI_Update
  2395.  
  2396.    At any time after completion of the Identification Exchange, either
  2397.    party can send SPI_Update.  This message has effect in only one
  2398.    direction, from the SPI Owner to the SPI User.
  2399.  
  2400.    The SPI Owner chooses the SPI and SPILT, a set of Attributes for the
  2401.    SPI, calculates the Verification, and masks the message using the
  2402.    Privacy-Method indicated by the current Scheme-Choice.
  2403.  
  2404.  
  2405. 6.0.4.  Receive SPI_Update
  2406.  
  2407.    The prospective SPI User validates the pair of Cookies, the Padding,
  2408.    the Verification, and the Attributes-Needed.
  2409.  
  2410.    -  When an invalid/expired cookie is detected, a Bad_Cookie message
  2411.  
  2412.  
  2413.  
  2414. Karn & Simpson                Experimental                     [Page 39]
  2415.  
  2416. RFC 2522                   Photuris Protocol                  March 1999
  2417.  
  2418.  
  2419.       is sent.
  2420.  
  2421.    -  After unmasking, when invalid Padding is detected, the variable
  2422.       length Attribute-Choices do not match the UDP Length, an attribute
  2423.       was not in the Offered-Attributes, or the message modifies an
  2424.       existing SPI, the message is silently discarded.
  2425.  
  2426.    -  When the message verification fails, a Verification_Failure
  2427.       message is sent.
  2428.  
  2429.    -  Whenever such a problem is detected, the SPI is not established;
  2430.       the implementation SHOULD log the occurance, and notify an
  2431.       operator as appropriate.
  2432.  
  2433.    When the message is valid, further actions are dependent on the value
  2434.    of the LifeTime field, as described later.
  2435.  
  2436.  
  2437. 6.0.5.  Automated SPI_Updates
  2438.  
  2439.    Each SPI requires replacement under several circumstances:
  2440.  
  2441.    -  the volume of data processed (inhibiting probability
  2442.       cryptanalysis),
  2443.  
  2444.    -  exhaustion of available anti-replay Sequence Numbers,
  2445.  
  2446.    -  and expiration of the LifeTime.
  2447.  
  2448.    In general, a determination is made upon receipt of a datagram.  If
  2449.    the transform specific processing finds that refreshment is needed,
  2450.    an automated SPI_Update is triggered.
  2451.  
  2452.    In addition, automated SPI_Updates allow rapid SPI refreshment for
  2453.    high bandwidth applications in a high delay environment.  The update
  2454.    messages flow in the opposite direction from the primary traffic,
  2455.    conserving bandwidth and avoiding service interruption.
  2456.  
  2457.    When creating each SPI, the implementation MAY optionally set an
  2458.    Update TimeOut (UTO); by default, to half the value of the LifeTime
  2459.    (SPILT/2).  This time is highly dynamic, and adjustable to provide an
  2460.    automated SPI_Update long before transform specific processing.  If
  2461.    no new Photuris exchange occurs within the time limit, and the
  2462.    current exchange state has not expired, an automated SPI_Update is
  2463.    sent.
  2464.  
  2465.  
  2466.  
  2467.  
  2468.  
  2469.  
  2470. Karn & Simpson                Experimental                     [Page 40]
  2471.  
  2472. RFC 2522                   Photuris Protocol                  March 1999
  2473.  
  2474.  
  2475. 6.1.  SPI_Needed
  2476.  
  2477.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2478.    |                                                               |
  2479.    ~                       Initiator-Cookie                        ~
  2480.    |                                                               |
  2481.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2482.    |                                                               |
  2483.    ~                       Responder-Cookie                        ~
  2484.    |                                                               |
  2485.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2486.    |    Message    |                  Reserved-LT                  |
  2487.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2488.    |                         Reserved-SPI                          |
  2489.    +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
  2490.    |                                                               |
  2491.    ~                         Verification                          ~
  2492.    |                                                               |
  2493.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2494.    |  Attributes-Needed ...
  2495.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2496.                                                       ... Padding  |
  2497.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2498.  
  2499.  
  2500.    Initiator-Cookie  16 bytes.  Copied from the Value_Request.
  2501.  
  2502.    Responder-Cookie  16 bytes.  Copied from the Value_Request.
  2503.  
  2504.    Message          8
  2505.  
  2506.    Reserved-LT      3 bytes.  For future use; MUST be filled with a
  2507.                     random non-zero value when transmitted, and MUST be
  2508.                     ignored when received.
  2509.  
  2510.    Reserved-SPI     4 bytes.  For future use; MUST be set to zero when
  2511.                     transmitted, and MUST be ignored when received.
  2512.  
  2513.    Verification     Variable Precision Integer, or other format
  2514.                     indicated by the current Scheme-Choice.  The
  2515.                     calculation of the value is described in "Validity
  2516.                     Verification".
  2517.  
  2518.                     The field may be any integral number of bytes in
  2519.                     length.  It does not require any particular
  2520.                     alignment.  The 32-bit alignment shown is for
  2521.                     convenience in the illustration.
  2522.  
  2523.  
  2524.  
  2525.  
  2526. Karn & Simpson                Experimental                     [Page 41]
  2527.  
  2528. RFC 2522                   Photuris Protocol                  March 1999
  2529.  
  2530.  
  2531.    Attributes-Needed
  2532.                     4 or more bytes.  A list of two or more attributes,
  2533.                     selected from the list of Offered-Attributes
  2534.                     supported by the peer.
  2535.  
  2536.                     The contents and usage of this list are as
  2537.                     previously described in "Attribute Choices List".
  2538.                     The end of the list is indicated by the UDP Length
  2539.                     after removing the Padding (UDP Length - last
  2540.                     Padding value).
  2541.  
  2542.    Padding          8 or more bytes.  The message is padded in the same
  2543.                     fashion specified for Identification Exchange
  2544.                     messages.
  2545.  
  2546.    The portion of the message after the SPI field is masked using the
  2547.    Privacy-Method indicated by the current Scheme-Choice.
  2548.  
  2549.    The fields following the SPI are opaque.  That is, the values are set
  2550.    prior to masking (and optional encryption), and examined only after
  2551.    unmasking (and optional decryption).
  2552.  
  2553.  
  2554.  
  2555.  
  2556.  
  2557.  
  2558.  
  2559.  
  2560.  
  2561.  
  2562.  
  2563.  
  2564.  
  2565.  
  2566.  
  2567.  
  2568.  
  2569.  
  2570.  
  2571.  
  2572.  
  2573.  
  2574.  
  2575.  
  2576.  
  2577.  
  2578.  
  2579.  
  2580.  
  2581.  
  2582. Karn & Simpson                Experimental                     [Page 42]
  2583.  
  2584. RFC 2522                   Photuris Protocol                  March 1999
  2585.  
  2586.  
  2587. 6.2.  SPI_Update
  2588.  
  2589.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2590.    |                                                               |
  2591.    ~                       Initiator-Cookie                        ~
  2592.    |                                                               |
  2593.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2594.    |                                                               |
  2595.    ~                       Responder-Cookie                        ~
  2596.    |                                                               |
  2597.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2598.    |    Message    |                    LifeTime                   |
  2599.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2600.    |                   Security-Parameters-Index                   |
  2601.    +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
  2602.    |                                                               |
  2603.    ~                         Verification                          ~
  2604.    |                                                               |
  2605.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2606.    |  Attribute-Choices ...
  2607.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2608.                                                       ... Padding  |
  2609.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2610.  
  2611.  
  2612.    Initiator-Cookie  16 bytes.  Copied from the Value_Request.
  2613.  
  2614.    Responder-Cookie  16 bytes.  Copied from the Value_Request.
  2615.  
  2616.    Message          9
  2617.  
  2618.    LifeTime         3 bytes.  The number of seconds remaining before the
  2619.                     indicated SPI expires.  The value zero indicates
  2620.                     deletion of the indicated SPI.
  2621.  
  2622.    Security-Parameters-Index (SPI)
  2623.                     4 bytes.  The SPI to be used for incoming
  2624.                     communications.
  2625.  
  2626.                     This may be a new SPI value (for creation), or an
  2627.                     existing SPI value (for deletion).  The value zero
  2628.                     indicates special processing.
  2629.  
  2630.    Verification     Variable Precision Integer, or other format
  2631.                     indicated by the current Scheme-Choice.  The
  2632.                     calculation of the value is described in "Validity
  2633.                     Verification".
  2634.  
  2635.  
  2636.  
  2637.  
  2638. Karn & Simpson                Experimental                     [Page 43]
  2639.  
  2640. RFC 2522                   Photuris Protocol                  March 1999
  2641.  
  2642.  
  2643.                     The field may be any integral number of bytes in
  2644.                     length.  It does not require any particular
  2645.                     alignment.  The 32-bit alignment shown is for
  2646.                     convenience in the illustration.
  2647.  
  2648.    Attribute-Choices
  2649.                     0 or more bytes.  When the SPI and SPILT are non-
  2650.                     zero, a list of attributes selected from the list of
  2651.                     Offered-Attributes supported by the peer.
  2652.  
  2653.                     The contents and usage of this list are as
  2654.                     previously described in "Attribute Choices List".
  2655.                     The end of the list is indicated by the UDP Length
  2656.                     after removing the Padding (UDP Length - last
  2657.                     Padding value).
  2658.  
  2659.    Padding          8 or more bytes.  The message is padded in the same
  2660.                     fashion specified for Identification Exchange
  2661.                     messages.
  2662.  
  2663.    The portion of the message after the SPI field is masked using the
  2664.    Privacy-Method indicated by the current Scheme-Choice.
  2665.  
  2666.    The fields following the SPI are opaque.  That is, the values are set
  2667.    prior to masking (and optional encryption), and examined only after
  2668.    unmasking (and optional decryption).
  2669.  
  2670.  
  2671. 6.2.1.  Creation
  2672.  
  2673.    When the LifeTime is non-zero, and the SPI is also non-zero, the
  2674.    SPI_Update can be used to create a new SPI.  When the SPI is zero,
  2675.    the SPI_Update is silently discarded.
  2676.  
  2677.    The new session-keys are calculated in the same fashion as the
  2678.    Identity_Messages.  Since the SPI value is always different than any
  2679.    previous SPI during the Exchange LifeTime of the shared-secret, the
  2680.    resulting session-keys will necessarily be different from all others
  2681.    used in the same direction.
  2682.  
  2683.    No retransmission timer is necessary.  Success is indicated by the
  2684.    peer use of the new SPI.
  2685.  
  2686.    Should all creation attempts fail, eventually the peer will find that
  2687.    all existing SPIs have expired, and will begin the Photuris exchange
  2688.    again by sending a new Cookie_Request.  When appropriate, this
  2689.    Cookie_Request MAY include a Responder-Cookie to retain previous
  2690.    party pairings.
  2691.  
  2692.  
  2693.  
  2694. Karn & Simpson                Experimental                     [Page 44]
  2695.  
  2696. RFC 2522                   Photuris Protocol                  March 1999
  2697.  
  2698.  
  2699. 6.2.2.  Deletion
  2700.  
  2701.    When the LifeTime is zero, the SPI_Update can be used to delete a
  2702.    single existing SPI.  When the SPI is also zero, the SPI_Update will
  2703.    delete all existing SPIs related to this Security Association, and
  2704.    mark the Photuris exchange state as expired.  This is especially
  2705.    useful when the application that needed them terminates.
  2706.  
  2707.    No retransmission timer is necessary.  This message is advisory, to
  2708.    reduce the number of ICMP Security Failures messages.
  2709.  
  2710.    Should any deletion attempts fail, the peer will learn that the
  2711.    deleted SPIs are invalid through the normal ICMP Security Failures
  2712.    messages, and will initiate a Photuris exchange by sending a new
  2713.    Cookie_Request.
  2714.  
  2715.  
  2716. 6.2.3.  Modification
  2717.  
  2718.    The SPI_Update cannot be used to modify existing SPIs, such as
  2719.    lengthen an existing SPI LifeTime, resurrect an expired SPI, or
  2720.    add/remove an Attribute-Choice.
  2721.  
  2722.    On receipt, such an otherwise valid message is silently discarded.
  2723.  
  2724.  
  2725. 6.3.  Validity Verification
  2726.  
  2727.    These messages are authenticated using the Validity-Method indicated
  2728.    by the current Scheme-Choice.  The Verification value is calculated
  2729.    prior to masking (and optional encryption), and verified after
  2730.    unmasking (and optional decryption).
  2731.  
  2732.    The Validity-Method authentication function is supplied with two
  2733.    input values:
  2734.  
  2735.     - the sender (SPI Owner) verification-key,
  2736.     - the data to be verified (as a concatenated sequence of bytes).
  2737.  
  2738.    The resulting output value is stored in the Verification field.
  2739.  
  2740.    The Validity-Method verification data consists of the following
  2741.    concatenated values:
  2742.  
  2743.  
  2744.  
  2745.  
  2746.  
  2747.  
  2748.  
  2749.  
  2750. Karn & Simpson                Experimental                     [Page 45]
  2751.  
  2752. RFC 2522                   Photuris Protocol                  March 1999
  2753.  
  2754.  
  2755.  
  2756.     + the Initiator Cookie,
  2757.     + the Responder Cookie,
  2758.     + the Message, LifeTime and SPI (or Reserved) fields,
  2759.     + the SPI Owner Identity Verification,
  2760.     + the SPI User Identity Verification,
  2761.     + the Attribute-Choices following the Verification field,
  2762.     + the Padding.
  2763.  
  2764.    Note that the order of the Identity Verification fields (from the
  2765.    Identity_Messages) is different in each direction, and the Message,
  2766.    LifeTime and SPI fields are also likely to be different in each
  2767.    direction.
  2768.  
  2769.    If the verification fails, the users are notified, and a
  2770.    Verification_Failure message is sent, without adding or deleting any
  2771.    SPIs.  On success, normal operation begins with the authentication
  2772.    and/or encryption of user datagrams.
  2773.  
  2774.    Implementation Notes:
  2775.  
  2776.       This is distinct from any authentication method specified for the
  2777.       SPI.
  2778.  
  2779.       The Identity Verification data includes both the Size and Value
  2780.       fields.  The Attribute-Choices data includes the Attribute, Length
  2781.       and Value fields.
  2782.  
  2783.  
  2784. 7.  Error Messages
  2785.  
  2786.    These messages are issued in response to Photuris state loss or other
  2787.    problems.  A message has effect in only one direction.  No
  2788.    retransmission timer is necessary.
  2789.  
  2790.    These messages are not masked.
  2791.  
  2792.    The receiver checks the Cookies for validity.  Special care MUST be
  2793.    taken that the Cookie pair in the Error Message actually match a pair
  2794.    currently in use, and that the protocol is currently in a state where
  2795.    such an Error Message might be expected.  Otherwise, these messages
  2796.    could provide an opportunity for a denial of service attack.  Invalid
  2797.    messages are silently discarded.
  2798.  
  2799.  
  2800.  
  2801.  
  2802.  
  2803.  
  2804.  
  2805.  
  2806. Karn & Simpson                Experimental                     [Page 46]
  2807.  
  2808. RFC 2522                   Photuris Protocol                  March 1999
  2809.  
  2810.  
  2811. 7.1.  Bad_Cookie
  2812.  
  2813.    For the format of the 33 byte message, see "Header Format".  There
  2814.    are no additional fields.
  2815.  
  2816.    Initiator-Cookie  16 bytes.  Copied from the offending message.
  2817.  
  2818.    Responder-Cookie  16 bytes.  Copied from the offending message.
  2819.  
  2820.    Message          10
  2821.  
  2822.    This error message is sent when a Value_Request, Identity_Request,
  2823.    SPI_Needed, or SPI_Update is received, and the receiver specific
  2824.    Cookie is invalid or the associated exchange state has expired.
  2825.  
  2826.    During the Photuris exchange, when this error message is received, it
  2827.    has no immediate effect on the operation of the protocol phases.
  2828.    Later, when Retransmissions have been exceeded, and this error
  2829.    message has been received, the Initiator SHOULD begin the Photuris
  2830.    exchange again by sending a new Cookie_Request with the Responder-
  2831.    Cookie and Counter updated appropriately.
  2832.  
  2833.    When this error message is received in response to SPI_Needed, the
  2834.    exchange state SHOULD NOT be marked as expired, but the party SHOULD
  2835.    initiate a Photuris exchange by sending a new Cookie_Request.
  2836.  
  2837.    When this error message is received in response to SPI_Update, the
  2838.    exchange state SHOULD NOT be marked as expired, and no further action
  2839.    is taken.  A new exchange will be initiated later when needed by the
  2840.    peer to send authenticated and/or encrypted data.
  2841.  
  2842.    Existing SPIs are not deleted.  They expire normally, and are purged
  2843.    sometime later.
  2844.  
  2845.  
  2846. 7.2.  Resource_Limit
  2847.  
  2848.    For the format of the 34 byte message, see "Cookie_Request".  There
  2849.    are no additional fields.
  2850.  
  2851.    Initiator-Cookie  16 bytes.  Copied from the offending message.
  2852.  
  2853.    Responder-Cookie  16 bytes.  Copied from the offending message.
  2854.  
  2855.                     Special processing is applied to a Cookie_Request.
  2856.                     When the offending message Responder-Cookie and
  2857.                     Counter were both zero, and an existing exchange has
  2858.                     not yet been purged, this field is replaced with the
  2859.  
  2860.  
  2861.  
  2862. Karn & Simpson                Experimental                     [Page 47]
  2863.  
  2864. RFC 2522                   Photuris Protocol                  March 1999
  2865.  
  2866.  
  2867.                     Responder-Cookie from the existing exchange.
  2868.  
  2869.    Message          11
  2870.  
  2871.    Counter          1 byte.  Copied from the offending message.
  2872.  
  2873.                     When zero, the Responder-Cookie indicates the
  2874.                     Initiator of a previous exchange, or no previous
  2875.                     exchange is specified.
  2876.  
  2877.                     When non-zero, the Responder-Cookie indicates the
  2878.                     Responder to a previous exchange.  This value is set
  2879.                     to the Counter from the corresponding
  2880.                     Cookie_Response.
  2881.  
  2882.    This error message is sent when a Cookie_Request, Value_Request or
  2883.    SPI_Needed is received, and too many SPI values are already in use
  2884.    for that peer, or some other Photuris resource is unavailable.
  2885.  
  2886.    During the Photuris exchange, when this error message is received in
  2887.    response to a Cookie_Request or Value_Request, the implementation
  2888.    SHOULD double the retransmission timeout (as usual) for sending
  2889.    another Cookie_Request or Value_Request.  Otherwise, it has no
  2890.    immediate effect on the operation of the protocol phases.  Later,
  2891.    when Retransmissions have been exceeded, and this error message has
  2892.    been received, the Initiator SHOULD begin the Photuris exchange again
  2893.    by sending a new Cookie_Request with the Responder-Cookie and Counter
  2894.    updated appropriately.
  2895.  
  2896.    When this error message is received in response to SPI_Needed, the
  2897.    implementation SHOULD NOT send another SPI_Needed until one of the
  2898.    existing SPIs associated with this exchange is deleted or has
  2899.    expired.
  2900.  
  2901.  
  2902. 7.3.  Verification_Failure
  2903.  
  2904.    For the format of the 33 byte message, see "Header Format".  There
  2905.    are no additional fields.
  2906.  
  2907.    Initiator-Cookie  16 bytes.  Copied from the offending message.
  2908.  
  2909.    Responder-Cookie  16 bytes.  Copied from the offending message.
  2910.  
  2911.    Message          12
  2912.  
  2913.    This error message is sent when an Identity_Message, SPI_Needed or
  2914.    SPI_Update is received, and verification fails.
  2915.  
  2916.  
  2917.  
  2918. Karn & Simpson                Experimental                     [Page 48]
  2919.  
  2920. RFC 2522                   Photuris Protocol                  March 1999
  2921.  
  2922.  
  2923.    When this error message is received, the implementation SHOULD log
  2924.    the occurance, and notify an operator as appropriate.  However,
  2925.    receipt has no effect on the operation of the protocol.
  2926.  
  2927.  
  2928. 7.4.  Message_Reject
  2929.  
  2930.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2931.    |                                                               |
  2932.    ~                       Initiator-Cookie                        ~
  2933.    |                                                               |
  2934.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2935.    |                                                               |
  2936.    ~                       Responder-Cookie                        ~
  2937.    |                                                               |
  2938.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2939.    |    Message    |  Bad-Message  |             Offset            |
  2940.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2941.  
  2942.  
  2943.    Initiator-Cookie  16 bytes.  Copied from the offending message.
  2944.  
  2945.    Responder-Cookie  16 bytes.  Copied from the offending message.
  2946.  
  2947.    Message          13
  2948.  
  2949.    Bad-Message      1 byte.  Indicates the Message number of the
  2950.                     offending message.
  2951.  
  2952.    Offset           2 bytes.  The number of bytes from the beginning of
  2953.                     the offending message where the unrecognized field
  2954.                     starts.  The minimum value is 32.
  2955.  
  2956.    This error message is sent when an optional Message type is received
  2957.    that is not supported, or an optional format of a supported Message
  2958.    is not recognized.
  2959.  
  2960.    When this error message is received, the implementation SHOULD log
  2961.    the occurance, and notify an operator as appropriate.  However,
  2962.    receipt has no effect on the operation of the protocol.
  2963.  
  2964.  
  2965.  
  2966.  
  2967.  
  2968.  
  2969.  
  2970.  
  2971.  
  2972.  
  2973.  
  2974. Karn & Simpson                Experimental                     [Page 49]
  2975.  
  2976. RFC 2522                   Photuris Protocol                  March 1999
  2977.  
  2978.  
  2979. 8.  Public Value Exchanges
  2980.  
  2981.    Photuris is based in principle on public-key cryptography,
  2982.    specifically Diffie-Hellman key exchange.  Exchange of public D-H
  2983.    Exchange-Values based on private-secret values results in a mutual
  2984.    shared-secret between the parties.  This shared-secret can be used on
  2985.    its own, or to generate a series of session-keys for authentication
  2986.    and encryption of subsequent traffic.
  2987.  
  2988.    This document assumes familiarity with the Diffie-Hellman public-key
  2989.    algorithm.  A good description can be found in [Schneier95].
  2990.  
  2991.  
  2992. 8.1.  Modular Exponentiation Groups
  2993.  
  2994.    The original Diffie-Hellman technique [DH76] specified modular
  2995.    exponentiation.  A public-value is generated using a generator (g),
  2996.    raised to a private-secret exponent (x), modulo a prime (p):
  2997.  
  2998.       (g**x) mod p.
  2999.  
  3000.    When these public-values are exchanged between parties, the parties
  3001.    can calculate a shared-secret value between themselves:
  3002.  
  3003.       (g**xy) mod p.
  3004.  
  3005.    The generator (g) and modulus (p) are established by the Scheme-
  3006.    Choice (see the "Basic Exchange-Schemes" for details).  They are
  3007.    offered in the Cookie_Response, and one pair is chosen in the
  3008.    Value_Request.
  3009.  
  3010.    The private exponents (x) and (y) are kept secret by the parties.
  3011.    Only the public-value result of the modular exponentiation with (x)
  3012.    or (y) is sent as the Initiator and Responder Exchange-Value.
  3013.  
  3014.    These public-values are represented in single Variable Precision
  3015.    Integers.  The Size of these Exchange-Values will match the Size of
  3016.    the modulus (p).
  3017.  
  3018.  
  3019. 8.2.  Moduli Selection
  3020.  
  3021.    Each implementation proposes one or more moduli in its Offered-
  3022.    Schemes.  Every implementation MUST support up to 1024-bit moduli.
  3023.  
  3024.    For any particular Photuris node, these moduli need not change for
  3025.    significant periods of time; likely days or weeks.  A background
  3026.    process can periodically generate new moduli.
  3027.  
  3028.  
  3029.  
  3030. Karn & Simpson                Experimental                     [Page 50]
  3031.  
  3032. RFC 2522                   Photuris Protocol                  March 1999
  3033.  
  3034.  
  3035.       For 512-bit moduli, current estimates would provide 64
  3036.       (pessimistic) bit-equivalents of cryptographic strength.
  3037.  
  3038.       For 1024-bit moduli, current estimates would range from 80
  3039.       (pessimistic) through 98 (optimistic) bit-equivalents of
  3040.       cryptographic strength.
  3041.  
  3042.    These estimates are used when choosing moduli that are appropriate
  3043.    for the desired Security Parameter attributes.
  3044.  
  3045.  
  3046. 8.2.1.  Bootstrap Moduli
  3047.  
  3048.    Each implementation is likely to use a fixed modulus during its
  3049.    bootstrap, until it can generate another modulus in the background.
  3050.    As the bootstrap modulus will be widely distributed, and reused
  3051.    whenever the machine reinitializes, it SHOULD be a "safe" prime (p =
  3052.    2q+1) to provide the greatest long-term protection.
  3053.  
  3054.    Implementors are encouraged to generate their own bootstrap moduli,
  3055.    and to change bootstrap moduli in successive implementation releases.
  3056.  
  3057.  
  3058. 8.2.2.  Learning Moduli
  3059.  
  3060.    As Photuris exchanges are initiated, new moduli will be learned from
  3061.    the Responder Offered-Schemes.  The Initiator MAY cache these moduli
  3062.    for its own use.
  3063.  
  3064.    Before offering any learned modulus, the implementation MUST perform
  3065.    at least one iteration of probable primality verification.  In this
  3066.    fashion, many processors will perform verification in parallel as
  3067.    moduli are passed around.
  3068.  
  3069.    When primality verification failures are found, the failed moduli
  3070.    SHOULD be retained for some (implementation dependent) period of
  3071.    time, to avoid re-learning and re-testing after subsequent exchanges.
  3072.  
  3073.  
  3074. 8.3.  Generator Selection
  3075.  
  3076.    The generator (g) should be chosen such that the private-secret
  3077.    exponents will generate all possible public-values, evenly
  3078.    distributed throughout the range of the modulus (p), without cycling
  3079.    through a smaller subset.  Such a generator is called a "primitive
  3080.    root" (which is trivial to find when p is "safe").
  3081.  
  3082.    Only one generator (2) is required to be supported.
  3083.  
  3084.  
  3085.  
  3086. Karn & Simpson                Experimental                     [Page 51]
  3087.  
  3088. RFC 2522                   Photuris Protocol                  March 1999
  3089.  
  3090.  
  3091.    Implementation Notes:
  3092.  
  3093.       One useful technique is to select the generator, and then limit
  3094.       the modulus selection sieve to primes with that generator:
  3095.  
  3096.          2   when p (mod 24) = 11.
  3097.          3   when p (mod 12) = 5.
  3098.          5   when p (mod 10) = 3 or 7.
  3099.  
  3100.       The required generator (2) improves efficiency in multiplication
  3101.       performance.  It is usable even when it is not a primitive root,
  3102.       as it still covers half of the space of possible residues.
  3103.  
  3104.  
  3105. 8.4.  Exponent Selection
  3106.  
  3107.    Each implementation generates a separate random private-secret
  3108.    exponent for each different modulus.  Then, a D-H Exchange-Value is
  3109.    calculated for the given modulus, generator, and exponent.
  3110.  
  3111.    This specification recommends that the exponent length be at least
  3112.    twice the desired cryptographic strength of the longest session-key
  3113.    needed by the strongest offered-attribute.
  3114.  
  3115.    Based on the estimates in "Moduli Selection" (above):
  3116.  
  3117.       For 512-bit moduli, exponent lengths of 128 bits (or more) are
  3118.       recommended.
  3119.  
  3120.       For 1024-bit moduli, exponent lengths of 160 to 256 bits (or more)
  3121.       are recommended.
  3122.  
  3123.    Although the same exponent and Exchange-Value may be used with
  3124.    several parties whenever the same modulus and generator are used, the
  3125.    exponent SHOULD be changed at random intervals.  A background process
  3126.    can periodically destroy the old values, generate a new random
  3127.    private-secret exponent, and recalculate the Exchange-Value.
  3128.  
  3129.    Implementation Notes:
  3130.  
  3131.       The size of the exponent is entirely implementation dependent, is
  3132.       unknown to the other party, and can be easily changed.
  3133.  
  3134.       Since these operations involve several time-consuming modular
  3135.       exponentiations, moving them to the "background" substantially
  3136.       improves the apparent execution speed of the Photuris protocol.
  3137.       It also reduces CPU loading sufficiently to allow a single
  3138.       public/private key-pair to be used in several closely spaced
  3139.  
  3140.  
  3141.  
  3142. Karn & Simpson                Experimental                     [Page 52]
  3143.  
  3144. RFC 2522                   Photuris Protocol                  March 1999
  3145.  
  3146.  
  3147.       Photuris executions, when creating Security Associations with
  3148.       several different nodes over a short period of time.
  3149.  
  3150.       Other pre-computation suggestions are described in [BGMW93, LL94,
  3151.       Rooij94].
  3152.  
  3153.  
  3154. 8.5.  Defective Exchange Values
  3155.  
  3156.    Some exponents do not qualify as secret.  The exponent 0 will
  3157.    generate the Exchange-Value 1, and the exponent 1 will generate the
  3158.    Exchange-Value g.  Small exponents will be easily visible and SHOULD
  3159.    be avoided where:
  3160.  
  3161.       g**x < p.
  3162.  
  3163.    Depending on the structure of the moduli, certain exponents can be
  3164.    used for sub-group confinement attacks.  For "safe" primes (p =
  3165.    2q+1), these exponents are p-1 and (p-1)/2, which will generate the
  3166.    Exchange-Values 1 and p-1 respectively.
  3167.  
  3168.    When an implementation chooses a random exponent, the resulting
  3169.    Exchange-Value is examined.  If the Exchange-Value is represented in
  3170.    less than half the number of significant bits in the modulus, then a
  3171.    new random exponent MUST be chosen.
  3172.  
  3173.       For 512-bit moduli, Exchange-Values of 2**256 or greater are
  3174.       required.
  3175.  
  3176.       For 1024-bit moduli, Exchange-Values of 2**512 or greater are
  3177.       required.
  3178.  
  3179.    In addition, if the resulting Exchange-Value is p-1, then a new
  3180.    random exponent MUST be chosen.
  3181.  
  3182.    Upon receipt of an Exchange-Value that fails to meet the
  3183.    requirements, the Value Exchange message is silently discarded.
  3184.  
  3185.    Implementation Notes:
  3186.  
  3187.       Avoidance of small exponents can be assured by setting at least
  3188.       one bit in the most significant half of the exponent.
  3189.  
  3190.  
  3191.  
  3192.  
  3193.  
  3194.  
  3195.  
  3196.  
  3197.  
  3198. Karn & Simpson                Experimental                     [Page 53]
  3199.  
  3200. RFC 2522                   Photuris Protocol                  March 1999
  3201.  
  3202.  
  3203. 9.  Basic Exchange-Schemes
  3204.  
  3205.    Initial values are assigned as follows:
  3206.  
  3207.    (0)   Reserved.
  3208.  
  3209.    (1)   Reserved.
  3210.  
  3211.    (2)   Implementation Required.  Any modulus (p) with a recommended
  3212.          generator (g) of 2.  When the Exchange-Scheme Size is non-zero,
  3213.          the modulus is contained in the Exchange-Scheme Value field in
  3214.          the list of Offered-Schemes.
  3215.  
  3216.          An Exchange-Scheme Size of zero is invalid.
  3217.  
  3218.          Key-Generation-Function     "MD5 Hash"
  3219.          Privacy-Method              "Simple Masking"
  3220.          Validity-Method             "MD5-IPMAC Check"
  3221.  
  3222.          This combination of features requires a modulus with at least
  3223.          64-bits of cryptographic strength.
  3224.  
  3225.    (3)   Exchange-Schemes 3 to 255 are intended for future well-known
  3226.          published schemes.
  3227.  
  3228.    (256)  Exchange-Schemes 256 to 32767 are intended for vendor-specific
  3229.          unpublished schemes.  Implementors wishing a number MUST
  3230.          request the number from the authors.
  3231.  
  3232.    (32768)
  3233.          Exchange-Schemes 32768 to 65535 are available for cooperating
  3234.          parties to indicate private schemes, regardless of vendor
  3235.          implementation.  These numbers are not reserved, and are
  3236.          subject to duplication.  Other criteria, such as the IP Source
  3237.          and Destination of the Cookie_Request, are used to
  3238.          differentiate the particular Exchange-Schemes available.
  3239.  
  3240.  
  3241.  
  3242.  
  3243.  
  3244.  
  3245.  
  3246.  
  3247.  
  3248.  
  3249.  
  3250.  
  3251.  
  3252.  
  3253.  
  3254. Karn & Simpson                Experimental                     [Page 54]
  3255.  
  3256. RFC 2522                   Photuris Protocol                  March 1999
  3257.  
  3258.  
  3259. 10.  Basic Key-Generation-Function
  3260. 10.1.  MD5 Hash
  3261.  
  3262.    MD5 [RFC-1321] is used as a pseudo-random-function for generating the
  3263.    key(s).  The key(s) begin with the most significant bits of the hash.
  3264.    MD5 is iterated as needed to generate the requisite length of key
  3265.    material.
  3266.  
  3267.    When an individual key does not use all 128-bits of the last hash,
  3268.    any remaining unused (least significant) bits of the last hash are
  3269.    discarded.  When combined with other uses of key generation for the
  3270.    same purpose, the next key will begin with a new hash iteration.
  3271.  
  3272.  
  3273. 11.  Basic Privacy-Method
  3274. 11.1.  Simple Masking
  3275.  
  3276.    As described in "Privacy-Key Computation", sufficient privacy-key
  3277.    material is generated to match the message length, beginning with the
  3278.    next field after the SPI, and including the Padding.  The message is
  3279.    masked by XOR with the privacy-key.
  3280.  
  3281.  
  3282. 12.  Basic Validity-Method
  3283. 12.1.  MD5-IPMAC Check
  3284.  
  3285.    As described in "Validity Verification", the Verification field value
  3286.    is the MD5 [RFC-1321] hash over the concatenation of
  3287.  
  3288.       MD5( key, keyfill, data, datafill, key, md5fill )
  3289.  
  3290.    where the key is the computed verification-key.
  3291.  
  3292.    The keyfill and datafill use the same pad-with-length technique
  3293.    defined for md5fill.  This padding and length is implicit, and does
  3294.    not appear in the datagram.
  3295.  
  3296.    The resulting Verification field is a 128-bit Variable Precision
  3297.    Integer (18 bytes including Size).  When used in calculations, the
  3298.    Verification data includes both the Size and Value fields.
  3299.  
  3300.  
  3301.  
  3302.  
  3303.  
  3304.  
  3305.  
  3306.  
  3307.  
  3308.  
  3309.  
  3310. Karn & Simpson                Experimental                     [Page 55]
  3311.  
  3312. RFC 2522                   Photuris Protocol                  March 1999
  3313.  
  3314.  
  3315. 13.  Basic Attributes
  3316.  
  3317.    Implementors wishing a number MUST request the number from the
  3318.    authors.  Initial values are assigned as follows:
  3319.  
  3320.      Use    Type
  3321.       -       0* padding
  3322.       -       1* AH-Attributes
  3323.       -       2+ ESP-Attributes
  3324.      AEI      5* MD5-IPMAC
  3325.      AEIX   255+ Organizational
  3326.  
  3327.      A      AH Attribute-Choice
  3328.       E     ESP Attribute-Choice
  3329.        I    Identity-Choice
  3330.         X   dependent on list location
  3331.          +  feature must be recognized even when not supported
  3332.          *  feature must be supported (mandatory)
  3333.  
  3334.    Other attributes are specified in companion documents.
  3335.  
  3336.  
  3337. 13.1.  Padding
  3338.  
  3339.    +-+-+-+-+-+-+-+-+
  3340.    |   Attribute   |
  3341.    +-+-+-+-+-+-+-+-+
  3342.  
  3343.  
  3344.    Attribute        0
  3345.  
  3346.    Each attribute may have value fields that are multiple bytes.  To
  3347.    facilitate processing efficiency, these fields are aligned on
  3348.    integral modulo 8 byte (64-bit) boundaries.
  3349.  
  3350.    Padding is accomplished by insertion of 1 to 7 Attribute 0 padding
  3351.    bytes before the attribute that needs alignment.
  3352.  
  3353.    No padding is used after the final attribute in a list.
  3354.  
  3355.  
  3356.  
  3357.  
  3358.  
  3359.  
  3360.  
  3361.  
  3362.  
  3363.  
  3364.  
  3365.  
  3366. Karn & Simpson                Experimental                     [Page 56]
  3367.  
  3368. RFC 2522                   Photuris Protocol                  March 1999
  3369.  
  3370.  
  3371. 13.2.  AH-Attributes
  3372.  
  3373.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  3374.    |   Attribute   |    Length     |
  3375.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  3376.  
  3377.  
  3378.    Attribute        1
  3379.  
  3380.    Length           0
  3381.  
  3382.    When a list of Attributes is specified, this Attribute begins the
  3383.    section of the list which applies to the Authentication Header (AH).
  3384.  
  3385.  
  3386. 13.3.  ESP-Attributes
  3387.  
  3388.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  3389.    |   Attribute   |    Length     |  PayloadType  |
  3390.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  3391.  
  3392.  
  3393.    Attribute        2
  3394.  
  3395.    Length           1
  3396.  
  3397.    PayloadType      1 byte.  Indicates the contents of the ESP Transform
  3398.                     Data field, using the IP Next Header (Protocol)
  3399.                     value.  Up-to-date values of the IP Next Header
  3400.                     (Protocol) are specified in the most recent
  3401.                     "Assigned Numbers" [RFC-1700].
  3402.  
  3403.                     For example, when encrypting an entire IP datagram,
  3404.                     this field will contain the value 4, indicating IP-
  3405.                     in-IP encapsulation.
  3406.  
  3407.    When a list of Attributes is specified, this Attribute begins the
  3408.    section of the list which applies to the Encapsulating Security
  3409.    Payload (ESP).
  3410.  
  3411.    When listed as an Offered-Attribute, the PayloadType is set to 255.
  3412.  
  3413.    When selected as an Attribute-Choice, the PayloadType is set to the
  3414.    actual value to be used.
  3415.  
  3416.  
  3417.  
  3418.  
  3419.  
  3420.  
  3421.  
  3422. Karn & Simpson                Experimental                     [Page 57]
  3423.  
  3424. RFC 2522                   Photuris Protocol                  March 1999
  3425.  
  3426.  
  3427. 13.4.  MD5-IPMAC
  3428.  
  3429.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  3430.    |   Attribute   |    Length     |
  3431.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  3432.  
  3433.  
  3434.    Attribute        5
  3435.  
  3436.    Length           0
  3437.  
  3438.  
  3439.  
  3440. 13.4.1.  Symmetric Identification
  3441.  
  3442.    When selected as an Identity-Choice, the immediately following
  3443.    Identification field contains an unstructured Variable Precision
  3444.    Integer.  Valid Identifications and symmetric secret-keys are
  3445.    preconfigured by the parties.
  3446.  
  3447.    There is no required format or content for the Identification value.
  3448.    The value may be a number or string of any kind.  See "Use of
  3449.    Identification and Secrets" for details.
  3450.  
  3451.    The symmetric secret-key (as specified) is selected based on the
  3452.    contents of the Identification field.  All implementations MUST
  3453.    support at least 62 bytes.  The selected symmetric secret-key SHOULD
  3454.    provide at least 64-bits of cryptographic strength.
  3455.  
  3456.    As described in "Identity Verification", the Verification field value
  3457.    is the MD5 [RFC-1321] hash over the concatenation of:
  3458.  
  3459.       MD5( key, keyfill, data, datafill, key, md5fill )
  3460.  
  3461.    where the key is the computed verification-key.
  3462.  
  3463.    The keyfill and datafill use the same pad-with-length technique
  3464.    defined for md5fill.  This padding and length is implicit, and does
  3465.    not appear in the datagram.
  3466.  
  3467.    The resulting Verification field is a 128-bit Variable Precision
  3468.    Integer (18 bytes including Size).  When used in calculations, the
  3469.    Verification data includes both the Size and Value fields.
  3470.  
  3471.    For both "Identity Verification" and "Validity Verification", the
  3472.    verification-key is the MD5 [RFC-1321] hash of the following
  3473.    concatenated values:
  3474.  
  3475.  
  3476.  
  3477.  
  3478. Karn & Simpson                Experimental                     [Page 58]
  3479.  
  3480. RFC 2522                   Photuris Protocol                  March 1999
  3481.  
  3482.  
  3483.  
  3484.     + the symmetric secret-key,
  3485.     + the computed shared-secret.
  3486.  
  3487.    For "Session-Key Computation", the symmetric secret-key is used
  3488.    directly as the generation-key.
  3489.  
  3490.    Regardless of the internal representation of the symmetric secret-
  3491.    key, when used in calculations it is in the same form as the Value
  3492.    part of a Variable Precision Integer:
  3493.  
  3494.     - most significant byte first.
  3495.     - bits used are right justified within byte boundaries.
  3496.     - any unused bits are in the most significant byte.
  3497.     - unused bits are zero filled.
  3498.  
  3499.    The symmetric secret-key does not include a Size field.
  3500.  
  3501.  
  3502. 13.4.2.  Authentication
  3503.  
  3504.    May be selected as an AH or ESP Attribute-Choice, pursuant to [RFC-
  3505.    1828] et sequitur.  The selected Exchange-Scheme SHOULD provide at
  3506.    least 64-bits of cryptographic strength.
  3507.  
  3508.    As described in "Session-Key Computation", the most significant 384-
  3509.    bits (48 bytes) of the Key-Generation-Function iterations are used
  3510.    for the key.
  3511.  
  3512.    Profile:
  3513.  
  3514.       When negotiated with Photuris, the transform differs slightly from
  3515.       [RFC-1828].
  3516.  
  3517.       The form of the authenticated message is:
  3518.  
  3519.          MD5( key, keyfill, datagram, datafill, key, md5fill )
  3520.  
  3521.       where the key is the SPI session-key.
  3522.  
  3523.       The additional datafill protects against the (impractical) attack
  3524.       described in [PO96].  The keyfill and datafill use the same pad-
  3525.       with-length technique defined for md5fill.  This padding and
  3526.       length is implicit, and does not appear in the datagram.
  3527.  
  3528.  
  3529.  
  3530.  
  3531.  
  3532.  
  3533.  
  3534. Karn & Simpson                Experimental                     [Page 59]
  3535.  
  3536. RFC 2522                   Photuris Protocol                  March 1999
  3537.  
  3538.  
  3539. 13.5.  Organizational
  3540.  
  3541.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  3542.    |   Attribute   |    Length     |              OUI
  3543.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  3544.           ...      |     Kind      |  Value(s) ...
  3545.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  3546.  
  3547.  
  3548.    Attribute        255
  3549.  
  3550.    Length           >= 4
  3551.  
  3552.                     When the Length is four, no Value(s) field is
  3553.                     present.
  3554.  
  3555.    OUI              3 bytes.  The vendor's Organizationally Unique
  3556.                     Identifier, assigned by IEEE 802 or IANA (see [RFC-
  3557.                     1700] for contact details).  The bits within the
  3558.                     byte are in canonical order, and the most
  3559.                     significant byte is transmitted first.
  3560.  
  3561.    Kind             1 byte.  Indicates a sub-type for the OUI.  There is
  3562.                     no standardization for this field.  Each OUI
  3563.                     implements its own values.
  3564.  
  3565.    Value(s)         0 or more bytes.  The details are implementation
  3566.                     specific.
  3567.  
  3568.    Some implementors might not need nor want to publish their
  3569.    proprietary algorithms and attributes.  This OUI mechanism is
  3570.    available to specify these without encumbering the authors with
  3571.    proprietary number requests.
  3572.  
  3573.  
  3574.  
  3575.  
  3576.  
  3577.  
  3578.  
  3579.  
  3580.  
  3581.  
  3582.  
  3583.  
  3584.  
  3585.  
  3586.  
  3587.  
  3588.  
  3589.  
  3590. Karn & Simpson                Experimental                     [Page 60]
  3591.  
  3592. RFC 2522                   Photuris Protocol                  March 1999
  3593.  
  3594.  
  3595. A.  Automaton
  3596.  
  3597.    An example automaton is provided to illustrate the operation of the
  3598.    protocol.  It is incomplete and non-deterministic; many of the
  3599.    Good/Bad semantic decisions are policy-based or too difficult to
  3600.    represent in tabular form.  Where conflicts appear between this
  3601.    example and the text, the text takes precedence.
  3602.  
  3603.    The finite-state automaton is defined by events, actions and state
  3604.    transitions.  Events include reception of external commands such as
  3605.    expiration of a timer, and reception of datagrams from a peer.
  3606.    Actions include the starting of timers and transmission of datagrams
  3607.    to the peer.
  3608.  
  3609.    Events
  3610.  
  3611.    DU13 = Communication Administratively Prohibited
  3612.    SF0  = Bad SPI
  3613.    SF4  = Need Authentication
  3614.    SF5  = Need Authorization
  3615.    WC   = Want Confidentiality
  3616.  
  3617.    RCQ+ = Receive Cookie_Request (Good)
  3618.    RCQ- = Receive Cookie_Request (Bad)
  3619.    RCR+ = Receive Cookie_Response (Good)
  3620.    RCR- = Receive Cookie_Response (Bad)
  3621.  
  3622.    RVQ+ = Receive Value_Request (Good)
  3623.    RVQ- = Receive Value_Request (Bad)
  3624.    RVR+ = Receive Value_Response (Good)
  3625.    RVR- = Receive Value_Response (Bad)
  3626.  
  3627.    RIQ+ = Receive Identity_Request (Good)
  3628.    RIQ- = Receive Identity_Request (Bad)
  3629.    RIR+ = Receive Identity_Response (Good)
  3630.    RIR- = Receive Identity_Response (Bad)
  3631.  
  3632.    RUN+ = Receive SPI_Needed (Good)
  3633.    RUN- = Receive SPI_Needed (Bad)
  3634.    RUM+ = Receive SPI_Update (Good)
  3635.    RUM- = Receive SPI_Update (Bad)
  3636.  
  3637.    RBC  = Receive Bad Cookie
  3638.    RRL  = Receive Resource Limit
  3639.    RVF  = Receive Verification Failure
  3640.    RMR  = Receive Message Reject
  3641.  
  3642.    TO+  = Timeout with counter > 0
  3643.  
  3644.  
  3645.  
  3646. Karn & Simpson                Experimental                     [Page 61]
  3647.  
  3648. RFC 2522                   Photuris Protocol                  March 1999
  3649.  
  3650.  
  3651.    TO-  = Timeout with counter expired
  3652.    UTO  = Update TimeOut
  3653.    XTO  = Exchange TimeOut
  3654.  
  3655.  
  3656.    Actions
  3657.  
  3658.    scq  = Send Cookie_Request
  3659.    scr  = Send Cookie_Response
  3660.  
  3661.    svq  = Send Value_Request
  3662.    svr  = Send Value_Response
  3663.  
  3664.    siq  = Send Identity_Request
  3665.    sir  = Send Identity_Response
  3666.  
  3667.    sum  = Send SPI_Update
  3668.  
  3669.    se*  = Send error message (see text)
  3670.    sbc  = Send Bad Cookie
  3671.    srl  = Send Resource Limit
  3672.    svf  = Send Verification Failure
  3673.  
  3674.    brto = Backoff Retransmission TimeOut
  3675.    buto = Backoff Update TimeOut
  3676.    rto  = Set Retransmission TimeOut
  3677.    uto  = Set Update TimeOut
  3678.    xto  = Set Exchange TimeOut
  3679.  
  3680.    log  = log operator message
  3681.  
  3682.  
  3683. A.1.  State Transition Table
  3684.  
  3685.    States are indicated horizontally, and events are read vertically.
  3686.    State transitions and actions are represented in the form
  3687.    action/new-state.  Multiple actions are separated by commas, and may
  3688.    continue on succeeding lines as space requires; multiple actions may
  3689.    be implemented in any convenient order.  The state may be followed by
  3690.    a letter, which indicates an explanatory footnote.  The dash ('-')
  3691.    indicates an illegal transition.
  3692.  
  3693.  
  3694.  
  3695.  
  3696.  
  3697.  
  3698.  
  3699.  
  3700.  
  3701.  
  3702. Karn & Simpson                Experimental                     [Page 62]
  3703.  
  3704. RFC 2522                   Photuris Protocol                  March 1999
  3705.  
  3706.  
  3707.  
  3708.    Initiator
  3709.  
  3710.          |    0         1         2         3         4
  3711.          | Initial    Cookie  CookieBad   Value    ValueBad
  3712.    ------+--------------------------------------------------
  3713.     DU13 |rto,scq/1 rto,scq/1 rto,scq/1     3         4
  3714.     SF0  |rto,scq/1     1         2         3         4
  3715.     SF4  |rto,scq/1     1         2         3         4
  3716.     SF5  |rto,scq/1     1         2         3         4
  3717.     WC   |rto,scq/1     1         2         3         4
  3718.          |
  3719.     RCR+ |    -     rto,svq/3 rto,svq/3     3         4
  3720.     RCR- |    0         1         2         3         4
  3721.     RVR+ |    -         -         -     rto,siq/5 rto,siq/5
  3722.     RVR- |    0         1         2         3         4
  3723.     RIR+ |    -         -         -         -         -
  3724.     RIR- |    0         1         2         3         4
  3725.          |
  3726.     RUN+ |    -         -         -         -         -
  3727.     RUN- |  sbc/0     sbc/1     sbc/2     sbc/3     sbc/4
  3728.     RUM+ |    -         -         -         -         -
  3729.     RUM- |  sbc/0     sbc/1     sbc/2     sbc/3     sbc/4
  3730.          |
  3731.     RBC  |    -         -         -         4         4
  3732.     RRL  |    -       brto/2    brto/2    brto/4    brto/4
  3733.     RVF  |    -         -         -         -         -
  3734.     RMR  |    -         -         -         -         -
  3735.          |
  3736.      TO+ |    -       scq/1     scq/2     svq/3     svq/4
  3737.      TO- |    -         0       scq/1       0       scq/1
  3738.     UTO  |    -         -         -         -         -
  3739.     XTO  |    -         0         0         0         0
  3740.  
  3741.  
  3742.  
  3743.  
  3744.  
  3745.  
  3746.  
  3747.  
  3748.  
  3749.  
  3750.  
  3751.  
  3752.  
  3753.  
  3754.  
  3755.  
  3756.  
  3757.  
  3758. Karn & Simpson                Experimental                     [Page 63]
  3759.  
  3760. RFC 2522                   Photuris Protocol                  March 1999
  3761.  
  3762.  
  3763.  
  3764.    Initiator
  3765.  
  3766.          |    5         6         8
  3767.          |Identity IdentityBad  Update
  3768.    ------+-----------------------------
  3769.     DU13 |    5         6         8
  3770.     SF0  |    5         6     rto,scq/1
  3771.     SF4  |    5         6     rto,scq/1
  3772.     SF5  |    5         6     rto,scq/1
  3773.     WC   |    5         6       sun/8
  3774.          |
  3775.     RCR+ |    5         6         8
  3776.     RCR- |    5         6         8
  3777.     RVR+ |    5         6         8
  3778.     RVR- |    5         6         8
  3779.     RIR+ |  uto/8     uto/8       8
  3780.     RIR- |  svf/5     svf/6       8
  3781.          |
  3782.     RUN+ |    -         -       sum/8
  3783.     RUN- |  sbc/5     sbc/6     se*/8
  3784.     RUM+ |    -         -         8
  3785.     RUM- |  sbc/5     sbc/6     se*/8
  3786.          |
  3787.     RBC  |    6         6     rto,scq/1
  3788.     RRL  |    5         6       buto/8
  3789.     RVF  |  log/5     log/6     log/8
  3790.     RMR  |  log/5     log/6     log/8
  3791.          |
  3792.      TO+ |  sim/5     sim/6       -
  3793.      TO- |    0       scq/1       -
  3794.     UTO  |    -         -       sum/8
  3795.     XTO  |    0         0         0
  3796.  
  3797.  
  3798.  
  3799.  
  3800.  
  3801.  
  3802.  
  3803.  
  3804.  
  3805.  
  3806.  
  3807.  
  3808.  
  3809.  
  3810.  
  3811.  
  3812.  
  3813.  
  3814. Karn & Simpson                Experimental                     [Page 64]
  3815.  
  3816. RFC 2522                   Photuris Protocol                  March 1999
  3817.  
  3818.  
  3819.  
  3820.    Responder
  3821.  
  3822.          |    0         7         8
  3823.          | Initial    Ready     Update
  3824.    ------+-----------------------------
  3825.     WC   |    -         7       sun/8
  3826.          |
  3827.     RCQ+ |  scr/0     scr/7     scr/8
  3828.     RCQ- |  srl/0     srl/7     srl/8
  3829.     RVQ+ |xto,svr/7   svr/7     svr/8
  3830.     RVQ- |  sbc/0     sbc/7     sbc/8
  3831.     RIQ+ |    -     uto,sir/8   sir/8
  3832.     RIQ- |  sbc/0     se*/7     se*/8
  3833.          |
  3834.     RUN+ |    -         -       sum/8
  3835.     RUN- |  sbc/0     sbc/7     se*/8
  3836.     RUM+ |    -         -         8
  3837.     RUM- |  sbc/0     sbc/7     se*/8
  3838.          |
  3839.     RBC  |    -         7     rto,scq/1
  3840.     RRL  |    -         -       buto/8
  3841.     RVF  |    -         -       log/8
  3842.     RMR  |    -         -       log/8
  3843.          |
  3844.     UTO  |    -         -       sum/8
  3845.     XTO  |    -         0         0
  3846.  
  3847.  
  3848.  
  3849. A.2.  States
  3850.  
  3851.    Following is a more detailed description of each automaton state.
  3852.  
  3853.    The "Bad" version of a state is to indicate that the Bad_Cookie or
  3854.    Resource_Limit message has been received.
  3855.  
  3856.  
  3857. A.2.1.  Initial
  3858.  
  3859.    The Initial state is fictional, in that there is no state between the
  3860.    parties.
  3861.  
  3862.  
  3863.  
  3864.  
  3865.  
  3866.  
  3867.  
  3868.  
  3869.  
  3870. Karn & Simpson                Experimental                     [Page 65]
  3871.  
  3872. RFC 2522                   Photuris Protocol                  March 1999
  3873.  
  3874.  
  3875. A.2.2.  Cookie
  3876.  
  3877.    In the Cookie state, the Initiator has sent a Cookie_Request, and is
  3878.    waiting for a Cookie_Response.  Both the Restart and Exchange timers
  3879.    are running.
  3880.  
  3881.    Note that the Responder has no Cookie state.
  3882.  
  3883.  
  3884. A.2.3.  Value
  3885.  
  3886.    In the Value state, the Initiator has sent its Exchange-Value, and is
  3887.    waiting for an Identity_Message.  Both the Restart and Exchange
  3888.    timers are running.
  3889.  
  3890.  
  3891. A.2.4.  Identity
  3892.  
  3893.    In the Identity state, the Initiator has sent an Identity_Request,
  3894.    and is waiting for an Identity_Response in reply.  Both the Restart
  3895.    and Exchange timers are running.
  3896.  
  3897.  
  3898. A.2.5.  Ready
  3899.  
  3900.    In the Ready state, the Responder has sent its Exchange-Value, and is
  3901.    waiting for an Identity_Message.  The Exchange timer is running.
  3902.  
  3903.  
  3904. A.2.6.  Update
  3905.  
  3906.    In the Update state, each party has concluded the Photuris exchange,
  3907.    and is unilaterally updating expiring SPIs until the Exchange
  3908.    LifeTime expires.  Both the Update and Exchange timers are running.
  3909.  
  3910.  
  3911.  
  3912.  
  3913.  
  3914.  
  3915.  
  3916.  
  3917.  
  3918.  
  3919.  
  3920.  
  3921.  
  3922.  
  3923.  
  3924.  
  3925.  
  3926. Karn & Simpson                Experimental                     [Page 66]
  3927.  
  3928. RFC 2522                   Photuris Protocol                  March 1999
  3929.  
  3930.  
  3931. B.  Use of Identification and Secrets
  3932.  
  3933.    Implementation of the base protocol requires support for operator
  3934.    configuration of participant identities and associated symmetric
  3935.    secret-keys.
  3936.  
  3937.    The form of the Identification and Secret fields is not constrained
  3938.    to be a readable string.  In addition to a simpler quoted string
  3939.    configuration, an implementation MUST allow configuration of an
  3940.    arbitrary stream of bytes.
  3941.  
  3942.  
  3943. B.1.  Identification
  3944.  
  3945.    Typically, the Identification is a user name, a site name, a Fully
  3946.    Qualified Domain Name, or an email address which contains a user name
  3947.    and a domain name.  Examples include:
  3948.  
  3949.       user
  3950.       node.site.
  3951.       user@node.site.
  3952.       rcmd@node.site.
  3953.       "Mundane Name" <user@node.site>
  3954.  
  3955.    There is no requirement that the domain name match any of the
  3956.    particular IP addresses in use by the parties.
  3957.  
  3958.  
  3959. B.2.  Group Identity With Group Secret
  3960.  
  3961.    A simple configuration approach could use a single Identity and
  3962.    Secret, distributed to all the participants in the trusted group.
  3963.    This might be appropriate between routers under a single
  3964.    administration comprising a Virtual Private Network over the
  3965.    Internet.
  3966.  
  3967.    Nota Bene:
  3968.       The passwords used in these examples do not meet the "MD5-IPMAC
  3969.       Symmetric Identification" recommendation for at least 64-bits of
  3970.       cryptographic strength.
  3971.  
  3972.    The administrator configures each router with the same username and
  3973.    password:
  3974.  
  3975.       identity local "Tiny VPN 1995 November" "abracadabra"
  3976.       identity remote "Tiny VPN 1995 November" "abracadabra"
  3977.  
  3978.    When the Initiator sends its Identity_Request, the SPI Owner
  3979.  
  3980.  
  3981.  
  3982. Karn & Simpson                Experimental                     [Page 67]
  3983.  
  3984. RFC 2522                   Photuris Protocol                  March 1999
  3985.  
  3986.  
  3987.    Identification field is "Tiny VPN 1995 November" and the SPI Owner
  3988.    secret-key is "abracadabra".
  3989.  
  3990.    When the Responder sends its Identity_Response, the SPI Owner
  3991.    Identification field is "Tiny VPN 1995 November" and the SPI Owner
  3992.    secret-key is "abracadabra".  The SPI User Identification is "Tiny
  3993.    VPN 1995 November" (taken from the request), and the SPI User
  3994.    secret-key is "abracadabra".
  3995.  
  3996.    Note that even in the face of implementations with very poor random
  3997.    number generation yielding the same random numbers for both parties
  3998.    at every step, and with this completely identical configuration, the
  3999.    addition of the SPI User Verification field in the response
  4000.    calculation is highly likely to produce a different Verification
  4001.    value (see "Identity Verification").  In turn, the different
  4002.    Verification values affect the calculation of SPI session-keys that
  4003.    are highly likely to be different in each direction (see "Session-Key
  4004.    Computation").
  4005.  
  4006.  
  4007. B.3.  Multiple Identities With Group Secrets
  4008.  
  4009.    A more robust configuration approach could use a separate Identity
  4010.    and Secret for each party, distributed to the participants in the
  4011.    trusted group.  This might be appropriate for authenticated firewall
  4012.    traversal.
  4013.  
  4014.    An administrator has one or more networks, and a number of mobile
  4015.    users.  It is desirable to restrict access to authorized external
  4016.    users.  The example boundary router is 10.0.0.1.
  4017.  
  4018.    The administrator gives each user a different username and password,
  4019.    together with a group username and password for the router.
  4020.  
  4021.    The administrator configures (in part):
  4022.  
  4023.       identity local "199511@router.site" "FalDaRah"
  4024.       identity remote "Happy_Wanderer@router.site" "FalDaRee"
  4025.  
  4026.    Each mobile user adds commands to tunnel and authenticate.
  4027.  
  4028.       route addprivate 10.0.0.0/8 tunnel 10.0.0.1
  4029.       secure 10.0.0.1 authenticate-only
  4030.       identity local "Happy_Wanderer@router.site" "FalDaRee"
  4031.       identity remote "199511@router.site" "FalDaRah"
  4032.       identity remote "199512@router.site" "FalDaHaHaHaHaHaHa"
  4033.  
  4034.    When the mobile Initiator sends its Identity_Request, the SPI Owner
  4035.  
  4036.  
  4037.  
  4038. Karn & Simpson                Experimental                     [Page 68]
  4039.  
  4040. RFC 2522                   Photuris Protocol                  March 1999
  4041.  
  4042.  
  4043.    Identification field is "Happy_Wanderer@router.site" and the SPI
  4044.    Owner secret-key is "FalDaRee".
  4045.  
  4046.    When the firewall Responder sends its Identity_Response, the SPI
  4047.    Owner Identification field is "199511@router.site" and the SPI Owner
  4048.    secret-key is "FalDaRah".  The SPI User Identification field is
  4049.    "Happy_Wanderer@router.site" (taken from the request), and the SPI
  4050.    User secret-key is "FalDaRee".
  4051.  
  4052.    In this example, the mobile user is already prepared for a monthly
  4053.    password changeover, where the router might identify itself as
  4054.    "199512@router.site".
  4055.  
  4056.  
  4057. B.4.  Multiple Identities With Multiple Secrets
  4058.  
  4059.    Greater security might be achieved through configuration of a pair of
  4060.    secrets between each party.  As before, one secret is used for
  4061.    initial contact to any member of the group, but another secret is
  4062.    used between specific parties.  Compromise of one secret or pair of
  4063.    secrets does not affect any other member of the group.  This might be
  4064.    appropriate between the routers forming a boundary between
  4065.    cooperating Virtual Private Networks that establish local policy for
  4066.    each VPN member access.
  4067.  
  4068.    One administrator configures:
  4069.  
  4070.       identity local "Apple" "all for one"
  4071.       identity local "Apple-Baker" "Apple to Baker" "Baker"
  4072.       identity remote "Baker" "one for all"
  4073.       identity remote "Baker-Apple" "Baker to Apple"
  4074.  
  4075.    Another configures:
  4076.  
  4077.       identity local "Baker" "one for all"
  4078.       identity local "Baker-Apple" "Baker to Apple" "Apple"
  4079.       identity remote "Apple" "all for one"
  4080.       identity remote "Apple-Baker" "Apple to Baker"
  4081.  
  4082.    When the Initiator sends its Identity_Request, the SPI Owner
  4083.    Identification field is "Apple" and the SPI Owner secret-key is "all
  4084.    for one".
  4085.  
  4086.    When the Responder sends its Identity_Response, finding that the
  4087.    special pairing exists for "Apple" (in this example, indicated by a
  4088.    third field), the SPI Owner Identification field is "Baker-Apple" and
  4089.    the SPI Owner secret-key is "Baker to Apple".  The SPI User
  4090.    Identification is "Apple" (taken from the request), and the SPI User
  4091.  
  4092.  
  4093.  
  4094. Karn & Simpson                Experimental                     [Page 69]
  4095.  
  4096. RFC 2522                   Photuris Protocol                  March 1999
  4097.  
  4098.  
  4099.    secret-key is "all for one".
  4100.  
  4101.  
  4102. Operational Considerations
  4103.  
  4104.    The specification provides only a few configurable parameters, with
  4105.    defaults that should satisfy most situations.
  4106.  
  4107.    Retransmissions
  4108.       Default: 3.
  4109.  
  4110.    Initial Retransmission TimeOut (IRTO)
  4111.       Default: 5 seconds.
  4112.  
  4113.    Exchange TimeOut (ETO)
  4114.       Default: 30 seconds.  Minimum: Retransmissions * IRTO.
  4115.  
  4116.    Exchange LifeTime (ELT)
  4117.       Default: 30 minutes.  Minimum: 2 * ETO.
  4118.  
  4119.    SPI LifeTime (SPILT)
  4120.       Default: 5 minutes.  Minimum: 3 * ETO.
  4121.  
  4122.    Each party configures a list of known identities and symmetric
  4123.    secret-keys.
  4124.  
  4125.    In addition, each party configures local policy that determines what
  4126.    access (if any) is granted to the holder of a particular identity.
  4127.    For example, the party might allow anonymous FTP, but prohibit
  4128.    Telnet.  Such considerations are outside the scope of this document.
  4129.  
  4130.  
  4131. Security Considerations
  4132.  
  4133.    Photuris was based on currently available tools, by experienced
  4134.    network protocol designers with an interest in cryptography, rather
  4135.    than by cryptographers with an interest in network protocols.  This
  4136.    specification is intended to be readily implementable without
  4137.    requiring an extensive background in cryptology.
  4138.  
  4139.    Therefore, only minimal background cryptologic discussion and
  4140.    rationale is included in this document.  Although some review has
  4141.    been provided by the general cryptologic community, it is anticipated
  4142.    that design decisions and tradeoffs will be thoroughly analysed in
  4143.    subsequent dissertations and debated for many years to come.
  4144.  
  4145.    Cryptologic details are reserved for separate documents that may be
  4146.    more readily and timely updated with new analysis.
  4147.  
  4148.  
  4149.  
  4150. Karn & Simpson                Experimental                     [Page 70]
  4151.  
  4152. RFC 2522                   Photuris Protocol                  March 1999
  4153.  
  4154.  
  4155. History
  4156.  
  4157.    The initial specification of Photuris, now called version 1 (December
  4158.    1994 to March 1995), was based on a short list of design
  4159.    requirements, and simple experimental code by Phil Karn.  Only one
  4160.    modular exponentiation form was used, with a single byte index of
  4161.    pre-specified group parameters.  The transform attributes were
  4162.    selected during the public value exchange.  Party privacy was
  4163.    protected in the identification signature exchange with standard ESP
  4164.    transforms.
  4165.  
  4166.    Upon submission for review by the IP Security Working Group, a large
  4167.    number of features were demanded.  A mere 254 future group choices
  4168.    were not deemed enough; it was expanded to two bytes (and renamed
  4169.    schemes), and was expanded again to carry variable parameters.  The
  4170.    transform attributes were made variable length to accomodate optional
  4171.    parameters.  Every other possible parameter was made negotiable.
  4172.    Some participants were unable to switch modes on the UDP sockets to
  4173.    use standard ESP transforms for only some messages, and party privacy
  4174.    was integrated into the protocol.  The message headers were
  4175.    reorganized, and selection of transform attributes was delayed until
  4176.    the identification exchange.  An additional update message phase was
  4177.    added.
  4178.  
  4179.    Version 2 (July 1995 to December 1995) specification stability was
  4180.    achieved in November 1995 by moving most parameters into separate
  4181.    documents for later discussion, and leaving only a few mandatory
  4182.    features in the base specification.  Within a month, multiple
  4183.    interoperable implementations were produced.
  4184.  
  4185.    Unfortunately, in a fit of demagoguery, the IP Security Working Group
  4186.    decided in a straw poll to remove party privacy protection, and the
  4187.    Working Group chair terminated the meeting without allowing further
  4188.    discussion.  Because the identification exchange messages required
  4189.    privacy to function correctly, the messages were reorganized again.
  4190.    Party privacy and other optional schemes were split into a separate
  4191.    document.
  4192.  
  4193.    The implementors established a separate discussion group.  Version 3
  4194.    (April 1996 to June 1997) enjoyed a long period of specification
  4195.    stability and multiple implementations on half a dozen platforms.
  4196.  
  4197.    Meanwhile, the IP Security Working Group has developed a competing
  4198.    specification with large numbers of negotiable parameters.  Also, the
  4199.    PPP Extensions Working Group has deployed link security transforms.
  4200.  
  4201.    Version 4 (July 1997 onward) attempts to maintain a semblance of
  4202.    interface compatibility with these other efforts.  Minor changes are
  4203.  
  4204.  
  4205.  
  4206. Karn & Simpson                Experimental                     [Page 71]
  4207.  
  4208. RFC 2522                   Photuris Protocol                  March 1999
  4209.  
  4210.  
  4211.    specified in transform padding format and key generation.  More than
  4212.    one value is permitted per scheme, giving greater latitude in choice
  4213.    for future extensions.  The opportunity is taken to return party
  4214.    privacy to the base document, and make small semantic changes in
  4215.    automated updates and error recovery.  All ESP transform attributes
  4216.    are moved to separate documents, to (hopefully) avoid future
  4217.    incompatible changes to the base document.
  4218.  
  4219.  
  4220. Acknowledgements
  4221.  
  4222.       Thou shalt make no law restricting the size of integers that may
  4223.       be multiplied together, nor the number of times that an integer
  4224.       may be multiplied by itself, nor the modulus by which an integer
  4225.       may be reduced.  [Prime Commandment]
  4226.  
  4227.    Phil Karn was principally responsible for the design of the protocol
  4228.    phases, particularly the "cookie" anti-clogging defense, developed
  4229.    the initial testing implementation, and provided much of the design
  4230.    rationale text (now removed to a separate document).
  4231.  
  4232.    William Simpson was responsible for the packet formats and
  4233.    attributes, additional message types, editing and formatting.  All
  4234.    such mistakes are his responsibility.
  4235.  
  4236.    This protocol was later discovered to have many elements in common
  4237.    with the Station-To-Station authentication protocol [DOW92].
  4238.  
  4239.    Angelos Keromytis developed the first completely independent
  4240.    implementation (circa October 1995).  Also, he suggested the cookie
  4241.    exchange rate limitation counter.
  4242.  
  4243.    Paul C van Oorschot suggested signing both the public exponents and
  4244.    the shared-secret, to provide an authentication-only version of
  4245.    identity verification.  Also, he provided text regarding moduli,
  4246.    generator, and exponent selection (now removed to a separate
  4247.    document).
  4248.  
  4249.    Hilarie Orman suggested adding secret "nonces" to session-key
  4250.    generation for asymmetric public/private-key identity methods (now
  4251.    removed to a separate document), and provided extensive review of the
  4252.    protocol details.
  4253.  
  4254.    Bart Preneel and Paul C van Oorschot in [PO96] recommended padding
  4255.    between the data and trailing key when hashing for authentication.
  4256.  
  4257.    Niels Provos developed another independent implementation (circa May
  4258.    1997), ported to AIX, Linux, OpenBSD, and Solaris.  Also, he made
  4259.  
  4260.  
  4261.  
  4262. Karn & Simpson                Experimental                     [Page 72]
  4263.  
  4264. RFC 2522                   Photuris Protocol                  March 1999
  4265.  
  4266.  
  4267.    suggestions regarding automated update, and listing multiple moduli
  4268.    per scheme.
  4269.  
  4270.    Bill Sommerfeld suggested including the authentication symmetric
  4271.    secret-keys in the session-key generation, and using the Cookie
  4272.    values on successive exchanges to provide bi-directional user-
  4273.    oriented keying (now removed to a separate document).
  4274.  
  4275.    Oliver Spatscheck developed the second independent implementation
  4276.    (circa December 1995) for the Xkernel.
  4277.  
  4278.    International interoperability testing between early implementors
  4279.    provided the impetus for many of the implementation notes herein, and
  4280.    numerous refinements in the semantics of the protocol messages.
  4281.  
  4282.    Randall Atkinson, Steven Bellovin, Wataru Hamada, James Hughes, Brian
  4283.    LaMacchia, Cheryl Madson, Lewis McCarthy, Perry Metzger, Bob Quinn,
  4284.    Ron Rivest, Rich Schroeppel, and Norman Shulman provided useful
  4285.    critiques of earlier versions of this document.
  4286.  
  4287.    Special thanks to the Center for Information Technology Integration
  4288.    (CITI) for providing computing resources.
  4289.  
  4290.  
  4291. References
  4292.  
  4293.    [BGMW93]    E. Brickell, D. Gordon, K. McCurley, and D. Wilson, "Fast
  4294.                Exponentiation with Precomputation (Extended Abstract)",
  4295.                Advances in Cryptology -- Eurocrypt '92, Lecture Notes in
  4296.                Computer Science 658 (1993), Springer-Verlag, 200-207.
  4297.  
  4298.                Also U.S. Patent #5,299,262, E.F. Brickell, D.M. Gordon,
  4299.                K.S. McCurley, "Method for exponentiating in
  4300.                cryptographic systems", 29 Mar 1994.
  4301.  
  4302.    [DH76]      Diffie, W., and Hellman, H.E., "New Directions in
  4303.                Cryptography", IEEE Transactions on Information Theory, v
  4304.                IT-22 n 6 pp 644-654, November 1976.
  4305.  
  4306.    [DOW92]     Whitfield Diffie, Paul C van Oorshot, and Michael J
  4307.                Wiener, "Authentication and Authenticated Key Exchanges",
  4308.                Designs, Codes and Cryptography, v 2 pp 107-125, Kluwer
  4309.                Academic Publishers, 1992.
  4310.  
  4311.    [Firefly]   "Photuris" is the latin name for the firefly.  "Firefly"
  4312.                is in turn the name for the USA National Security
  4313.                Administration's (classified) key exchange protocol for
  4314.                the STU-III secure telephone.  Informed speculation has
  4315.  
  4316.  
  4317.  
  4318. Karn & Simpson                Experimental                     [Page 73]
  4319.  
  4320. RFC 2522                   Photuris Protocol                  March 1999
  4321.  
  4322.  
  4323.                it that Firefly is based on very similar design
  4324.                principles.
  4325.  
  4326.    [LL94]      Lim, C.H., Lee, P.J., "More flexible exponentiation with
  4327.                precomputation", Advances in Cryptology -- Crypto '94,
  4328.                Lecture Notes in Computer Science 839 (1994), Springer-
  4329.                Verlag, pages 95-107.
  4330.  
  4331.    [Prime Commandment]
  4332.                A derivation of an apocryphal quote from the usenet list
  4333.                sci.crypt.
  4334.  
  4335.    [PO96]      Bart Preneel, and Paul C van Oorshot, "On the security of
  4336.                two MAC algorithms", Advances in Cryptology -- Eurocrypt
  4337.                '96, Lecture Notes in Computer Science 1070 (May 1996),
  4338.                Springer-Verlag, pages 19-32.
  4339.  
  4340.    [RFC-768]   Postel, J., "User Datagram Protocol", STD 6,
  4341.                USC/Information Sciences Institute, August 1980.
  4342.  
  4343.    [RFC-791]   Postel, J., "Internet Protocol", STD 5, USC/Information
  4344.                Sciences Institute, September 1981.
  4345.  
  4346.    [RFC-1321]  Rivest, R., "The MD5 Message-Digest Algorithm", MIT
  4347.                Laboratory for Computer Science, April 1992.
  4348.  
  4349.    [RFC-1700]  Reynolds, J., and Postel, J., "Assigned Numbers", STD 2,
  4350.                USC/Information Sciences Institute, October 1994.
  4351.  
  4352.    [RFC-1812]  Baker, F., Editor, "Requirements for IP Version 4
  4353.                Routers", Cisco Systems, June 1995.
  4354.  
  4355.    [RFC-1828]  Metzger, P., Simpson, W., "IP Authentication using Keyed
  4356.                MD5", July 1995.
  4357.  
  4358.    [RFC-1829]  Karn, P., Metzger, P., Simpson, W., "The ESP DES-CBC
  4359.                Transform", July 1995.
  4360.  
  4361.    [RFC-2119]  Bradner, S., "Key words for use in RFCs to Indicate
  4362.                Requirement Levels", BCP 14, Harvard University, March
  4363.                1997.
  4364.  
  4365.    [RFC-2521]  Karn, P., and Simpson, W., "ICMP Security Failures
  4366.                Messages", March 1999.
  4367.  
  4368.    [Rooij94]   P. de Rooij, "Efficient exponentiation using
  4369.                precomputation and vector addition chains", Advances in
  4370.                Cryptology -- Eurocrypt '94, Lecture Notes in Computer
  4371.  
  4372.  
  4373.  
  4374. Karn & Simpson                Experimental                     [Page 74]
  4375.  
  4376. RFC 2522                   Photuris Protocol                  March 1999
  4377.  
  4378.  
  4379.                Science, Springer-Verlag, pages 403-415.
  4380.  
  4381.    [Schneier95]
  4382.                Schneier, B., "Applied Cryptography Second Edition", John
  4383.                Wiley & Sons, New York, NY, 1995.  ISBN 0-471-12845-7.
  4384.  
  4385.  
  4386.  
  4387. Contacts
  4388.  
  4389.    Comments about this document should be discussed on the
  4390.    photuris@adk.gr mailing list.
  4391.  
  4392.    Questions about this document can also be directed to:
  4393.  
  4394.       Phil Karn
  4395.       Qualcomm, Inc.
  4396.       6455 Lusk Blvd.
  4397.       San Diego, California  92121-2779
  4398.  
  4399.           karn@qualcomm.com
  4400.           karn@unix.ka9q.ampr.org (preferred)
  4401.  
  4402.  
  4403.       William Allen Simpson
  4404.       DayDreamer
  4405.       Computer Systems Consulting Services
  4406.       1384 Fontaine
  4407.       Madison Heights, Michigan  48071
  4408.  
  4409.           wsimpson@UMich.edu
  4410.           wsimpson@GreenDragon.com (preferred)
  4411.  
  4412.  
  4413.  
  4414.  
  4415.  
  4416.  
  4417.  
  4418.  
  4419.  
  4420.  
  4421.  
  4422.  
  4423.  
  4424.  
  4425.  
  4426.  
  4427.  
  4428.  
  4429.  
  4430. Karn & Simpson                Experimental                     [Page 75]
  4431.  
  4432. RFC 2522                   Photuris Protocol                  March 1999
  4433.  
  4434.  
  4435. Full Copyright Statement
  4436.  
  4437.    Copyright (C) The Internet Society (1999).  Copyright (C) Philip Karn
  4438.    and William Allen Simpson (1994-1999).  All Rights Reserved.
  4439.  
  4440.    This document and translations of it may be copied and furnished to
  4441.    others, and derivative works that comment on or otherwise explain it
  4442.    or assist in its implementation may be prepared, copied, published
  4443.    and distributed, in whole or in part, without restriction of any
  4444.    kind, provided that the above copyright notice and this paragraph are
  4445.    included on all such copies and derivative works.  However, this
  4446.    document itself may not be modified in any way, such as by removing
  4447.    the copyright notice or references to the Internet Society or other
  4448.    Internet organizations, except as needed for the purpose of
  4449.    developing Internet standards (in which case the procedures for
  4450.    copyrights defined in the Internet Standards process must be
  4451.    followed), or as required to translate it into languages other than
  4452.    English.
  4453.  
  4454.    The limited permissions granted above are perpetual and will not be
  4455.    revoked by the Internet Society or its successors or assigns.
  4456.  
  4457.    This document and the information contained herein is provided on an
  4458.    "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
  4459.    TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
  4460.    (BUT NOT LIMITED TO) ANY WARRANTY THAT THE USE OF THE INFORMATION
  4461.    HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
  4462.    MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
  4463.  
  4464.  
  4465.  
  4466.  
  4467.  
  4468.  
  4469.  
  4470.  
  4471.  
  4472.  
  4473.  
  4474.  
  4475.  
  4476.  
  4477.  
  4478.  
  4479.  
  4480.  
  4481.  
  4482.  
  4483.  
  4484.  
  4485.  
  4486. Karn & Simpson                Experimental                     [Page 76]
  4487.  
  4488.