[Docs] [txt|pdf] [Tracker] [Email] [Diff1] [Diff2] [Nits]

Versions: 10 11 12 13 14 15 16 17 18 RFC 2522

Network Working Group                                             P Karn
Internet Draft                                                  Qualcomm
                                                             W A Simpson
                                                              DayDreamer
expires in six months                                         April 1996


              The Photuris Session Key Management Protocol               -
                   draft-simpson-photuris-10.txt                         |


Status of this Memo

   Distribution of this memo is unlimited.                               -

   This document is an Internet-Draft.  Internet Drafts are working doc-
   uments of the Internet Engineering Task Force (IETF), its Areas, and
   its Working Groups.  Note that other groups may also distribute work-
   ing documents as Internet Drafts.

   Internet Drafts are draft documents valid for a maximum of six
   months, and may be updated, replaced, or obsoleted by other documents
   at any time.  It is not appropriate to use Internet Drafts as refer-
   ence material, or to cite them other than as a ``working draft'' or
   ``work in progress.''

   To learn the current status of any Internet-Draft, please check the
   ``1id-abstracts.txt'' listing contained in the internet-drafts Shadow
   Directories on:

      ftp.is.co.za (Africa)
      nic.nordu.net (Europe)
      ds.internic.net (US East Coast)
      ftp.isi.edu (US West Coast)
      munnari.oz.au (Pacific Rim)


Abstract

   Photuris is an experimental session-key management protocol intended
   for use with the IP Security Protocols (AH and ESP).

Applicability

   Photuris is intended for Internet nodes that frequently access or are
   accessed by a large and unpredicatable number of other nodes.  It
   features defense against resource clogging, perfect forward secrecy,  |
   and (optional) privacy protection of the exchange parties.



Karn & Simpson            expires in six months                 [Page i]


DRAFT                           Photuris                      April 1996


   Photuris is primarily used for creating virtual private networks,     +
   establishing sessions for mobile users and networks operating over
   bandwidth-limited links, and short-lived sessions between numerous    -
   clients and servers.                                                  +

   Photuris is extensible.  A wide variety of authentication, compres-   +
   sion, encryption, identification, and other operational types are     +
   supported.                                                            +

   Photuris is independent of any particular party identification method +
   or certificate format.  Support for symmetric key party identifica-   +
   tion is required to be implemented, and asymmetric key party identi-  +
   fication is optionally supported by extensions.






































Karn & Simpson            expires in six months                [Page ii]


DRAFT                           Photuris                      April 1996


1.  Introduction

   The ultimate goal of Internet Security is to facilitate direct IP
   connectivity between sensitive hosts and users across the Internet.
   Users will rely on Internet Security to protect the confidentiality
   of the traffic they send across the Internet and depend on it to
   block unauthorized external access to their internal hosts and net-
   works.

   Users must have confidence in every Internet Security component,
   including key management.  Without this confidence, users may erect
   barriers that impede legitimate use of the Internet, or forego the
   Internet entirely.

   Internet Security does not place any significance on easily forged IP
   Source addresses.  It relies instead on proof of possession of secret
   knowledge: that is, a cryptographic key.

   However, secure manual distribution and maintainance of these keys is
   often cumbersome and problematic.  User distribution often leads to
   long-lived keys, with concommitant opportunity for compromise of the
   keys.

   A fundamental role of this key management protocol is to verify the
   values exchanged, while ensuring that the resulting key is not known
   by another party.  It has been shown [DOW92] that key exchange must
   be coupled to authentication.  Each party requires assurance that an
   exchanged key is not shared with an imposter.

   Protecting sensitive data on the Internet against compromise --
   either by interception or by unauthorized access -- is necessary, but
   not sufficient.  The computing resources themselves must also be pro-
   tected against malicious attack or sabotage.

   With these criteria in mind, Photuris [Firefly] is designed:

   A. for frequent exchange of limited lifetime individual session-keys,
      with a minimum of configuration and effort.

   B. for associating security parameters with these session-keys.       |

   C. to support the use of a variety of authentication methods, and
      facilitate the exchange of many identification types.

   D. to thwart certain types of denial of service attacks on host
      resources.





Karn & Simpson            expires in six months                 [Page 1]


DRAFT                           Photuris                      April 1996


   E. to provide these services with minimal network activity, balanced  |
      with computational efficiency.                                     |

   This document is primarily intended for implementing the Photuris     |
   protocol.  It is not intended to detail service and application       |
   interface definitions, although it does mention some basic policy     |
   areas as required for the proper implementation and operation of the  |
   protocol mechanisms.


1.1.  Terminology


   exchange-value   The publically distributable value used to calculate
                    a shared-secret.  As used in this document, refers
                    to a Diffie-Hellman exchange, not the public part of |
                    a public/private key-pair.

   private-key      A value that is kept secret, and is part of an asym- |
                    metric public/private key-pair.

   public-key       A publically distributable value that is part of an  |
                    asymmetric public/private key-pair.

   secret-key       A symmetric key that is not publically dis-          |
                    tributable.  As used in this document, this is dis-  |
                    tinguished from an asymmetric public/private key-    |
                    pair.  An example is a user password.

   Security Association
                    A collection of parameters describing the security
                    relationship between two nodes.  These parameters
                    include the identities of the parties, the transform
                    (including algorithm and algorithm mode), the key(s)
                    (such as a session-key, secret-key, or appropriate
                    public/private key-pair), and possibly other infor-
                    mation such as sensitivity labelling.  For further
                    details, see [RFC-1825].

   Security Parameters Index (SPI)
                    A number that indicates the Security Association.
                    The number is relative to the IP Destination, which
                    is the SPI Owner.

   session-key      A key that is independently derived from a shared-
                    secret by the parties, and used for keying one
                    direction of traffic.  This key is changed fre-
                    quently.



Karn & Simpson            expires in six months                 [Page 2]


DRAFT                           Photuris                      April 1996


   shared-secret    As used in this document, the calculated result of
                    the Photuris exchange.

   SPI Owner        The party that corresponds to the IP Destination;    +
                    the receiver of the datagram.                        +

   SPI User         The party that corresponds to the IP Source; the     +
                    sender of the datagram.

   transform        A cryptographic manipulation of a particular set of
                    data.  As used in this document, refers to certain
                    well-specified methods (which are defined else-
                    where).  For example, AH-MD5 [RFC-1828] transforms   |
                    an IP datagram into a cryptographic hash, and ESP-
                    DES-CBC [RFC-1829] transforms plaintext to cipher-
                    text and back again.

   Implementors will find details of cryptographic hashing (such as
   MD5), encryption algorithms and modes (such as DES), digital signa-
   tures (such as DSS), and other algorithms in [Schneier95].


1.2.  Protocol Overview

   The Photuris protocol consists of several simple phases:

   1. A "Cookie" Exchange guards against simple flooding attacks sent    |
      with bogus IP Sources or UDP Ports.  Each party passes a "cookie"  |
      to the other.

      In addition, supported exchange-schemes are offered by the Respon- |
      der for calculating a shared-secret.

   2. A Value Exchange establishes a shared-secret between the parties.
      Each party passes an Exchange-Value to the other.  These values    +
      are used to establish a shared-secret between the parties.  The
      Responder remains stateless until a shared-secret has been cre-
      ated.

      In addition, supported attributes are offered by each party for    |
      use in establishing new Security Associations.

   3. An Identification Exchange identifies the parties to each other,
      and verifies the integrity of values sent in phases 1 and 2.

      In addition, the shared-secret provides a basis to generate sepa-  |
      rate Security Association session-keys in each direction, which
      are in turn used for conventional authentication or encryption.



Karn & Simpson            expires in six months                 [Page 3]


DRAFT                           Photuris                      April 1996


      Additional security attributes are also exchanged as needed.

      This exchange may also be encrypted for party privacy protection   |
      using an exchange session-key based on the shared-secret.  This    |
      protects the identities of the parties, hides the security parame- |
      ter values, and improves security for the exchange protocol and    |
      security transforms.

   4. Additional messages may be exchanged to periodically change the
      session-keys, and to establish new or revised security parameters.

      These exchanges may also be encrypted for party privacy protection |
      in the same fashion as above.

   The sequence of message types and their purposes are summarized in
   the diagram below.  The first three phases (cookie, exchange, and
   identification) must be carried out in their entirety before any
   security association can be used.

   Initiator                            Responder
   =========                            =========
   Cookie_Request                 ->
                                   <-   Cookie_Response
                                           offer schemes
   Value_Request                  ->
      pick scheme
      offer value
      offer attributes
                                   <-   Value_Response
                                           offer value
                                           offer attributes

             [generate shared-secret from exchanged values]


















Karn & Simpson            expires in six months                 [Page 4]


DRAFT                           Photuris                      April 1996


   Identity_Request               ->                                     |
      make SPI
      pick SPI attribute(s)
      identify self
      authenticate
      (make protection key)                                              |
      (encrypt message)                                                  |
                                   <-   Identity_Response                |
                                           make SPI
                                           pick SPI attribute(s)
                                           identify self
                                           authenticate
                                           (make protection key)         |
                                           (encrypt message)             |

               [make SPI session-keys in each direction]


   SPI User                             SPI Owner                        |
   ========                             =========                        |
   SPI_Needed                     ->                                     |
      list SPI attribute(s)                                              |
      make integrity key                                                 |
      authenticate                                                       |
      (encrypt message)                                                  |
                                   <-   SPI_Update                       |
                                           make SPI                      |
                                           pick SPI attribute(s)         |
                                           make SPI session-key(s)       |
                                           make integrity key            |
                                           authenticate                  |
                                           (encrypt message)             |

   Either party may initiate an exchange at any time.  For example, the
   Initiator need not be a "caller" in a telephony link.

   The Initiator is responsible for recovering from all message losses
   by retransmission.

   A Photuris exchange between two parties results in a pair of SPI val- |
   ues (one in each direction).  Each SPI is used in creating separate
   session-key(s) in each direction.

   When both parties initiate Photuris exchanges concurrently, or one
   party initiates more than one Photuris exchange, the Initiator Cook-
   ies (and UDP Ports) keep the exchanges separate.  This results in
   more than one initial SPI for each Destination.




Karn & Simpson            expires in six months                 [Page 5]


DRAFT                           Photuris                      April 1996


   To create multiple Security Associations with different parameters,   |
   the parties may also send SPI_Updates.

   There is no requirement that all such outstanding SPIs be used.  The
   SPI User (sender) selects an appropriate SPI for each datagram trans-
   mission.


1.3.  Clogging Defense

   To grant access to authorized users regardless of location, it must
   be possible to cheaply detect and discard bogus datagrams.  Other-
   wise, an attacker intent on sabotage might rapidly send datagrams to
   exhaust the host's CPU or memory resources.

   Using Internet Security authentication facilities, when a datagram
   does not pass an authentication check, it can be discarded without
   further processing.  This is easily done with manual (null) key man-
   agement between trusted hosts at relatively little cost, given the
   speed of cryptographic hashing functions compared to public-key algo-
   rithms.

   Unfortunately, such a trusted host will have only a fixed number of
   keys available.  The keys will tend to have long lifetimes.  This
   carries significant security risks.

   Automatic key management is necessary to generate keys between par-
   ties without prior arrangement.  But, there is a potential Achilles
   heel in the key management protocol.

   Because of their use of CPU-intensive operations such as modular
   exponentiation, key management schemes based on public-key cryptogra-
   phy are vulnerable to resource clogging attacks.  Although a complete
   defense against such attacks is impossible, Photuris features make
   them much more difficult.


1.3.1.  Cookie Exchange

   Photuris exchanges a pair of "cookies" based on the IP node addresses |
   before initiating any extensive computational operations.  This       |
   cookie exchange provides a weak form of message origin authentication |
   and verifies the presence of network communications between the par-  |
   ties, thwarting the saboteur from using random IP Source addresses.   |
   The simple validation of these cookies uses the same level of         |
   resources as other Internet Security authentication mechanisms.

   This forces the attacker to:



Karn & Simpson            expires in six months                 [Page 6]


DRAFT                           Photuris                      April 1996


   1) use its own valid IP address, or

   2) gain access to a physical transmission link and appropriate those
      addresses, or

   3) subvert Internet routing for the same purpose.

   The first option allows the target to detect and filter out such
   attacks, and significantly increases the likelihood of identifying
   the attacker.  The latter two options are much more difficult than
   merely sending large numbers of datagrams with randomly chosen IP
   Source addresses from an arbitrary point on the Internet.

   The cookie exchange does not protect against an observer that can     |
   copy a valid cookie, or an interceptor that can modify or substitute
   another cookie.  These attacks are mitigated somewhat with time-      |
   variant cookies.


1.3.2.  State Limitation

   There is a small amount of state associated with the Photuris
   exchange itself.  This includes the Cookies, Exchange-Values, and the
   computed shared-secret.

   During the initial Cookie Exchange, the Responder does not maintain
   any state for the exchange.  This prevents memory resource exhaustion
   from a simple flooding attack.

   Later exchange phases require saving of state to perform the key
   establishment calculations and identity verification.  An attacker
   that is willing to expose itself to a larger window of detection can  |
   waste substantial resources by repeating the steps of the Photuris    |
   process without using the results.                                    |

   The Responder combines time-variant cookies with a counter to limit   |
   the number of multiple concurrent Photuris exchanges with the same    |
   Internet nodes.  Initiators will not be issued additional cookies by  |
   the Responder until their previous exchanges have concluded or        |
   expired.  This combination also prevents an attack by hoarding valid  |
   cookies, and then flooding the Responder with a large number of con-  |
   current exchanges.









Karn & Simpson            expires in six months                 [Page 7]


DRAFT                           Photuris                      April 1996


1.3.3.  State Precomputation

   Prior to accepting Cookie_Requests, the Responder can precompute its  |
   Exchange-Value.  Successive requests from multiple Initiators will
   not require additional computation until the Identification Exchange. |

   Once Photuris exchange state has been established between nodes,      |
   repetitive exchanges can use many of the same previously computed
   values.  This prevents an attacker with more CPU power from easily
   exhausting the target.


1.3.4.  State Expiration

   During a Photuris exchange, the Responder Exchange TimeOut limits the |
   wait for the exchange to complete.  This includes the packet round    |
   trips, and the time for completing the Identification Exchange calcu- |
   lations.  The time is bounded by both the maximum amount of calcula-  |
   tion delay expected for the processing power of an unknown peer, and  |
   the minimum user expectation for results (default 60 seconds).        |

   In addition, all retained exchange state of both parties has an asso- |
   ciated Exchange LifeTime, and is subject to periodic expiration.      |
   This depends on the physical and logistical security of the machine,  |
   and is typically in the range of 10 minutes to one day (default 30    |
   minutes).

   When an Exchange-Value expires (or is replaced by a newer value), all |
   related exchange state is purged.  The periodic expiration and purge
   of exchange state reduces the risk of compromise of keys and secrets,
   and is an important consideration in attaining Perfect Forward        |
   Secrecy.

   If an attacker has succeeded in overwhelming a target, the target     |
   will eventually recover its resources as the expired state is purged. |

   Implementation Notes:

      These Exchange LifeTimes and TimeOuts are implementation dependent |
      and are not disclosed in any Photuris message.  The paranoid oper- +
      ator will have a fairly short Exchange LifeTime, but it MUST NOT   +
      be less than twice the Exchange TimeOut.

      To prevent synchronization between Photuris exchanges, the imple-
      mentation SHOULD randomly vary each Exchange LifeTime within twice
      the range of seconds that are required to calculate a new
      Exchange-Value.  For example, if the Responder uses a base
      Exchange LifeTime of 30 minutes, and takes 10 seconds to calculate



Karn & Simpson            expires in six months                 [Page 8]


DRAFT                           Photuris                      April 1996


      the new Exchange-Value, the equation might be (in milliseconds):   |

         1800000 + random(20000)                                         |

      The exchange-scheme, Exchange-Values, and resulting shared-secret  |
      MAY be cached in short-term storage for the Exchange LifeTime.     |
      When repetitive Photuris exchanges occur between the same parties, |
      and the Exchange-Values are discovered to be unchanged, the pre-   |
      computed shared-secret can be used to rapidly generate new ses-    |
      sion-keys.


1.4.  Perfect Forward Secrecy

   Many security breaches in cryptographic systems have been facilitated
   by designs that generate traffic-encrypting keys (or their equiva-
   lents) well before they are needed, and then keep them around longer
   than necessary.  This creates many opportunities for compromise,
   especially by insiders.  A carefully designed public-key system can
   avoid this problem.

   The rule is to avoid using any long-lived keys (such as a RSA public-
   private key-pair) to encrypt session-keys or actual traffic.  Such
   keys should be used solely for identification (entity authentication) |
   purposes.

   All keys for traffic encryption should be randomly generated immedi-
   ately before use, and then destroyed immediately after use, so that
   they cannot be recovered.  The keys should not be based on the values
   of any previous keys, or any other long-lived stored information.

   The Photuris exchange messages can provide perfect forward secrecy,
   as defined by Diffie [Diffie90].  When the calculated shared-secret
   is eventually destroyed, it is unrecoverable.

   Theft of the private/secret key used to sign the exchanges would
   allow the thief to impersonate the party in future conversations, but
   it would not decode any past traffic that might have been recorded.


1.5.  Security Parameters                                                -

   Photuris key management is used to determine a number of parameters
   for each Security Association between the communicating parties.
   This includes the particular authentication and/or encryption trans-
   forms, and the key(s) used to authenticate, encrypt or decrypt the
   payload.




Karn & Simpson            expires in six months                 [Page 9]


DRAFT                           Photuris                      April 1996


   The key management implementation usually maintains a table or list
   containing the several parameters for each concurrent Security Asso-
   ciation.  The implementation needs to access that security parameter
   table to determine how to process each datagram.  To indicate a par-
   ticular table entry, a Security Parameters Index (SPI) is used.

   The SPI is assigned by the entity controlling the IP Destination: the
   SPI Owner (the receiver).  The parties use the combination of SPI and
   IP Destination to distinguish the correct association.

   Each SPI has an associated LifeTime, specified by the SPI owner
   (receiver).  This SPI LifeTime is usually related to the speed of the
   link (typically 30 seconds to 30 minutes).

   The SPI can also be deleted by the SPI Owner using the SPI_Update.    |
   Once the SPI has expired or been deleted, the parties cease using the
   SPI.

   Implementation Notes:

      The method used for SPI assignment is implementation dependent.
      However, selection of a cryptographically random value can help
      prevent attacks that depend on a predicatable sequence of values.

      To prevent synchronization between Photuris exchanges, the imple-
      mentation SHOULD randomly vary each SPI LifeTime by a few seconds.

      To prevent resurrection of deleted or expired SPIs, implementa-
      tions SHOULD remember those SPIs, but mark them as unusable until
      the Photuris exchange shared-secret used to create them also
      expires and purges the associated state.

      When more than one unexpired SPI is available for the same func-
      tion, a common implementation technique is to select the SPI with
      the greatest remaining LifeTime.  However, selecting randomly
      among a large number of SPIs may provide some defense against
      traffic analysis.                                                  +

      When an implementation detects an incoming SPI that has recently   +
      expired, but the associated state has not yet been purged, the     +
      implementation MAY accept the SPI.  The length of time allowed is  +
      highly dependent on clock drift and variable packet round trip     +
      time, and is therefore implementation dependent.








Karn & Simpson            expires in six months                [Page 10]


DRAFT                           Photuris                      April 1996


1.6.  LifeTimes

   The Photuris exchange results in two kinds of state, each with sepa-
   rate LifeTimes.

   1) The Exchange LifeTime of the small amount of state associated with |
      the Photuris exchange itself.  This state may be viewed as between
      Internet nodes.

   2) The SPI LifeTimes of the multiple Security Associations that are   |
      established.  This state may be viewed as between users and nodes.

   The SPI LifeTimes may be shorter or longer than the Exchange Life-    |
   Time.  These LifeTimes are not required to be related to each other.

   When an Exchange-Value expires (or is replaced by a newer value), any |
   unexpired derived SPIs are not affected.  This is important to allow
   traffic to continue without interruption during new Photuris
   exchanges.


1.7.  Identification

   Every party requires its own Identification.  When the Photuris       |
   exchange is node to node, such as single user personal computers or
   unattended firewalls used in virtual private networks, the nodes
   themselves may be viewed as the users.

   When required for secure multi-user environments, the Iden-           |
   tity_Messages can be used to provide separate limited authentication
   from each user of one node when communicating with another common
   node.  To provide bi-directional user-oriented keying, the parties    |
   can initiate multiple concurrent Photuris exchanges.  These may pro-
   vide separate user Identification from the Initiator to the Responder
   in each direction.

   Each secure multi-user operating system MUST be capable of separately
   maintaining multiple Identification Exchange SPI values for each
   Value Exchange calculated shared-secret.  It is the responsibility of
   the Source to internally segregate the shared-secret and different
   session-keys provided per Destination, and select an appropriate SPI
   for each datagram transmission.









Karn & Simpson            expires in six months                [Page 11]


DRAFT                           Photuris                      April 1996


   Design Notes:

      Successful use of user-oriented keying requires a significant
      level of operating system support.  Use of multi-user segregated
      exchanges likely requires added functionality in the transport API
      of the implementation operating system.  Such mechanisms are out-
      side the scope of this document.

      It has been suggested that the Photuris exchange could also be
      established between particular application or transport processes
      associated with a user of a node.  Such mechanisms are emphati-
      cally outside the scope of this document.


1.8.  Multicast Support

   Key management is more difficult in a multicast environment.

   Senders to a multicast group may share common a Security Parameters
   Index, if all communications are using the same security configura-
   tion parameters.  In this case, the receiver only knows that the mes-
   sage came from a node knowing the SPI for the group, and cannot
   authenticate which member of the group sent the datagram.

   Multicast groups may also use a separate SPI value for each Source.
   If each sender is keyed separately and asymmetric algorithms are
   used, data origin authentication is also provided.

      A given Destination is not necessarily in control of the selection
      process.  In the case of multicast groups, a single node or coop-
      erating subset of the multicast group may work on behalf of the
      entire group to set up a Security Association.

   It is anticipated that Photuris would be used first to establish a
   distribution SPI and session-key, and that another orthogonal key
   distribution mechanism will use that SPI to send the group keys.
   This is a matter for future research.  Such mechanisms are outside    |
   the scope of this document.













Karn & Simpson            expires in six months                [Page 12]


DRAFT                           Photuris                      April 1996


2.  Protocol Details

   The Initiator begins a Photuris exchange under several circumstances: |

   -  The Initiator has a datagram that it wishes to send with privacy,
      and has no current Photuris exchange state with the IP Destina-
      tion.  This datagram is discarded, and a Cookie_Request is sent
      instead.

   -  The Initiator has received the ICMP message [RFC-1812] Destination |
      Unreachable: Communication Administratively Prohibited (Type 3,    |
      Code 13), and has no current Photuris exchange state with the ICMP |
      Source.                                                            |

   -  The Initiator has received the ICMP message [RFC-xxxx] Security
      Failures: Bad SPI (Type 40, Code 0), that matches current Photuris |
      exchange state with the ICMP Source.                               |

   -  The Initiator has received the ICMP message [RFC-xxxx] Security
      Failures: Need Authentication (Type 40, Code 4), and has no cur-   |
      rent Photuris exchange state with the ICMP Source.                 |

   -  The Initiator has received the ICMP message [RFC-xxxx] Security
      Failures: Need Authorization (Type 40, Code 5), that matches cur-  |
      rent Photuris exchange state with the ICMP Source.

   When the event is an ICMP message, special care MUST be taken that    |
   the ICMP message actually includes information that matches a previ-  |
   ously sent IP datagram.  Otherwise, this could provide an opportunity |
   for a clogging attack, by stimulating a new Photuris Exchange.


2.1.  UDP

   All Photuris messages use the User Datagram Protocol header
   [RFC-768].  The Initiator sends to UDP Destination Port 468.

   When replying to the Initiator, the Responder swaps the IP Source and
   Destination, and the UDP Source and Destination Ports.

   The UDP checksum MUST be correctly calculated when sent.  When a mes-
   sage is received with an incorrect UDP checksum, it is silently dis-
   carded.








Karn & Simpson            expires in six months                [Page 13]


DRAFT                           Photuris                      April 1996


   Implementation Note:

      It is expected that installation of Photuris will ensure that UDP  |
      checksum calculations are enabled for the computer operating sys-  |
      tem and later disabling by operators is prevented.


2.2.  Header Format

   All of the messages have a format similar to the following, as trans-
   mitted left to right in network order (most significant to least sig-
   nificant):

   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               |
   ~                       Initiator-Cookie                        ~
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               |
   ~                       Responder-Cookie                        ~
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Type      |
   +-+-+-+-+-+-+-+-+


   Initiator-Cookie 16 octets.

   Responder-Cookie 16 octets.

   Type             one octet.  Each message type has a unique value.
                    Initial values are assigned as follows:

                        0  Cookie_Request
                        1  Cookie_Response
                        2  Value_Request
                        3  Value_Response
                        4  Identity_Request
                        5  Secret_Response
                        6  Secret_Request
                        7  Identity_Response
                        8  SPI_Needed
                        9  SPI_Update
                       10  Bad_Cookie
                       11  Resource_Limit
                       12  Verification_Failure
                       13  (reserved)




Karn & Simpson            expires in six months                [Page 14]


DRAFT                           Photuris                      April 1996


   Further details and differences are elaborated in the individual mes-
   sages.

   Design Note:

      The fixed size of the cookies was chosen for convenience, based on
      the output of commonly available cryptographic hashing functions.
      It is anticipated that this size is likely to be more than suffi-
      cient to protect against very high bit-rate flooding attacks.


2.3.  Variable Precision Numbers

   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             Size              |             Value ...
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+


   Size             two, four, or eight octets.  The number of signifi-
                    cant bits used in the Value field.  Always transmit-
                    ted most significant octet first.

                    When the Size is zero, no Value field is present;
                    there are no significant bits.  This means "missing"
                    or "null".  It should not be confused with the value
                    zero, which includes an indication of the number of
                    significant bits.

                    When the most significant octet is in the range 0
                    through 254 (0xfe), the field is two octets.  Both
                    octets are used to indicate the size of the Value
                    field, which ranges from 1 to 65,279 significant
                    bits (in 1 to 8,160 octets).

                    When the most significant octet is 255 (0xff), the
                    field is four octets.  The remaining three octets
                    are added to 65,280 to indicate the size of the
                    Value field, which is limited to 16,776,959 signifi-
                    cant bits (in 2,097,120 octets).

                    When the most significant two octets are 65,535
                    (0xffff), the field is eight octets.  The remaining
                    six octets are added to 16,776,960 to indicate the
                    size of the Value field.  This is vastly too long
                    for these UDP messages, but is included for com-
                    pleteness.





Karn & Simpson            expires in six months                [Page 15]


DRAFT                           Photuris                      April 1996


   Value            Zero or more octets.  Always transmitted most sig-
                    nificant octet first.

                    The bits used are right justified within octet
                    boundaries; that is, any unused bits are in the most
                    significant octet.  Unused bits are zero filled.

   Shortened forms SHOULD NOT be used when the Value includes a number
   of leading zero significant bits.  The Size SHOULD indicate the cor-
   rect number of significant bits.

   Design Notes:

      Some of the message fields require a value that may vary in the    |
      number of bits.  These bits may not make up an integral number of
      octets.

      The numbers are assumed to be unsigned.

      The emphasis on significant bits was based on concerns that cryp-
      tographic lengths and strengths be readily determined.  This is in
      contrast to the usual concern that each number have only one
      unique (shortest) representation.                                  +

      When processing datagrams containing variable size values, the     +
      length must be checked against the overall datagram length.  An    +
      invalid size (too long or short) that causes a poorly coded        +
      receiver to abort could be used as a denial of service attack.


2.4.  Exchange Schemes

   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |            Scheme             |             Size              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |             Value ...
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+


   Scheme           two octets.  A unique value indicating the exchange-
                    scheme.  See the "Exchange Scheme List".             +

   Size             two octets, ranging from 0 to 65,279.  See variable
                    precision number.

   Value            Zero or more octets.  See variable precision number.





Karn & Simpson            expires in six months                [Page 16]


DRAFT                           Photuris                      April 1996


   Selection among several different exchange-schemes is needed to
   enable experimental and proprietary extensions without affecting the
   basic protocol.  The target of the exchange (Responder) specifies a
   list of the schemes supported, and the Initiator chooses one that it
   also supports.

   The scheme list includes alternative algorithms and distinguishing
   parameters.  These are mixed in the same list for simplicity.  The
   implementation can easily distinguish between the separate uses of
   each supported scheme.  These uses are indicated in the "Exchange
   Scheme List".

   Design Notes:

      Although exchange-schemes offer great flexibility, only a few
      well-chosen algorithms and parameters are specified.  This pro-
      vides opportunity for intensive review by the cryptographic commu-
      nity, reduces implementation complexity, and improves potential
      for interoperability.

      Only one exchange-scheme (#2) is required to be supported, and     |
      SHOULD be present in every Offered-Schemes list.


2.5.  Attributes

   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Type      |    Length     |  Value(s) ...
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+


   Type             one octet.  A unique value indicating the kind of
                    attribute.  See the "Attribute List" for details.    +

                    When the Type is zero (padding), no Length field is  |
                    present (always zero).

   Length           one octet.  The size of the Value(s) field in
                    octets.

                    When the Length is zero, no Value(s) field is pre-
                    sent.

   Value(s)         Zero or more octets.  See the "Attribute List" for   |
                    details.

   Selection among several different security parameter attributes is
   needed to enable future implementation changes without affecting the



Karn & Simpson            expires in six months                [Page 17]


DRAFT                           Photuris                      April 1996


   basic protocol.  Each party (the sender) offers a list of the
   attributes supported and its peer (the receiver) selects from that
   list when making its incoming Security Associations.

   The attribute list includes authentication, compression, encryption,
   identification, and other operational types available for exchange
   between the parties.  These are mixed in the same number space for
   simplicity.  The implementation can easily distinguish between the
   separate uses of each supported attribute.  See the "Attribute List"  |
   for details.                                                          |

   The Length MUST NOT be assumed to be constant for a particular Type.  |
   The same Type MAY be present in a list of attributes with varying     |
   Lengths.

   Design Notes:

      Although attributes offer great flexibility, only a few well-
      chosen algorithms are specified.  This provides opportunity for
      intensive review by the cryptographic community, reduces implemen-
      tation complexity, and improves potential for interoperability.

      The authentication, compression, encryption and identification
      mechanisms chosen, as well as the encapsulation modes (if any),
      need not be the same in both directions.                           +

      When processing datagrams containing variable length values, the   +
      length must be checked against the overall datagram length.  An    +
      invalid length (too long or short) that causes a poorly coded      +
      receiver to abort could be used as a denial of service attack.


2.5.1.  Authentication

   Authentication decisions are in the SPI Owner (receiver) direction.
   Only the receiver can determine that arriving traffic is authentic.

   Its need for authentication is indicated by choosing authentication
   attributes, and/or authenticated encryption attributes, when creating
   each SPI.  It enforces authentication through the simple expedient of |
   dropping all datagrams with missing or invalid authentication, and    |
   sending an appropriate ICMP Security Failures message [RFC-xxxx],
   such as Need Authentication (Type 40, Code 4) or Need Authorization
   (Type 40, Code 5).

   Support is required for the "MD5-KDP" and "Simple MD5-DP Verifica-    |
   tion" Attributes, and they SHOULD be present in every Offered-
   Attributes list.



Karn & Simpson            expires in six months                [Page 18]


DRAFT                           Photuris                      April 1996


   If the potential SPI Owner (receiver) has not created any authentica-
   tion SPIs although Photuris exchange state has been established, but
   it sends ICMP Security Failures messages, the prospective SPI User    |
   (sender) is unable to provide authentication for its datagrams.  When
   this situation occurs, the prospective SPI User SHOULD log the occu-  |
   rance, and notify an operator as appropriate.

   Design Notes:

      This feature is particularly important for deployment and scaling.
      It cannot be expected that the prospective SPI User will be omni-  |
      scient about the upgrade status and policy of potential receivers.
      Instead, the datagram receiver indicates its authentication needs. |

      The coupling of the ICMP message with the Cookie Exchange provides
      additional defense against clogging, at the expense of another
      round trip.


2.5.2.  Encapsulation

   Encapsulation decisions are in the SPI User (sender) direction.  Only
   the sender can determine whether each datagram needs privacy protec-
   tion.  It uses an encryption SPI created by the SPI Owner (receiver),
   in addition to an authentication SPI (as needed).

   Since SPI creation is by the receiver, but privacy (and potentially   |
   other) decisions are made in the sending direction, a message is
   needed to stimulate the SPI creation.  When the prospective SPI User
   (sender) needs privacy protection for a datagram and Photuris
   exchange state has been established, but has no current privacy       |
   encapsulation SPI from the potential SPI Owner (receiver), an         |
   SPI_Needed message is sent by the prospective SPI User, listing pri-  |
   vacy attributes that both parties have previously offered.  The orig-
   inal datagram is discarded.

   Support is required for the "DES-CBC" Attribute, and it SHOULD be
   present in every Offered-Attributes list.  Where encryption is pro-
   hibited in a particular environment, the "DES-CBC" Attribute MAY be
   omitted.

   If either party has not offered any encryption attributes, the
   prospective SPI User (sender) is unable to provide privacy for its    |
   datagrams.  When this situation occurs, the prospective SPI User      |
   SHOULD log the occurance, and notify an operator as appropriate.






Karn & Simpson            expires in six months                [Page 19]


DRAFT                           Photuris                      April 1996


   Implementation Notes:                                                 |

      Typically, an encryption method is chosen for the primary
      attribute of the initial SPI in each direction.

      If integrity is needed, and there is no existing separate SPI that
      offers authentication, it is recommended that an authentication
      method be included as a secondary attribute in the initial SPI.

      When both authentication and encryption attributes are used for
      the same SPI, care must be exercised that there is no interaction
      between the algorithms that might reveal some portion of the ses-
      sion-key(s).  There is no known interaction between MD5 and DES-
      CBC.


3.  Cookie Exchange

   Initiator                            Responder                        +
   =========                            =========                        +
   Cookie_Request                 ->                                     +
                                   <-   Cookie_Response                  +
                                           offer schemes                 +



3.0.1.  Send Cookie_Request

   The Initiator initializes local state, and generates a "cookie".  The |
   Initiator-Cookie MUST be different in each new Cookie_Request between |
   the same parties.  See "Cookie Generation" for details.               |

   By default, the Responder-Cookie and Counter are set to zero.         |

   If the new Cookie_Request is in response to a message from a previous |
   exchange in which this party was the Responder, the Responder-Cookie  |
   is set to the previous Initiator-Cookie, and the Counter is set to    |
   zero.                                                                 |

   Otherwise, the IP Destination for the Responder is examined.  If any  |
   previous exchange between the peer IP nodes has not expired, the      |
   Responder-Cookie is set to the most recent Responder-Cookie, and the  |
   request Counter is set to the corresponding Counter.

   The Initiator also starts a retransmission timer.  If no valid
   Cookie_Response arrives within the time limit, the same               |
   Cookie_Request is retransmitted for the remaining number of Retrans-  |
   missions.  The Initiator-Cookie value MUST be the same in each such   |



Karn & Simpson            expires in six months                [Page 20]


DRAFT                           Photuris                      April 1996


   retransmission to the same IP Destination and UDP Port.               |

   When Retransmissions have been exceeded, if a Bad_Cookie message has  |
   been received during the exchange, the Initiator SHOULD begin the     |
   Photuris exchange again by sending a new Cookie_Request.


3.0.2.  Receive Cookie_Request

   On receipt of a Cookie_Request, the Responder determines whether
   there are sufficient resources to begin another Photuris exchange.

   -  When too many SPI values are already in use for this particular
      peer, or too many concurrent exchanges are in progress, or some    +
      other resource limit is reached, a Resource_Limit message is sent. |

   -  When any previous exchange initiated by this particular peer has   |
      not exceeded the Exchange TimeOut, and the Responder-Cookie does   |
      not specify one of these previous exchanges, a Resource_Limit mes- |
      sage is sent.                                                      |

   Otherwise, the Responder returns a Cookie_Response.                   |

   Note that the Responder creates no additional state at this time.


3.0.3.  Send Cookie_Response

   The IP Source for the Initiator is examined.  If any previous         +
   exchange between the peer IP nodes has not expired, the response      +
   Counter is set to the most recent exchange Counter plus one (allowing +
   for out of order retransmissions).  Otherwise, the response Counter   +
   is set to the request Counter plus one.  If the new value is zero     +
   (modulo 256), the value is set to one.                                +

   The Responder generates a cookie.  The Responder-Cookie value in each |
   successive response SHOULD be different.  See "Cookie Generation" for |
   details.

   The exchange-schemes available between the peers are listed in the    |
   Offered-Schemes.










Karn & Simpson            expires in six months                [Page 21]


DRAFT                           Photuris                      April 1996


3.0.4.  Receive Cookie_Response

   The Initiator validates the Initiator-Cookie, and the Offered-        |
   Schemes.                                                              |

   -  Whenever an invalid/expired Initiator-Cookie is detected, the mes- |
      sage is silently discarded.                                        |

   -  Whenever the variable length Offered-Schemes do not match the UDP  |
      Length, or all Offered-Schemes are obviously defective and/or      |
      insufficient for the purposes intended, the message is silently    |
      discarded; the implementation SHOULD log the occurance, and notify |
      an operator as appropriate.                                        |

   -  Once a valid message has been received, later Cookie_Responses     |
      with matching Initiator-Cookies are also silently discarded, until
      a new Cookie_Request is sent.

   When the message is valid, an exchange-scheme is chosen from the list
   of Offered-Schemes.

   This Scheme-Choice may affect the next Photuris message sent.  By
   default, the next Photuris message is a Value_Request.

   Design Notes:

      Having the scheme chosen by the Initiator allows the greatest pro-
      tocol flexibility, and follows the requirement that no state be
      kept by the Responder until the shared-secret is calculated.
      Unfortunately, this allows the weakest scheme to be chosen by an
      attacker.

      This is no worse than the alternative: to have the Responder
      choose from weak schemes offered by the attacker.                  |

      Various proposals for extensions utilize the Scheme-Choice to
      indicate a different message sequence.  Such mechanisms are out-   |
      side the scope of this document.













Karn & Simpson            expires in six months                [Page 22]


DRAFT                           Photuris                      April 1996


3.1.  Cookie_Request

   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               |
   ~                       Initiator-Cookie                        ~
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               |
   ~                       Responder-Cookie                        ~
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Type      |     Counter     |                                   |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                                   |


   Initiator-Cookie 16 octets.  A randomized value that identifies the
                    exchange.  The value MUST NOT be zero.  See "Cookie  |
                    Generation" for details.

   Responder-Cookie 16 octets.  Identifies a specific previous exchange.
                    Copied from a previous Cookie_Response.              +

                    When zero, no previous exchange is specified.

                    When non-zero, and the Counter is zero, contains the +
                    Initiator-Cookie of a previous exchange.  The speci- |
                    fied party is requested to be the Responder in this  |
                    exchange, to retain previous party pairings.         |

                    When non-zero, and the Counter is also non-zero,     |
                    contains the Responder-Cookie of a previous          |
                    exchange.  The specified party is requested to be    |
                    the Responder in this exchange, to retain previous   |
                    party pairings.                                      |

                    Also, can be used for bidirectional User, Transport, |
                    and Process oriented keying.  Such mechanisms are    |
                    outside the scope of this document.

   Type             0

   Counter          one octet.  Indicates the number of the current      +
                    exchange.  Copied from a previous Cookie_Response.   +

                    When zero, no previous Responder is specified.






Karn & Simpson            expires in six months                [Page 23]


DRAFT                           Photuris                      April 1996


3.2.  Cookie_Response

   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               |
   ~                       Initiator-Cookie                        ~
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               |
   ~                       Responder-Cookie                        ~
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Type      |     Counter     |         Reserved            |     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  Offered-Schemes ...
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+


   Initiator-Cookie 16 octets.  Copied from the Cookie_Request.

   Responder-Cookie 16 octets.  A randomized value that identifies the
                    exchange.  The value MUST NOT be zero.  See "Cookie  |
                    Generation" for details.

   Type             1

   Counter          one octet.  Indicates the number of the current      +
                    exchange.  Must be greater than zero.

   Reserved         two octets.  For future use; MUST be set to zero     |
                    when transmitted, and MUST be ignored when received.

   Offered-Schemes  A list of one or more exchange-schemes supported by
                    the Responder, beginning with most preferred.

                    Each scheme is four or more octets (see "Exchange
                    Scheme List").  Only one of each kind of scheme may
                    be offered.  The end of the list is indicated by the
                    UDP Length.













Karn & Simpson            expires in six months                [Page 24]


DRAFT                           Photuris                      April 1996


3.3.  Cookie Generation

   The exact technique by which a Photuris party generates a cookie is
   implementation dependent.  The method chosen must satisfy some basic
   requirements:

   1. The cookie MUST depend on the specific parties.  This prevents an
      attacker from obtaining a cookie using a real IP address and UDP
      port, and then using it to swamp the victim with requests from
      randomly chosen IP addresses or ports.

   2. It MUST NOT be possible for anyone other than the issuing entity
      to generate cookies that will be accepted by that entity.  This
      implies that the issuing entity will use local secret information
      in the generation and subsequent verification of a cookie.  It
      must not be possible to deduce this secret information from any
      particular cookie.

   3. The cookie generation and verification methods MUST be fast to
      thwart attacks intended to sabotage CPU resources.

   A recommended technique is to use a cryptographic hashing function    |
   (such as MD5).                                                        |

   An incoming cookie can be verified at any time by regenerating it
   locally from values contained in the incoming datagram and the local  |
   secret random value.


3.3.1.  Initiator Cookie

   The Initiator secret value that affects its cookie SHOULD change for  |
   each new Photuris exchange, and is thereafter internally cached on a
   per Responder basis.  This provides improved synchronization and pro-
   tection against replay attacks.

   An alternative is to cache the cookie instead of the secret value.
   Incoming cookies can be compared directly without the computational
   cost of regeneration.                                                 +

   It is recommended that the cookie be calculated over the secret       +
   value, the IP Source and Destination addresses, and the UDP Source    +
   and Destination ports.








Karn & Simpson            expires in six months                [Page 25]


DRAFT                           Photuris                      April 1996


3.3.2.  Responder Cookie

   The Responder secret value that affects its cookies MAY remain the    |
   same for many different Initiators.  However, this secret SHOULD be   |
   changed periodically to limit the time for use of its cookies (typi-  |
   cally each 60 seconds), and MUST be changed whenever any precalcu-    |
   lated Responder Exchange-Value is changed.                            |

   The Responder-Cookie SHOULD include the Counter from the              |
   Cookie_Response.  This provides improved synchronization and protec-  |
   tion against replay attacks.

   It is recommended that the cookie be calculated over the secret       |
   value, the IP Source and Destination addresses, its own UDP Destina-  |
   tion port, the Counter, and the Initiator-Cookie.                     |

   On receipt of a Value_Request, the Responder regenerates its cookie
   for validation.  The cookie is not cached per Initiator to avoid sav-
   ing state during the initial Cookie Exchange.

   Once the Value_Response is sent, both Initiator and Responder cookies |
   are cached to identify the exchange.


4.  Value Exchange

   Initiator                            Responder                        +
   =========                            =========                        +
   Value_Request                  ->                                     +
      pick scheme                                                        +
      offer value                                                        +
      offer attributes                                                   +
                                   <-   Value_Response                   +
                                           offer value                   +
                                           offer attributes              +

             [generate shared-secret from exchanged values]              +



4.0.1.  Send Value_Request

   The Initiator generates an appropriate Exchange-Value for the Scheme- |
   Choice.  This Exchange-Value may be precalculated and used for multi- |
   ple Responders.

   The IP Destination for the Responder is examined, and the attributes  |
   available between the parties are listed in the Offered-Attributes.



Karn & Simpson            expires in six months                [Page 26]


DRAFT                           Photuris                      April 1996


   The Initiator also starts a retransmission timer.  If no valid        |
   Value_Response arrives within the time limit, the same Value_Request  |
   is retransmitted for the remaining number of Retransmissions.         |

   When Retransmissions have been exceeded, if a Bad_Cookie message has  |
   been received during the exchange, the Initiator SHOULD begin the     |
   Photuris exchange again by sending a new Cookie_Request.


4.0.2.  Receive Value_Request

   The Responder validates the Responder-Cookie, the Counter, the        |
   Scheme-Choice, the Exchange-Value, and the Offered-Attributes.        |

   -  Whenever an invalid/expired Responder-Cookie is detected, a        |
      Bad_Cookie message is sent.                                        |

   -  Whenever an invalid Scheme-Choice is detected, or the Exchange-    |
      Value is obviously defective, or the variable length Offered-      |
      Attributes do not match the UDP Length, the message is silently    |
      discarded; the implementation SHOULD log the occurance, and notify |
      an operator as appropriate.                                        |

   When the message is valid, the Responder sets its Exchange timer to   |
   the Exchange TimeOut, and returns a Value_Response.

   The Responder keeps a copy of the incoming Value_Request cookie pair, |
   and its Value_Response.  If a duplicate Value_Request is received, it
   merely resends its previous Value_Response, and takes no further
   action.


4.0.3.  Send Value_Response

   The Responder generates an appropriate Exchange-Value for the Scheme- |
   Choice.  This Exchange-Value may be precalculated and used for multi- |
   ple Initiators.

   The IP Source for the Initiator is examined, and the attributes       |
   available between the parties are listed in the Offered-Attributes.

   Implementation Notes:

      At this time, the Responder begins calculation of the shared-
      secret.  Calculation of the shared-secret is executed in parallel
      to minimize delay.

      This may take a substantial amount of time.  The implementor



Karn & Simpson            expires in six months                [Page 27]


DRAFT                           Photuris                      April 1996


      should ensure that retransmission is not blocked by this calcula-
      tion.  This is not usually a problem, as retransmission timeouts
      typically exceed calculation time.


4.0.4.  Receive Value_Response

   The Initiator validates the pair of Cookies, the Exchange-Value, and  |
   the Offered-Attributes.                                               |

   -  Whenever an invalid/expired cookie is detected, the message is     |
      silently discarded.                                                |

   -  Whenever the Exchange-Value is obviously defective, or the vari-   |
      able length Offered-Attributes do not match the UDP Length, the    |
      message is silently discarded; the implementation SHOULD log the   |
      occurance, and notify an operator as appropriate.                  |

   -  Once a valid message has been received, later Value_Responses with |
      both matching cookies are also silently discarded, until a new
      Cookie_Request is sent.

   When the message is valid, the Initiator begins its parallel computa-
   tion of the shared-secret.                                            +

   When the Initiator completes computation, it sends an Iden-           |
   tity_Request to the Responder.
























Karn & Simpson            expires in six months                [Page 28]


DRAFT                           Photuris                      April 1996


4.1.  Value_Request

   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               |
   ~                       Initiator-Cookie                        ~
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               |
   ~                       Responder-Cookie                        ~
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Type      |     Counter     |       Scheme-Choice         |     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               |
   ~                   Initiator-Exchange-Value                    ~
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  Initiator-Offered-Attributes ...
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-


   Initiator-Cookie 16 octets.  Copied from the Cookie_Response.

   Responder-Cookie 16 octets.  Copied from the Cookie_Response.

   Type             2

   Counter          one octet.  Copied from the Cookie_Response.         |

   Scheme-Choice    two octets.  A value selected by the Initiator from
                    the list of Offered-Schemes in the Cookie_Response.

                    Only the Scheme is specified; the size and value(s)
                    are implicit.

   Initiator-Exchange-Value
                    variable precision number.  Provided by the Initia-
                    tor for calculating a shared-secret between the par-
                    ties.  The Value format is indicated by the Scheme-  |
                    Choice.

                    The field may be any integral number of octets in
                    length, as indicated by its Size field.  It does not
                    require any particular alignment.  The 32-bit align-
                    ment shown is for convenience in the illustration.

   Initiator-Offered-Attributes
                    A list of Security Parameter attributes supported by



Karn & Simpson            expires in six months                [Page 29]


DRAFT                           Photuris                      April 1996


                    the Initiator.

                    The contents and usage of this list are further
                    described in "Offered Attributes List".  The end of
                    the list is indicated by the UDP Length.



4.2.  Value_Response

   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               |
   ~                       Initiator-Cookie                        ~
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               |
   ~                       Responder-Cookie                        ~
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Type      |                    Reserved                   |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               |
   ~                   Responder-Exchange-Value                    ~
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  Responder-Offered-Attributes ...
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-


   Initiator-Cookie 16 octets.  Copied from the Value_Request.

   Responder-Cookie 16 octets.  Copied from the Value_Request.

   Type             3

   Reserved         Three octets.  For future use; MUST be set to zero
                    when transmitted, and MUST be ignored when received.

   Responder-Exchange-Value
                    variable precision number.  Provided by the Respon-
                    der for calculating a shared-secret between the par-
                    ties.  The Value format is indicated by the current  |
                    Scheme-Choice as indicated by the Value_Request.

                    The field may be any integral number of octets in
                    length, as indicated by its Size field.  It does not
                    require any particular alignment.  The 32-bit align-
                    ment shown is for convenience in the illustration.



Karn & Simpson            expires in six months                [Page 30]


DRAFT                           Photuris                      April 1996


   Responder-Offered-Attributes
                    A list of Security Parameter attributes supported by
                    the Responder.

                    The contents and usage of this list are further
                    described in "Offered Attributes List".  The end of
                    the list is indicated by the UDP Length.



4.3.  Offered Attribute List

   This list includes those attributes supported by the party that are
   available to the other party.  The attribute formats are specified in
   the "Attribute List", where mandatory attributes are also specified.

   The list is composed of three sections: Identification-Attributes,    |
   Authentication-Attributes, and Encapsulation-Attributes.  Within each
   section, the attributes are listed from most to least preferable.

   The first section of the list includes methods of identification.  An |
   Identity-Choice is selected from this list.

   The second section of the list begins with "AH-Attributes" (#1).  It
   includes methods of authentication, and other operational types.

   The third section of the list begins with "ESP-Attributes" (#2).  It
   includes methods of compression, encryption, and other operational
   types.

   Attribute-Choices are selected from the latter two sections of the
   list.

   Implementation Notes:

      Since the offer is made by the prospective SPI User (sender),
      order of preference likely reflects the capabilities and engineer-
      ing tradeoffs of a particular implementation.

      However, the critical processing bottlenecks are frequently in the
      receiver.  The SPI Owner (receiver) may express its needs by
      choosing a less preferable attribute.

      The order may also be affected by operational policy and requested
      services for an application.  Such considerations are outside the
      scope of this document.





Karn & Simpson            expires in six months                [Page 31]


DRAFT                           Photuris                      April 1996


5.  Identification Exchange

   Initiator                            Responder                        |
   =========                            =========                        |
   Identity_Request               ->                                     |
      make SPI                                                           |
      pick SPI attribute(s)                                              |
      identify self                                                      |
      authenticate                                                       |
      (make protection key)                                              |
      (encrypt message)                                                  |
                                   <-   Identity_Response                |
                                           make SPI                      |
                                           pick SPI attribute(s)         |
                                           identify self                 |
                                           authenticate                  |
                                           (make protection key)         |
                                           (encrypt message)             |

               [make SPI session-keys in each direction]                 |

   The exchange of messages is ordered, although the formats and mean-   |
   ings of the messages are identical in each direction.  The messages   |
   are easily distinguished by the parties themselves, by examining the  |
   Type and Identification fields.

   Implementation Notes:                                                 |

      The amount of time for the calculation may be dependent on the
      value of particular bits in secret values used in generating the
      shared-secret or identity verification.  To prevent analysis of
      these secret bits by recording the time for calculation, sending   |
      of the Identity_Messages SHOULD be delayed until the time expected
      for the longest calculation.  This will be different for different |
      processor speeds, different algorithms, and different length vari- |
      ables.  Therefore, the method for estimating time is implementa-   |
      tion dependent.

      Any authenticated and/or encrypted user datagrams received before  -
      the completion of identity verification can be placed on a queue
      pending completion of this step.  If verification succeeds, the
      queue is processed as though the datagrams had arrived subsequent
      to the verification.  If verification fails, the queue is dis-
      carded.







Karn & Simpson            expires in six months                [Page 32]


DRAFT                           Photuris                      April 1996


5.0.1.  Send Identity_Request

   The Initiator chooses an appropriate Identification, an SPI and SPI   +
   LifeTime, a set of Attributes for the SPI, calculates the Verifica-   +
   tion, and optionally encrypts the message for party privacy protec-   +
   tion (when a Privacy-Method is indicated by the Scheme-Choice).

   The Initiator also starts a retransmission timer.  If no valid Iden-  |
   tity_Response arrives within the time limit, its previous Iden-       |
   tity_Request is retransmitted for the remaining number of Retransmis- |
   sions.

   When Retransmissions have been exceeded, if a Bad_Cookie message has  |
   been received during the exchange, the Initiator SHOULD begin the     |
   Photuris exchange again by sending a new Cookie_Request.


5.0.2.  Receive Identity_Request

   The Responder validates the pair of Cookies, the Identification, the  +
   Verification, and the Attribute-Choices.                              +

   -  Whenever an invalid/expired cookie is detected, a Bad_Cookie mes-  +
      sage is sent.                                                      +

   -  Whenever an invalid Identification is detected, or the message     +
      verification fails, a Verification_Failure message is sent.        +

   -  Whenever the variable length Attribute-Choices do not match the    +
      UDP Length, or the attributes are not a subset of those in the     +
      Offered-Attributes, the message is silently discarded.             +

   -  Whenever such a problem is detected, the Security Association is   +
      not established; the implementation SHOULD log the occurance, and  +
      notify an operator as appropriate.                                 +

   When the message is valid, the Responder sets its Exchange timer to   +
   the Exchange LifeTime (if this has not already been done for a previ- +
   ous exchange).  When its parallel computation of the shared-secret is +
   complete, the Responder returns an Identity_Response.                 +

   The Responder keeps a copy of the incoming Identity_Request values,   +
   and its Identity_Response.  If a duplicate Identity_Request is        +
   received, it merely resends its previous Identity_Response, and takes +
   no further action.






Karn & Simpson            expires in six months                [Page 33]


DRAFT                           Photuris                      April 1996


5.0.3.  Send Identity_Response

   The Responder chooses an appropriate Identification, an SPI and SPI   |
   LifeTime, a set of Attributes for the SPI, calculates the Verifica-   |
   tion, and optionally encrypts the message for party privacy protec-   |
   tion (when a Privacy-Method is indicated by the Scheme-Choice).       |

   The Responder calculates the SPI session-keys in both directions.     |

   The Responder sets its Update timer to half the value of its SPI      |
   LifeTime.  If no new Photuris exchange occurs within the time limit,  |
   and the Exchange timer has not expired, an SPI_Update is sent to cre- |
   ate another SPI.                                                      |

   At this time, the Responder begins the authentication and/or encryp-  |
   tion of user datagrams.                                               |


5.0.4.  Receive Identity_Response                                        |

   The Initiator validates the pair of Cookies, the Identification, the  |
   Verification, and the Attribute-Choices.                              |

   -  Whenever an invalid/expired cookie is detected, the message is     |
      silently discarded.                                                |

   -  Whenever an invalid Identification is detected, or the message     |
      verification fails, a Verification_Failure message is sent.        |

   -  Whenever the variable length Attribute-Choices do not match the    |
      UDP Length, or the attributes are not a subset of those in the     |
      Offered-Attributes, the message is silently discarded.             |

   -  Whenever such a problem is detected, the Security Association is   |
      not established; the implementation SHOULD log the occurance, and  |
      notify an operator as appropriate.                                 |

   -  Once a valid message has been received, later Identity_Responses   |
      with both matching cookies are also silently discarded, until a    |
      new Cookie_Request is sent.                                        |

   When the message is valid, the Initiator sets its Exchange timer to   |
   the Exchange LifeTime (if this has not already been done for a previ- |
   ous exchange).                                                        |

   The Initiator calculates the SPI session-keys in both directions.     |

   The Initiator sets its Update timer to half the value of its SPI      |



Karn & Simpson            expires in six months                [Page 34]


DRAFT                           Photuris                      April 1996


   LifeTime.  If no new Photuris exchange occurs within the time limit,  |
   and the Exchange timer has not expired, an SPI_Update is sent to cre- |
   ate another SPI.                                                      |

   At this time, the Initiator begins the authentication and/or encryp-  |
   tion of user datagrams.                                               |


5.1.  Identity_Messages                                                  |

   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               |
   ~                       Initiator-Cookie                        ~
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               |
   ~                       Responder-Cookie                        ~
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Type      |                    LifeTime                   |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                   Security-Parameter-Index                    |
   +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
   |        Identity-Choice        |                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               +
   |                                                               |
   ~                        Identification                         ~
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               |
   ~                         Verification                          ~
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  Attribute-Choices ...
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
                             ... Padding           |  Pad Length   |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+


   Initiator-Cookie 16 octets.  Copied from the Value_Request.

   Responder-Cookie 16 octets.  Copied from the Value_Request.

   Type             4 (Request) or 7 (Response)                          |

   LifeTime         three octets.  The number of seconds remaining
                    before the indicated SPI expires.  Must be greater
                    than zero.



Karn & Simpson            expires in six months                [Page 35]


DRAFT                           Photuris                      April 1996


   Security-Parameter-Index
                    four octets.  The SPI to be used for incoming commu-
                    nications.

                    When zero, indicates that no SPI is created in this
                    direction.

   Identity-Choice  An identity attribute is selected from the list of
                    Offered-Attributes sent by the peer, and is used to
                    calculate the Verification.

                    The field may be any integral number of octets in
                    length, as indicated by its Length field.  It does
                    not require any particular alignment.  The 16-bit
                    alignment shown is for convenience in the illustra-
                    tion.

   Identification   variable precision number, or alternative format     |
                    indicated by the Identity-Choice.  See the           |
                    "Attribute List" for details.

                    The field may be any integral number of octets in
                    length.  It does not require any particular align-
                    ment.  The 32-bit alignment shown is for convenience
                    in the illustration.

   Verification     variable precision number, or alternative format     |
                    indicated by the Identity-Choice.  The calculation   |
                    of the value is described in "Identity Verifica-     |
                    tion".

                    The field may be any integral number of octets in    |
                    length.  It does not require any particular align-
                    ment.  The 32-bit alignment shown is for convenience
                    in the illustration.

   Attribute-Choices
                    Zero or more octets.  A list of attributes for this
                    (non-zero) SPI, selected from the list of Offered-
                    Attributes supported by the peer.

                    The contents and usage of this list are further
                    described in "Attribute Choices List".  The end of
                    the list is indicated by the UDP Length after remov- |
                    ing the Pad Length and Padding fields (UDP Length -  |
                    Pad Length - 1).





Karn & Simpson            expires in six months                [Page 36]


DRAFT                           Photuris                      April 1996


   Padding          Zero or more octets.  Prior to (optional) encryp-    |
                    tion, it is filled to align the Pad Length field at  |
                    a boundary appropriate to the Privacy-Method indi-   |
                    cated by the current Scheme-Choice.  The padding     |
                    values begin with the value 0, and count up to the   |
                    number of padding octets.  For example, if the Pad   |
                    Length is 5, the padding values are 0, 1, 2, 3, 4.

                    After (optional) decryption, if the padding octets   |
                    are not the correct values for the Pad Length, then  |
                    verification fails.

   Pad Length       one octet.  The size of the Padding field in octets  |
                    (not including the Pad Length field).  The value
                    typically ranges from 0 to 7, but may be up to 255
                    to permit hiding of the actual data length.

                    This field is always present, even when no Padding   |
                    is required.                                         |

   The portion of the message after the SPI MAY be encrypted for party   |
   privacy protection.  Such mechanisms are outside the scope of this    |
   document.

   The fields following the SPI are opaque.  That is, the values are set |
   prior to (optional) encryption, and examined only after (optional)    |
   decryption.


5.2.  Attribute Choices List

   This list specifies the attributes of a Security Association.  The    |
   attribute formats are specified in the "Attribute List".

   The list is composed of one or two sections: Authentication-          |
   Attributes, and/or Encapsulation-Attributes.

   When sending from the SPI User to the SPI Owner, the attributes are
   processed in the order listed.  For example,

      "ESP-Attributes",                                                  |
      "DES-CBC",                                                         |
      "AH-Attributes",                                                   |
      "MD5-KDP",                                                         |

   would result in ESP with encryption, and then AH authentication of    |
   the ESP payload.




Karn & Simpson            expires in six months                [Page 37]


DRAFT                           Photuris                      April 1996


   The SPI Owner will naturally process the datagram in the reverse
   order.

   This ordering also affects the order of key generation.  Both SPI     +
   Owner and SPI User generate the keys in the order listed.             +

   Implementation Notes:

      When choices are made from the list of Offered-Attributes, it is
      not required that any Security Association include every kind of
      offered attribute in any single SPI, or that a separate SPI be
      created for every offered attribute.

      Some analysts have recommended that the AH should always be out-
      side the ESP.  This is a matter for future research.

      Some kinds of attributes may be included more than once in a sin-  +
      gle SPI.  The set of allowable combinations of attributes are
      dependent on implementation and operational policy.  Such consid-
      erations are outside the scope of this document.


5.3.  Shared-Secret

   The shared-secret is used in a number of calculations.  Regardless of
   the internal representation of the shared-secret, when used in calcu-
   lations it is in the same form as the Value part of a Variable Preci-
   sion Number:

    - most significant octet first.                                      |
    - bits used are right justified within octet boundaries.             |
    - any unused bits are in the most significant octet.                 |
    - unused bits are zero filled.                                       |



5.4.  Identity Verification

   This message is authenticated using the Identity-Choice.  The Verifi- |
   cation value is calculated prior to (optional) encryption, and veri-  |
   fied after (optional) decryption.

   The Identity-Choice authentication function is supplied with two      |
   input values:

    - the computed shared-secret.                                        |
    - the data to be verified (as a concatenated sequence of octets).    |




Karn & Simpson            expires in six months                [Page 38]


DRAFT                           Photuris                      April 1996


   The resulting output value is stored in the Verification field.       |

   The Identity-Choice authentication function is calculated over the    |
   following concatenated data values:

    + the Initiator Cookie,                                              |
    + the Responder Cookie,                                              |
    + the Responder Offered-Schemes,                                     |
    + the SPI Owner Exchange-Value,                                      |
    + the SPI Owner Offered-Attributes,                                  |
    + the SPI Owner Identification,                                      |
    + the SPI Owner secret-key,                                          |
    + the SPI User Exchange-Value,                                       |
    + the SPI User Offered-Attributes,                                   |
    + the SPI User Identification (when known),                          |
    + the SPI User secret-key (when known),                              |
    + the message Type, LifeTime and SPI fields,                         |
    + the Attribute-Choices following the Verification field,
    + the Padding (if any),                                              |
    + the Pad Length.                                                    |

   Note that the order of the Exchange-Value and Offered-Attribute
   fields is different in each direction.  The Identification and SPI    |
   fields are also likely to be different in each direction.  Note also  +
   that the SPI User Identification and secret-key will be omitted in    +
   the Identity_Request.                                                 +

   If the verification fails, the users are notified, and a Verifica-    +
   tion_Failure message is sent, without adding any Security Associa-    +
   tions.  On success, normal operation begins with the authentication   +
   and/or encryption of user datagrams.

   Implementation Notes:

      This is separate from any authentication method specified for      |
      Security Associations.                                             |

      The exact details of the Identification and secret-keys that are   |
      included in the Verification calculation are dependent on the      |
      Identity-Choice, as described in the "Attribute List".

      Each party may wish to keep their own trusted databases, such as
      the Pretty Good Privacy (PGP) web of trust, and accept only those
      identities found there.  Failure to find the Identification in
      either an internal or external database results in the same Veri-  |
      fication_Failure message as failure of the verification computa-
      tion.




Karn & Simpson            expires in six months                [Page 39]


DRAFT                           Photuris                      April 1996


      The hash of the Exchange-Value includes both the Size and Value    -
      fields.  The hash of the Offered-Attributes and Attribute-Choices
      includes the Type, Length and Value fields.


5.5.  Session-Key Computation

   Each Security Association SPI has one or more session-keys.  These
   keys are generated based on the attributes of the Security Associa-
   tion.  See the "Attribute List" for details.

   The Attribute-Choice specified key generation cryptographic hash is   |
   used to create an SPI session-key for that particular attribute.
   This hash is calculated over the following concatenated values:

    + the Initiator Cookie,                                              -
    + the Responder Cookie,
    + the SPI Owner secret-key,                                          |
    + the SPI User secret-key,                                           |
    + the message Verification field,                                    |
    + the computed shared-secret.                                        |

   Since the message Verification field is likely to be different in     |
   each direction, and the order of the secret-keys is different in each
   direction, the resulting session-key will usually be different in     -
   each direction.

   When a larger number of keying-bits are needed than are available     +
   from the specified cryptographic hash, these keying-bits are gener-   +
   ated by duplicating the trailing shared-secret, and recalculating the +
   hash.  That is, the first hash will have one trailing copy of the     +
   shared-secret, the second hash will have two trailing copies of the   +
   shared-secret, and so forth.                                          +

   Implementation Notes:

      Inclusion of the Verification field (dependent on the SPI),        |
      together with the party secret-keys, allows reuse of the same
      Exchange-Values and resulting shared-secret among several parties
      and multiple users of the same node without generating the same
      session-keys.

      The exact details of the Verification field and secret-keys that   +
      are included in the session-key calculation are dependent on the   +
      Identity-Choices, as described in the "Attribute List".            +

      To avoid keeping the secret-keys in memory after the initial veri- +
      fication, it is often possible to precompute the hash of the       +



Karn & Simpson            expires in six months                [Page 40]


DRAFT                           Photuris                      April 1996


      initial octets of the concatenated data values for each direction. +

      When both authentication and encryption attributes are used for
      the same SPI, there may be multiple session-keys associated with   -
      the same SPI.  These session-keys are generated in the order of    +
      the Attribute-Choices list.                                        +


6.  SPI Messages                                                         +

   SPI User                             SPI Owner                        +
   ========                             =========                        +
   SPI_Needed                     ->                                     +
      list SPI attribute(s)                                              +
      make integrity key                                                 +
      authenticate                                                       +
      (encrypt message)                                                  +
                                   <-   SPI_Update                       +
                                           make SPI                      +
                                           pick SPI attribute(s)         +
                                           make SPI session-key(s)       +
                                           make integrity key            +
                                           authenticate                  +
                                           (encrypt message)             +

   The exchange of messages is not related to the Initiator and Respon-  +
   der.  Instead, either party may send one of these messages at any     +
   time.  The messages are easily distinguished by the parties.          +


6.0.1.  Send SPI_Needed                                                  +

   At any time after completion of the Identification Exchange, either   +
   party can send an SPI_Needed.  This message is sent when a prospec-   +
   tive SPI User needs particular attributes for a datagram (such as     +
   privacy protection), and no current SPI has those attributes.

   The prospective SPI User selects from the intersection of attributes  |
   that both parties have previously offered, calculates the Verifica-   |
   tion, and optionally encrypts the message for party privacy protec-   |
   tion (when a Privacy-Method is indicated by the Scheme-Choice).       |










Karn & Simpson            expires in six months                [Page 41]


DRAFT                           Photuris                      April 1996


6.0.2.  Receive SPI_Needed                                               |

   The potential SPI Owner validates the pair of Cookies, the Verifica-  |
   tion, and the Attributes-Needed.                                      |

   -  Whenever an invalid/expired cookie is detected, a Bad_Cookie mes-  |
      sage is sent.                                                      |

   -  Whenever the message verification fails, a Verification_Failure    |
      message is sent.                                                   |

   -  Whenever the variable length Attributes-Needed do not match the    |
      UDP Length, or the attributes are not a subset of those in the     |
      Offered-Attributes, the message is silently discarded.             |

   -  Whenever such a problem is detected, the Security Association is   |
      not established; the implementation SHOULD log the occurance, and  |
      notify an operator as appropriate.                                 |

   When the message is valid, the party SHOULD send an SPI_Update that   |
   includes the necessary attributes.


6.0.3.  Send SPI_Update

   At any time after completion of the Identification Exchange, either   +
   party can send an SPI_Update.  This message has effect in only one    +
   direction, from the SPI Owner to the SPI User.                        +

   The SPI Owner chooses an SPI and SPI LifeTime, a set of Attributes    +
   for the SPI, calculates the Verification, and optionally encrypts the +
   message for party privacy protection (when a Privacy-Method is indi-  +
   cated by the Scheme-Choice).


6.0.4.  Receive SPI_Update

   The prospective SPI User validates the pair of Cookies, the Verifica- |
   tion, and the Attributes-Needed.                                      |

   -  Whenever an invalid/expired cookie is detected, a Bad_Cookie mes-  |
      sage is sent.                                                      |

   -  Whenever the message verification fails, a Verification_Failure    |
      message is sent.                                                   |

   -  Whenever the variable length Attribute-Choices do not match the    |
      UDP Length, or the attributes are not a subset of those in the     |



Karn & Simpson            expires in six months                [Page 42]


DRAFT                           Photuris                      April 1996


      Offered-Attributes, the message is silently discarded.             |

   -  Whenever such a problem is detected, the Security Association is   |
      not established; the implementation SHOULD log the occurance, and  |
      notify an operator as appropriate.                                 |

   When the message is valid, further actions are dependent on the value |
   of the SPI LifeTime field, as described later.


6.1.  SPI_Needed

   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+     |
   |                                                               |     |
   ~                       Initiator-Cookie                        ~     |
   |                                                               |     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+     |
   |                                                               |     |
   ~                       Responder-Cookie                        ~     |
   |                                                               |     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+     |
   |     Type      |                    Reserved                   |     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+     |
   |                           Reserved                            |     |
   +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+     |
   |                                                               |     |
   ~                         Verification                          ~     |
   |                                                               |     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+     |
   |  Attributes-Needed ...                                              |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+     |
                             ... Padding           |  Pad Length   |     |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+     |


   Initiator-Cookie 16 octets.  Copied from the Value_Request.           |

   Responder-Cookie 16 octets.  Copied from the Value_Request.           |

   Type             8                                                    |

   Reserved         seven octets.  For future use; MUST be set to zero   |
                    when transmitted, and MUST be ignored when received. |

   Verification     variable precision number, or other format indicated |
                    by the Scheme-Choice.  The calculation of the value  |
                    is described in "Validity Verification".             |




Karn & Simpson            expires in six months                [Page 43]


DRAFT                           Photuris                      April 1996


                    The field may be any integral number of octets in    |
                    length.  It does not require any particular align-   |
                    ment.  The 32-bit alignment shown is for convenience |
                    in the illustration.                                 |

   Attributes-Needed                                                     |
                    Four or more octets.  A list of two or more          |
                    attributes, selected from the list of Offered-       |
                    Attributes supported by the peer.                    |

                    The contents and usage of this list are as previ-    |
                    ously described in "Attribute Choices List".  The    |
                    end of the list is indicated by the UDP Length after |
                    removing the Pad Length and Padding fields (UDP      |
                    Length - Pad Length - 1).                            |

   Padding          Zero or more octets.  Prior to (optional) encryp-    |
                    tion, it is filled to align the Pad Length field at  |
                    a boundary appropriate to the Privacy-Method indi-   |
                    cated by the current Scheme-Choice.  The padding     |
                    values begin with the value 0, and count up to the   |
                    number of padding octets.  For example, if the Pad   |
                    Length is 5, the padding values are 0, 1, 2, 3, 4.   |

                    After (optional) decryption, if the padding octets   |
                    are not the correct values for the Pad Length, then  |
                    verification fails.                                  |

   Pad Length       one octet.  The size of the Padding field in octets  |
                    (not including the Pad Length field).  The value     |
                    typically ranges from 0 to 7, but may be up to 255   |
                    to permit hiding of the actual data length.          |

                    This field is always present, even when no Padding   |
                    is required.                                         |

   The portion of the message after the SPI MAY be encrypted for party   |
   privacy protection, in the same fashion specified for Iden-           |
   tity_Messages.                                                        |

   The fields following the SPI are opaque.  That is, the values are set |
   prior to (optional) encryption, and examined only after (optional)    |
   decryption.                                                           |








Karn & Simpson            expires in six months                [Page 44]


DRAFT                           Photuris                      April 1996


6.2.  SPI_Update                                                         |

   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               |
   ~                       Initiator-Cookie                        ~
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                                                               |
   ~                       Responder-Cookie                        ~
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |     Type      |                    LifeTime                   |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |                   Security-Parameter-Index                    |
   +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
   |                                                               |
   ~                         Verification                          ~
   |                                                               |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   |  Attribute-Choices ...
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
                             ... Padding           |  Pad Length   |
   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+


   Initiator-Cookie 16 octets.  Copied from the Value_Request.

   Responder-Cookie 16 octets.  Copied from the Value_Request.

   Type             9                                                    |

   LifeTime         three octets.  The number of seconds remaining
                    before the indicated SPI expires.  The value zero
                    indicates deletion of the indicated SPI.

   Security-Parameter-Index
                    four octets.  The SPI to be used for incoming commu-
                    nications.                                           +

                    This may be a new SPI value (for creation), or an
                    existing SPI value (for deletion).  The value zero
                    indicates all old SPIs for this IP Destination (used |
                    for deletion).

   Verification     variable precision number, or other format indicated |
                    by the Scheme-Choice.  The calculation of the value  |
                    is described in "Validity Verification".




Karn & Simpson            expires in six months                [Page 45]


DRAFT                           Photuris                      April 1996


                    The field may be any integral number of octets in    |
                    length.  It does not require any particular align-
                    ment.  The 32-bit alignment shown is for convenience
                    in the illustration.

   Attribute-Choices
                    Four or more octets.  A list of two or more          |
                    attributes for this SPI, selected from the list of
                    Offered-Attributes supported by the peer.

                    The contents and usage of this list are as previ-    |
                    ously described in "Attribute Choices List".  The
                    end of the list is indicated by the UDP Length after |
                    removing the Pad Length and Padding fields (UDP      |
                    Length - Pad Length - 1).

   Padding          Zero or more octets.  Prior to (optional) encryp-    |
                    tion, it is filled to align the Pad Length field at  |
                    a boundary appropriate to the Privacy-Method indi-   |
                    cated by the current Scheme-Choice.  The padding     |
                    values begin with the value 0, and count up to the   |
                    number of padding octets.  For example, if the Pad   |
                    Length is 5, the padding values are 0, 1, 2, 3, 4.

                    After (optional) decryption, if the padding octets   |
                    are not the correct values for the Pad Length, then  |
                    verification fails.

   Pad Length       one octet.  The size of the Padding field in octets  |
                    (not including the Pad Length field).  The value
                    typically ranges from 0 to 7, but may be up to 255
                    to permit hiding of the actual data length.

                    This field is always present, even when no Padding   |
                    is required.

   The portion of the message after the SPI MAY be encrypted for party   |
   privacy protection, in the same fashion specified for Iden-           |
   tity_Messages.

   The fields following the SPI are opaque.  That is, the values are set |
   prior to (optional) encryption, and examined only after (optional)    |
   decryption.








Karn & Simpson            expires in six months                [Page 46]


DRAFT                           Photuris                      April 1996


6.2.1.  Creation

   When the SPI LifeTime is greater than zero, the SPI_Update can be     |
   used to create a new Security Association.  Frequently, this message  |
   is used to create replacement SPIs as the LifeTime of an earlier SPI  |
   approaches expiration.

   In addition, this message allows more rapid SPI creation for high
   bandwidth applications.  The messages flow in the opposite direction
   from the primary traffic flow.

   The new session-keys are calculated in the same fashion as the Iden-  |
   tity_Messages.  Since the SPI value is always different than any pre-
   vious SPI during the Exchange LifeTime of the shared-secret, the
   resulting session-keys will necessarily be different from all others
   used in the same direction.

   When the peer finds that too many SPI values are already in use for
   this party, or some other resource limit is reached, a Resource_Limit |
   message is sent.

   No retransmission timer is necessary.  Success is indicated by the
   peer use of the new SPI.

   Should all creation attempts fail, eventually the peer will find that
   all existing SPIs have expired, and will begin the Photuris exchange  |
   again by sending a new Cookie_Request.  When appropriate, this        |
   Cookie_Request MAY include a Responder-Cookie to retain previous      |
   party pairings.


6.2.2.  Deletion

   When the SPI LifeTime is zero, the SPI_Update can be used to delete   |
   existing Security Associations.  This is especially useful when the   |
   application that needed them terminates, to prevent another applica-  |
   tion from replaying the datagrams.

   No retransmission timer is necessary.  This message is advisory, to
   reduce the number of ICMP Security Failures messages.

   Should any deletion attempts fail, the peer will learn that the
   deleted SPIs are invalid through the normal ICMP Security Failures
   messages, and will initiate a Photuris exchange by sending a new      |
   Cookie_Request.






Karn & Simpson            expires in six months                [Page 47]


DRAFT                           Photuris                      April 1996


6.2.3.  Modification

   The SPI_Update cannot be used to modify existing Security Associa-    |
   tions, such as lengthen an existing SPI LifeTime, resurrect an
   expired SPI, or add/remove an Attribute-Choice.                       |

   On receipt, such an otherwise valid message is silently discarded.


6.2.4.  Validity Verification

   This message is authenticated using the Validity-Method indicated by  |
   the current Scheme-Choice (see "Exchange Scheme List").  The Verifi-  +
   cation value is calculated prior to (optional) encryption, and veri-  +
   fied after (optional) decryption.                                     +

   The Validity-Method authentication function is supplied with two      +
   input values:                                                         +

    - the computed shared-secret,                                        +
    - the data to be verified (as a concatenated sequence of octets).    +

   The resulting output value is stored in the Verification field.

   The Validity-Method authentication function is calculated over the    |
   following concatenated data values:

    + the Initiator Cookie,                                              -
    + the Responder Cookie,
    + the SPI Owner Identity Verification,                               |
    + the SPI User Identity Verification,                                |
    + the message Type, LifeTime and SPI fields,                         |
    + the Attribute-Choices following the Verification field,
    + the Padding (if any),                                              |
    + the Pad Length.                                                    |

   Note that the order of the Identity Verification fields (from the     +
   Identity_Messages) is different in each direction.

   If the verification fails, the users are notified, and a Verifica-    |
   tion_Failure message is sent, without adding or deleting any Security
   Associations.  On success, normal operation begins with the authenti-
   cation and/or encryption of user datagrams.








Karn & Simpson            expires in six months                [Page 48]


DRAFT                           Photuris                      April 1996


   Implementation Notes:

      This is separate from any authentication method specified for      |
      Security Associations.

      The hash of the Identity Verification includes both the Size and   |
      Value fields.  The hash of the Attribute-Choices includes the
      Type, Length and Value fields.


7.  Error Messages

   Issued in response to Photuris state loss or other problems.  The
   message has effect in only one direction.  No retransmission timer is
   necessary.

   These messages are not encrypted for party privacy protection.        |

   The receiver checks the Cookies for validity.  Special care MUST be   +
   taken that the Cookie pair in the Error Message actually match a pair +
   currently in use, and that the protocol is currently in a state where +
   such an Error Message might be expected.  Otherwise, these messages   +
   could provide an opportunity for a denial of service attack.  Invalid
   messages are silently discarded.


7.1.  Bad_Cookie

   For the format of the message, see "Header Format".  There are no     |
   additional fields.                                                    |

   Initiator-Cookie 16 octets.  Copied from the offending message.       |

   Responder-Cookie 16 octets.  Copied from the offending message.       |

   Type             10

   This error message is sent when a Value_Request, Identity_Request,    |
   SPI_Needed, or SPI_Update is received, and the receiver's Cookie is
   invalid or the associated Exchange-Value has expired.

   During the Photuris exchange, when this error message is received, it |
   has no immediate effect on the operation of the protocol phases.      |
   When Retransmissions have been exceeded, if this error message has    |
   been received, the Initiator SHOULD begin the Photuris exchange again |
   by sending a new Cookie_Request.                                      |

   After the Photuris exchange has completed, when this error message is |



Karn & Simpson            expires in six months                [Page 49]


DRAFT                           Photuris                      April 1996


   received in response to an SPI_Needed or SPI_Update, the party SHOULD |
   initiate a Photuris exchange by sending a new Cookie_Request.

   However, existing SPIs are not deleted.  They expire normally, and
   are purged sometime later.                                            +

   Design Notes:                                                         +

      This message will occur normally at any time after the             +
      Cookie_Response, whenever the Responder dynamically changes its    +
      local secret for cookie generation and the secret for generating   +
      its Exchange-Value, or either party expires its exchange state.    +

      On the other hand, an observer could attempt to use this message   +
      for denial of service by copying the valid cookies and sending it  +
      faster than the round-trip of the valid exchange peer.             +

      Therefore, the protocol gracefully recovers during the Value and   +
      Identification Exchanges by using the Retransmission TimeOut to    +
      give sufficient time for a valid exchange reply to arrive.  It     +
      recovers during the SPI Messages by using cached prior exchange    +
      values to eliminate the intensive calculations of a new Photuris   +
      exchange.                                                          +


7.2.  Resource_Limit

   For the format of the message, see "Header Format".  There are no     |
   additional fields.                                                    |

   Initiator-Cookie 16 octets.  Copied from the offending message.       |

   Responder-Cookie 16 octets.  Copied from the offending message.       |

   Type             11                                                   |

   This error message is sent when a Cookie_Request or SPI_Update is     |
   received, and too many SPI values are already in use for that peer,
   or some other Photuris resource is unavailable.

   During the Photuris exchange, when this error message is received in  |
   response to a Cookie_Request, the implementation SHOULD double the    |
   retransmission timeout for sending another Cookie_Request.            |

   After the Photuris exchange has completed, when this error message is |
   received in response to an SPI_Update, the implementation SHOULD NOT  |
   send another SPI_Update until it has deleted an existing SPI, or
   waited for a cached SPI entry to expire.                              |



Karn & Simpson            expires in six months                [Page 50]


DRAFT                           Photuris                      April 1996


   Design Notes:                                                         |

      This message will occur normally instead of a Cookie_Response,     |
      during such events as server recovery after a power failure.  It   |
      is also regulates overly aggressive SPI creation.                  |

      Again, an observer could attempt to use this message for denial of |
      service by copying the valid cookies and sending it faster than    |
      the round-trip of the valid exchange peer.                         |

      Therefore, the protocol gracefully recovers during the Cookie      |
      Exchange by using the Retransmission TimeOut to give sufficient    |
      time for a valid exchange reply to arrive.  It recovers during the |
      SPI Messages by the normal SPI expiration process.                 |


7.3.  Verification_Failure

   For the format of the message, see "Header Format".  There are no     |
   additional fields.                                                    |

   Initiator-Cookie 16 octets.  Copied from the offending message.       |

   Responder-Cookie 16 octets.  Copied from the offending message.       |

   Type             12                                                   |

   This error message is sent when an Identity_Message, SPI_Needed or    |
   SPI_Update is received, and verification fails.                       |

   When this error message is received, the implementation SHOULD log    |
   the occurance, and notify an operator as appropriate.  However,       |
   receipt has no effect on the operation of the protocol.               |

   Design Notes:

      This message will not occur normally.  The principle purpose is to |
      notify an operator when an attack has occurred or that the identi- |
      fication used is not valid.                                        |

      Again, an observer could attempt to use this message for denial of |
      service by copying the valid cookies and sending it faster than    |
      the round-trip of the valid exchange peer.

      Therefore, the protocol gracefully recovers during the Identifica- |
      tion Exchange by using the Retransmission TimeOut to give suffi-   |
      cient time for a valid exchange reply to arrive.  It recovers dur- |
      ing the SPI Messages by using cached prior exchange values to      |



Karn & Simpson            expires in six months                [Page 51]


DRAFT                           Photuris                      April 1996


      eliminate the intensive calculations of a new Photuris exchange.


   8.  Public Value Exchanges

      Photuris is based in principle on public-key cryptography, specif- |
      ically Diffie-Hellman key exchange.  Exchange of D-H Exchange-
      Values based on private/secret values results in a mutual shared-
      secret between the parties.  This shared-secret can be used on its
      own, or to generate a series of session-keys for authentication
      and encryption of subsequent traffic.

      Widespread deployment and use of an Internet Security protocol is
      possible without public-key cryptography.  For example, Kerberos
      [RFC-1510] can generate host-pair keys for use in Internet Secu-
      rity, much as it now generates session-keys for use by encrypted
      telnet and other "kerberized" applications.

      The Kerberos model has some widely recognized drawbacks.  Foremost
      is the requirement for a highly available on-line Key Distribution
      Center (KDC), with a database containing every principal's secret-
      key.  This carries significant security risks.

      Public-key cryptography enables decentralization.  Entities gener-
      ate session-keys without real-time communication with any other
      party.

      This draft assumes familiarity with the Diffie-Hellman public-key
      algorithm.  A good description can be found in [Schneier95].


   8.1.  Modular Exponentiation Groups

      The original Diffie-Hellman technique [DH76] specified modular
      exponentiation.  An Exchange-Value is generated using a generator
      (g), raised to a private/secret exponent (x), modulo a prime (p).

         (g**x) mod p

      When these public-values are exchanged between parties, the par-
      ties can calculate a shared-secret value between themselves.

         (g**xy) mod p

      The security depends on the relative difficulty of calculating
      discrete logarithms, compared to the ease of exponentiation in the
      same finite field.  The prime modulus MUST be sufficiently large
      to prevent calculation of its discrete logs within the lifetime of



Karn & Simpson            expires in six months                [Page 52]


DRAFT                           Photuris                      April 1996


      the protected data.

      When a strong prime modulus and generator pair are well chosen,
      the difficulty of a discrete log attack is maximized.  By choosing
      the pairs in advance, analysis of the pair characteristics is pos-
      sible.  This analysis can promote confidence in the security of
      the implementations.                                               +

      The generator (g) and modulus (p) are established by the Scheme-   +
      Choice (see "Exchange Scheme List" for details).  They are offered +
      in the Cookie_Response, and one pair is chosen in the              +
      Value_Request.                                                     +

      The exponent (x) or (y) is kept secret by the parties.  Only the   +
      public-value result of the modular exponentiation with (x) or (y)  +
      is sent as the Exchange-Value.


   8.2.  Moduli Selection

      Each implementation proposes one or more moduli in its Offered-
      Schemes.  Every implementation MUST support up to 4096-bit moduli.

      For any particular Photuris node, these moduli need not change for
      significant periods of time; likely days or weeks.  A background
      process can periodically generate new moduli.


   8.2.1.  Strong Primes

      Ideally, each prime modulus (p) should have the property that both
      p and (p-1)/2 are prime.  This provides the strongest defense
      against factoring.

      Discovery of strong primes is extremely computationally intensive,
      and practically impossible for commercially available processors
      to find in a reasonable interactive time.  Complete verification
      can take hours or days.


   8.2.2.  Prime-Order Subgroups

      An alternative is the use of a large subgroup where q is a prime
      factor of (p-1).  This technique is described in [OW96], and based |
      on [Schnorr91].

      Discovery of prime-order subgroups is less computationally inten-  |
      sive than verification of strong primes.  The computational cost   |



Karn & Simpson            expires in six months                [Page 53]


DRAFT                           Photuris                      April 1996


      of finding such a prime (p) with a prime divisor (q) is only a
      little more than finding any random prime.


   8.2.3.  Unstructured Primes

      A random unstructured prime (p), where (p-1) may have small prime  |
      factors, is subject to a Pohlig-Hellman attack.  Strong primes and |
      prime-order subgroups prevent this attack.

      Discovery of random primes is the bulk of the computational pro-
      cessing of the previously described primes.  Therefore, they
      SHOULD be used instead of unstructured primes.


   8.2.4.  Non-Primes

      Technically, the modulus is not required to be prime.  Any suffi-
      ciently large modulus would be useful, and provide a minimal
      amount of security.

      To improve security, a potential modulus should be sieved to
      reject those with small prime factors (less than 1,000,000).

      However, the security of non-prime moduli is considered insuffi-
      cient for data of any long-term value.  These SHOULD NOT be used,
      except in the most ephemeral cases -- such as cellular telephones,
      and other low computational power devices.


   8.2.5.  Bootstrap Moduli

      Each implementation is likely to use a fixed modulus during its
      bootstrap, until it can generate another modulus in the back-
      ground.  As the bootstrap modulus will be widely distributed, and
      reused whenever the machine reinitializes, it SHOULD be a strong
      prime to provide the greatest long-term protection.


   8.2.6.  Learning Moduli

      As Photuris exchanges are initiated, new moduli will be learned
      from the Responder Offered-Schemes.  The Initiator MAY cache these
      moduli for its own use.

      Before offering any learned modulus, the implementation MUST per-
      form at least one iteration of probable primality verification.
      In this fashion, many processors will perform verification in



Karn & Simpson            expires in six months                [Page 54]


DRAFT                           Photuris                      April 1996


      parallel as moduli are passed around.

      When primality verification failures are found, the failed moduli  |
      SHOULD be retained for some (implementation dependent) period of
      time, to avoid relearning and retesting after subsequent
      exchanges.


   8.3.  Generator Selection                                             -

      The generator (g) should be chosen such that the secret exponents
      will generate all possible public-values, evenly distributed
      throughout the range of the modulus (p), without cycling through a
      smaller subset.  Such a generator is called a "primitive root"
      (which is trivial to find when p is strong).

      Only one generator (2) is required to be supported.

      Implementation Notes:

         One useful technique is to select the generator, and then limit
         the modulus selection sieve to primes with that generator.

            2   when p (mod 24) = 11.
            3   when p (mod 12) = 5.
            5   when p (mod 10) = 3 or 7.

         The required generator (2) improves efficiency in multiplica-
         tion performance.  It is usable even when it is not a primitive
         root, as it still covers half of the space of possible
         residues.


   8.4.  Exponent Selection

      Each implementation generates a separate random secret exponent
      for each different modulus.  Then, a D-H Exchange-Value is calcu-
      lated for the given modulus, generator, and exponent.

      The exponent 0 will generate the public value 1, and exponent 1
      will generate the public value g mod p.  These exponents do not
      qualify as secret.

      Although the same exponent and Exchange-Value may be used with
      several parties whenever the same modulus and generator are used,
      the exponent SHOULD be changed at random intervals.  A background
      process can periodically destroy the old values, generate a new
      random secret exponent, and recalculate the Exchange-Value.  This



Karn & Simpson            expires in six months                [Page 55]


DRAFT                           Photuris                      April 1996


      limits the exposure of both the secret exponent and shared-secret,
      protecting earlier communications, as past secrets are not kept    |
      for possible discovery by a future intrusion.  Also, the secret
      exponent currently in use is less likely to be anticipated, as the
      element of random timing is introduced.

      Since these operations involve several time-consuming modular
      exponentiations, moving them to the "background" substantially
      improves the apparent execution speed of the Photuris protocol.
      It also reduces CPU loading sufficiently to allow a single pub-
      lic/private key-pair to be used in several closely spaced Photuris
      executions, when creating Security Associations with several dif-
      ferent nodes over a short period of time.

      Consideration should also be given to the speed versus security
      tradeoffs of modular exponentiation.  While an exponent may be
      used that is shorter than the modulus, the cryptologic literature
      is indeterminate as to the minimum proportionate size.  This spec-
      ification recommends that the exponent length be at least twice
      the desired cryptographic strength of the longest session-key
      needed by the strongest offered-attribute.

      Implementation Notes:

         The size of the exponent is entirely implementation dependent,
         is unknown to the other party, and can be easily changed.

         A single modular exponentiation on a 486-66DX2 processor using
         RSAREF and Borland C under MS-DOS took 20 seconds with a
         1024-bit prime modulus and a 1024-bit random exponent.  This
         dropped to about 1 to 1.5 seconds when the random exponent was
         shortened to 128 bits, with the same 1024-bit modulus.

         Other precomputation suggestions are described in [BGMW93] and
         [Rooij94].
















Karn & Simpson            expires in six months                [Page 56]


DRAFT                           Photuris                      April 1996


   9.  Exchange Scheme List

      Initial values are assigned as follows:

      (0)   Reserved.

      (1)   Reserved.                                                    |

      (2)   Implementation Required.  Any modulus (p) with a recommended |
            generator (g) of 2.  The modulus is contained in the         |
            Exchange Scheme Value field in the list of Offered-Schemes.  |

            The "Identification Exchange" and "SPI Messages" Privacy-    |
            Method is "not protected".

            The "SPI Messages" Validity-Method is "MD5-DP".              |

      (3)   Exchange-Schemes 3 to 255 are intended for future well-known |
            published schemes.

      (256) Exchange-Schemes 256 to 32767 are intended for vendor-
            specific unpublished schemes.  Implementors wishing a number |
            MUST request the number from the authors.

      (32768)
            Exchange-Schemes 32768 to 65535 are available for cooperat-
            ing parties to indicate private schemes, regardless of ven-
            dor implementation.  These numbers are not reserved, and are |
            subject to duplication.  Other criteria, such as the IP      |
            Source and Destination of the Cookie_Request, are used to
            differentiate the particular Exchange-Schemes available.




















Karn & Simpson            expires in six months                [Page 57]


DRAFT                           Photuris                      April 1996


   10.  Validity Methods
   10.1.  MD5-DP

      As described in "Validity Verification", the MD5 [RFC-1321] hash   |
      is calculated over the concatenation of                            |

         MD5( key, data, datafill, key, md5fill )                        |

      The leading key is not padded to any particular alignment.         |

      The datafill uses the same pad-with-length technique defined for   |
      md5fill.  The length includes the leading key and data.            |

      The resulting Verification field is a 128-bit variable precision   |
      number (18 octets including Size).                                 |


   11.  Attribute List

      Implementors wishing a number MUST request the number from the
      authors.  Initial values are assigned as follows:

        Use    Type
         -       0* padding
         -       1* AH-Attributes
         -       2* ESP-Attributes
         I       3* Simple MD5-DP Verification                           |
         A       5* MD5-KDP                                              |
         E       8* DES-CBC
         X     255  Organizational                                       |

         A  AH Attribute-Choice
         E  ESP Attribute-Choice
         I  Identity-Choice
         X  dependent on list location                                   +
         *  feature must be supported (mandatory)

      Other attributes are specified in companion documents.













Karn & Simpson            expires in six months                [Page 58]


DRAFT                           Photuris                      April 1996


   11.1.  Padding

      +-+-+-+-+-+-+-+-+
      |     Type      |
      +-+-+-+-+-+-+-+-+


      Type             0

      Each attribute may have value fields that are multiple octets.  To
      facilitate processing efficiency, these fields are aligned on
      integral modulo 8 octet (64-bit) boundaries.

      Padding is accomplished by insertion of 1 to 7 Type 0 padding
      octets before the attribute that needs alignment.

      No padding is used after the final attribute in a list.


   11.2.  AH-Attributes

      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |     Type      |    Length     |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+


      Type             1

      Length           0

      When a list of Attributes is specified, this Attribute begins the
      section of the list which applies to the Authentication Header
      (AH).


















Karn & Simpson            expires in six months                [Page 59]


DRAFT                           Photuris                      April 1996


   11.3.  ESP-Attributes

      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |     Type      |    Length     |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+


      Type             2

      Length           0

      When a list of Attributes is specified, this Attribute begins the
      section of the list which applies to the Encapsulating Security
      Payload (ESP).


   11.4.  Simple MD5-DP Verification

      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |     Type      |    Length     |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+


      Type             3

      Length           0

      When selected as an Identity-Choice, the immediately following     |
      Identification field contains an unstructured variable precision   |
      number.  Valid Identifications and symmetric secret-keys are pre-  |
      configured by the parties.

      There is no required format or content for the Identification
      value.  The value may be a number or string of any kind.

      Typically, the Identification is a user name, a Fully Qualified
      Domain Name, or an email address which contains a user name and a
      domain name.  Examples include:

         user
         node.site.
         user@node.site.
         rcmd@node.site.
         Mundane Name <user@node.site>                                   +

      There is no requirement that the domain name match any of the par-
      ticular IP addresses in use by the parties.




Karn & Simpson            expires in six months                [Page 60]


DRAFT                           Photuris                      April 1996


      The authentication symmetric secret-key (as specified) is selected |
      based on the contents of the Identification field.  All implemen-  +
      tations must support at least 62 octets.  The selected symmetric   +
      secret-key SHOULD provide at least 64-bits of cryptographic        +
      strength.                                                          +

      As described in "Identity Verification", the MD5 [RFC-1321] hash   +
      is calculated over the concatenation of:                           +

         MD5( key, data, datafill, key, md5fill )                        +

      The leading key is not padded to any particular alignment.

      The datafill uses the same pad-with-length technique defined for   |
      md5fill.  The length includes the leading key and data.            |

      The resulting Verification field is a 128-bit variable precision   |
      number (18 octets including Size).                                 +

      For identity verification and session-key calculation, the authen- +
      tication symmetric secret-key is also used as the calculation      +
      secret-key.


   11.5.  MD5-KDP

      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |     Type      |    Length     |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+


      Type             5

      Length           0

      May be selected as an AH Attribute-Choice, pursuant to [RFC-1828]  +
      et sequitur.  The selected Exchange Scheme SHOULD provide at least
      64-bits of cryptographic strength.

      MD5 [RFC-1321] is used as the key generation cryptographic hash    |
      for generating the SPI session-key, as described in "Session-Key
      Computation".  The most significant 496-bits (62 octets) of the    |
      generated hashes are used for the key.

      The remaining least significant 16-bits (2 octets) of the last     |
      hash are discarded.  When combined with other uses of key genera-  |
      tion for the same SPI, the next such attribute will begin with a   |
      new hash.



Karn & Simpson            expires in six months                [Page 61]


DRAFT                           Photuris                      April 1996


      Profile:                                                           |

         When negotiated with Photuris, the transform differs slightly   |
         from [RFC-1828].

         The form of the authenticated message is:                       |

            MD5( key, keyfill, datagram, datafill, key, md5fill )        |

         The additional datafill protects against the attack described   |
         in [PO96].  This is also filled to the next 512-bit boundary,   |
         using the same pad-with-length technique defined for MD5.  The  |
         length includes the leading key and data.


   11.6.  DES-CBC

      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                                  |
      |     Type      |    Length     |                                  |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                                  |


      Type             8

      Length           0                                                 |

      May be selected as an ESP Attribute-Choice, pursuant to [RFC-1829] +
      et sequitur.  The selected Exchange Scheme SHOULD provide at least
      56-bits of cryptographic strength.

      MD5 [RFC-1321] is used as the key generation cryptographic hash    |
      for generating the SPI session-key, as described in "Session-Key
      Computation".  The most significant 64-bits of the generated hash  |
      are used for the key.  The least significant bit of each key octet |
      is ignored (or set to parity when the implementation requires).    |

      If the key matches any of the weak, semi-weak or possibly weak     |
      keys [Schneier95, pages 280-282], that key is discarded; the next  |
      64-bits of the generated hash are used instead, recursively.       |

      The remaining octets of the last hash are discarded.  When com-    |
      bined with other uses of key generation for the same SPI, the next |
      such attribute will begin with a new hash.








Karn & Simpson            expires in six months                [Page 62]


DRAFT                           Photuris                      April 1996


      Profile:                                                           |

         When negotiated with Photuris, the transform differs slightly   |
         from [RFC-1829].                                                |

         The IV is always 32-bits.

         The 64-bit IV is generated from the 32-bit SPI field followed   |
         by (concatenated with) the 32-bit IV field.  The bit-wise com-  |
         plement of the 32-bit IV value is XOR'd with the first 32-bits  |
         (SPI).                                                          |

         The padding values begin with the value 0, and count up to the  |
         number of padding octets.  For example, if the plaintext length |
         is 41, the padding values are 0, 1, 2, 3, 4, and the following  |
         Pad Length is 5.                                                |

         After decryption, if the padding octets are not the correct     |
         values for the Pad Length, then the payload is discarded, and a |
         "Decryption Failed" error is indicated, as described in [RFC-   |
         xxxx].


   11.7.  Organizational

      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |     Type      |    Length     |              OUI
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
             ...      |     Kind      |  Value(s) ...
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+


      Type             255                                               |

      Length           >= 4

                       When the Length is four, no Value(s) field is
                       present.

      OUI              three octets.  The vendor's Organizationally
                       Unique Identifier, assigned by IEEE 802 (see
                       [RFC-1700] for contact details).  The bits within
                       the octet are in canonical order, and the most
                       significant octet is transmitted first.

      Kind             one octet.  Indicates a sub-type for the OUI.
                       There is no standardization for this field.  Each
                       OUI implements its own values.



Karn & Simpson            expires in six months                [Page 63]


DRAFT                           Photuris                      April 1996


      Value(s)         Zero or more octets.  The details are implementa-
                       tion specific.

      Some implementors might not need or want to publish their propri-
      etary algorithms and attributes.  This OUI mechanism is available
      to specify these without encumbering the authors with proprietary  |
      number requests.












































Karn & Simpson            expires in six months                [Page 64]


DRAFT                           Photuris                      April 1996


   A.  Automaton

      An example automaton is provided to illustrate the operation of
      the protocol.  It is not yet updated to match the text!!!  Where   +
      conflicts appear between this example and the text, the text takes
      precedence.

      The finite-state automaton is defined by events, actions and state
      transitions.  Events include reception of external commands such
      as expiration of a timer, and reception of datagrams from a peer.
      Actions include the starting of timers and transmission of data-
      grams to the peer.

      Events

      DU13 = Communication Administratively Prohibited
      SF0  = Bad SPI
      SF4  = Need Authentication
      SF5  = Need Authorization
      WP   = Want Privacy

      RCQ+ = Receive Cookie_Request (Good)
      RCQ- = Receive Cookie_Request (Bad)
      RCR+ = Receive Cookie_Response (Good)
      RCR- = Receive Cookie_Response (Bad)

      RVQ+ = Receive Value_Request (Good)
      RVQ- = Receive Value_Request (Bad)
      RVR+ = Receive Value_Response (Good)
      RVR- = Receive Value_Response (Bad)

      RIQ+ = Receive Identity_Request (Good)                             |
      RIQ- = Receive Identity_Request (Bad)                              |
      RIR+ = Receive Identity_Response (Good)                            |
      RIR- = Receive Identity_Response (Bad)                             |

      RUN+ = Receive SPI_Needed (Good)                                   |
      RUN- = Receive SPI_Needed (Bad)                                    |
      RUM+ = Receive SPI_Update (Good)                                   |
      RUM- = Receive SPI_Update (Bad)                                    |

      RBC  = Receive Bad Cookie                                          |
      RRL  = Receive Resource Limit                                      |
      RVF  = Receive Verification Failure                                |

      TO+  = Timeout with counter > 0
      TO-  = Timeout with counter expired
      UTO  = Update TimeOut



Karn & Simpson            expires in six months                [Page 65]


DRAFT                           Photuris                      April 1996


      XTO  = Exchange TimeOut


      Actions

      scq  = Send Cookie_Request
      scr  = Send Cookie_Response

      svq  = Send Value_Request
      svr  = Send Value_Response

      siq  = Send Identity_Request                                       |
      sir  = Send Identity_Response                                      |

      sum  = Send SPI_Update                                             |

      se*  = Send error message (see text)                               |
      sbc  = Send Bad Cookie                                             |
      srl  = Send Resource Limit                                         |
      svf  = Send Verification Failure                                   |

      bito = Backoff Initiate TimeOut
      buto = Backoff Update TimeOut
      ito  = Set Initiate TimeOut                                        |
      uto  = Set Update TimeOut                                          |
      xto  = Set Exchange TimeOut                                        |

      log  = log operator message                                        |


   A.1.  State Transition Table

      States are indicated horizontally, and events are read vertically.
      State transitions and actions are represented in the form
      action/new-state.  Multiple actions are separated by commas, and
      may continue on succeeding lines as space requires; multiple
      actions may be implemented in any convenient order.  The state may
      be followed by a letter, which indicates an explanatory footnote.
      The dash ('-') indicates an illegal transition.                    -












Karn & Simpson            expires in six months                [Page 66]


DRAFT                           Photuris                      April 1996


      Initiator                                                          +

            |    0         1         2         3         4
            | Initial    Cookie  CookieBad   Value    ValueBad           |
      ------+--------------------------------------------------
       DU13 |ito,scq/1 ito,scq/1 ito,scq/1     3         4               |
       SF0  |ito,scq/1     1         2         3         4               |
       SF4  |ito,scq/1     1         2         3         4               |
       SF5  |ito,scq/1     1         2         3         4               |
       WP   |ito,scq/1     1         2         3         4               |
            |
       RCR+ |    -     ito,svq/3 ito,svq/3     3         4               |
       RCR- |    0         1         2         3         4               |
       RVR+ |    -         -         -     ito,siq/5 ito,siq/5           |
       RVR- |    0         1         2         3         4               |
       RIR+ |    -         -         -         -         -               |
       RIR- |    0         1         2         3         4               |
            |
       RUN+ |    -         -         -         -         -               |
       RUN- |  sbc/0     sbc/1     sbc/2     sbc/3     sbc/4             |
       RUM+ |    -         -         -         -         -               |
       RUM- |  sbc/0     sbc/1     sbc/2     sbc/3     sbc/4             |
            |
       RBC  |    -         2         2         4         4               |
       RRL  |    -       bito/1    bito/2      3         4               |
       RVF  |    -         -         -         -         -               |
            |                                                            |
        TO+ |    -       scq/1     scq/2     svq/3     svq/4             |
        TO- |    -         0       scq/1       0       scq/1             |
       UTO  |    -         -         -         -         -               |
       XTO  |    -         0         0         0         0




















Karn & Simpson            expires in six months                [Page 67]


DRAFT                           Photuris                      April 1996


      Initiator                                                          |

            |    5         6         8                                   |
            |Identity IdentityBad  Update                                |
      ------+-----------------------------                               |
       DU13 |    5         6         8                                   |
       SF0  |    5         6     ito,scq/1                               |
       SF4  |    5         6     ito,scq/1                               |
       SF5  |    5         6     ito,scq/1                               |
       WP   |    5         6       sun/8                                 |
            |                                                            |
       RCR+ |    5         6         8                                   |
       RCR- |    5         6         8                                   |
       RVR+ |    5         6         8                                   |
       RVR- |    5         6         8                                   |
       RIR+ |  uto/8     uto/8       8                                   |
       RIR- |  svf/5     svf/6       8                                   |
            |                                                            |
       RUN+ |    -         -       sum/8                                 |
       RUN- |  sbc/5     sbc/6     se*/8                                 |
       RUM+ |    -         -         8                                   |
       RUM- |  sbc/5     sbc/6     se*/8                                 |
            |                                                            |
       RBC  |    6         6     ito,scq/1                               |
       RRL  |    5         6       buto/8                                |
       RVF  |  log/5     log/6     log/8                                 |
            |                                                            |
        TO+ |  sim/5     sim/6       -                                   |
        TO- |    0       scq/1       -                                   |
       UTO  |    -         -       sum/8                                 |
       XTO  |    0         0         0                                   |




















Karn & Simpson            expires in six months                [Page 68]


DRAFT                           Photuris                      April 1996


      Responder                                                          |

            |    0         7         8                                   |
            | Initial    Ready     Update                                |
      ------+-----------------------------                               |
       WP   |    -         7       sun/8                                 |
            |
       RCQ+ |  scr/0     scr/7     scr/8                                 |
       RCQ- |  srl/0     srl/7     srl/8                                 |
       RVQ+ |xto,svr/7   svr/7     svr/8                                 |
       RVQ- |  sbc/0     sbc/7     sbc/8                                 |
       RIQ+ |    -     uto,sir/8   sir/8                                 |
       RIQ- |  sbc/0     se*/7     se*/8                                 |
            |
       RUN+ |    -         -       sum/8                                 |
       RUN- |  sbc/0     sbc/7     se*/8                                 |
       RUM+ |    -         -         8                                   |
       RUM- |  sbc/0     sbc/7     se*/8                                 |
            |
       RBC  |    -         7     ito,scq/1                               |
       RRL  |    -         -       buto/8                                |
       RVF  |    -         -       log/8                                 |
            |                                                            |
       UTO  |    -         -       sum/8                                 |
       XTO  |    -         0         0                                   |



   A.2.  States

      Following is a more detailed description of each automaton state.

      The "Bad" version of a state is to indicate that the Bad_Cookie    +
      message has been received.


   A.2.1.  Initial

      The Initial state is fictional, in that there is no state between
      the parties.


   A.2.2.  Cookie

      In the Cookie state, the Initiator has sent a Cookie_Request, and
      is waiting for a Cookie_Response.  Both the Restart and Exchange
      timers are running.




Karn & Simpson            expires in six months                [Page 69]


DRAFT                           Photuris                      April 1996


      Note that the Responder has no Cookie state.


   A.2.3.  Value

      In the Value state, the Initiator has sent its Exchange-Value, and |
      is waiting for an Identity_Message.  Both the Restart and Exchange |
      timers are running.


   A.2.4.  Identity

      In the Identity state, the Initiator has sent an Identity_Request, |
      and is waiting for an Identity_Response in reply.  Both the
      Restart and Exchange timers are running.


   A.2.5.  Ready

      In the Ready state, the Responder has sent its Exchange-Value, and |
      is waiting for an Identity_Message.  The Exchange timer is run-    |
      ning.


   A.2.6.  Update

      In the Update state, each party has concluded the Photuris
      exchange, and is unilaterally updating expiring SPIs until the
      Exchange LifeTime expires.  Both the Update and Exchange timers
      are running.





















Karn & Simpson            expires in six months                [Page 70]


DRAFT                           Photuris                      April 1996


   B.  Example Bootstrap Moduli                                          -

      During the initial bootstrap of the implementation, there may not
      be sufficient time to generate a new modulus before a security
      association is needed.  These moduli are verified examples that
      may be used during this bootstrap period.

      (512-2)
         A 512-bit strong prime (p), expressed in hex:                   |

            da58 3c16 d985 2289  d0e4 af75 6f4c ca92                     |
            dd4b e533 b804 fb0f  ed94 ef9c 8a44 03ed                     |
            5746 50d3 6999 db29  d776 276b a2d3 d412                     |
            e218 f4dd 1e08 4cf6  d800 3e7c 4774 e833                     |

         The recommended generator (g) for this prime is 2.              |

         This prime modulus was randomly generated by a freely available |
         program written by Phil Karn, verified using the                |
         mpz_probab_prime() function Miller-Rabin test in the Gnu Math   |
         Package (GMP) version 1.3.2; as well as independently developed |
         test libraries by Rich Schroeppel (complete Elliptic Curve      |
         test).                                                          |

         Currently estimated to provide 64 (pessimistic) bit-equivalents |
         of cryptographic strength.  Exponent lengths of 128 bits (or    |
         more) are recommended.                                          |

         Using current technology, calculation of the discrete loga-     |
         rithms is anticipated to take no more than a year.  This is     |
         insufficient for long-term use.                                 |

         A modulus of this size is only used with transforms (such as    |
         DES) that already provide less protection than the estimated    |
         strength, and where rapid computation is of primary importance. |

      (1024-2)                                                           |
         A 1024-bit strong prime (p), expressed in hex:













Karn & Simpson            expires in six months                [Page 71]


DRAFT                           Photuris                      April 1996


            97f6 4261 cab5 05dd  2828 e13f 1d68 b6d3
            dbd0 f313 047f 40e8  56da 58cb 13b8 a1bf
            2b78 3a4c 6d59 d5f9  2afc 6cff 3d69 3f78
            b23d 4f31 60a9 502e  3efa f7ab 5e1a d5a6

            5e55 4313 828d a83b  9ff2 d941 dee9 5689
            fada ea09 36ad df19  71fe 635b 20af 4703
            6460 3c2d e059 f54b  650a d8fa 0cf7 0121
            c747 99d7 5871 32be  9b99 9bb9 b787 e8ab

         The recommended generator (g) for this prime is 2.

         This prime modulus was randomly generated by a freely available
         program written by Phil Karn, verified using the
         mpz_probab_prime() function Miller-Rabin test in the Gnu Math
         Package (GMP) version 1.3.2; and also verified with GMP on
         other platforms by Wei Dai and Frank A Stevenson, as well as
         independently developed test libraries by Eric Young (Miller-
         Rabin test), and Rich Schroeppel (complete Elliptic Curve
         test).                                                          -

         Currently estimated to provide 80 (pessimistic) through 98      |
         (optimistic) bit-equivalents of cryptographic strength.  Expo-  |
         nent lengths of 160 to 256 bits (or more) are recommended.

      Implementors are encouraged to generate their own bootstrap mod-
      uli, and to change bootstrap moduli in successive implementation
      releases.


   Operational Considerations

      The specification provides only a few configurable parameters,
      with defaults that should satisfy most situations.

      Retransmissions
         Default: 3.

      Initial Retransmission TimeOut (IRTO)
         Default: 10 seconds.

      Exchange TimeOut (ETO)
         Default: 60 seconds.  Minimum: Retransmissions * IRTO.          |

      Exchange LifeTime (ELT)                                            |
         Default: 30 minutes.  Minimum: 2 * ETO.                         |





Karn & Simpson            expires in six months                [Page 72]


DRAFT                           Photuris                      April 1996


      SPI LifeTime (SPILT)                                               |
         Default: 5 minutes.  Minimum: 2 * ELT.                          +

      In addition, each party configures local policy that determines    |
      what access (if any) is granted to the holder of a particular
      identity.  For example, the party might allow anonymous FTP, but
      prohibit Telnet.  Such considerations are outside the scope of
      this document.


   Security Considerations

      Photuris was based on currently available tools, by experienced
      network protocol designers with an interest in cryptography,
      rather than by cryptographers with an interest in network proto-
      cols.  This specification is intended to be readily implementable  |
      without requiring an extensive background in cryptology.

      Therefore, only minimal background cryptologic discussion and      |
      rationale is included in this document.  Although some review has  |
      been provided by the general cryptologic community, it is antici-
      pated that design decisions and tradeoffs will be thoroughly anal-
      ysed in subsequent dissertations and debated for many years to
      come.                                                              +

      Cryptologic details are reserved for separate documents that may   +
      be more readily and timely updated with new analysis.


   Acknowledgements

         Thou shalt make no law restricting the size of integers that
         may be multiplied together, nor the number of times that an
         integer may be multiplied by itself, nor the modulus by which
         an integer may be reduced.  [Prime Commandment]

      Phil Karn was principally responsible for the design of the proto- |
      col phases, particularly the clogging defense, and provided much   |
      of the design rationale text.

      William Simpson designed the packet formats and attributes, and    |
      additional message types, editing and formatting.  All such mis-   |
      takes are his responsibility.

      This protocol was later discovered to have many elements in common
      with the Station-To-Station authentication protocol [DOW92].

      Angelos Keromytis suggested the cookie exchange rate limitation    |



Karn & Simpson            expires in six months                [Page 73]


DRAFT                           Photuris                      April 1996


      counter, and developed the first complete independent implementa-  |
      tion.                                                              |

      Paul C van Oorschot suggested signing both the public exponents    |
      and the shared-secret, to provide an authentication-only version
      of identity verification.  Also, he provided text regarding mod-
      uli, generator, and exponent selection.

      Bart Preneel and Paul C van Oorschot in [PO96] suggested adding    |
      padding between the data and trailing key when hashing for authen- |
      tication.                                                          |

      Hilarie Orman suggested adding secret "nonces" to session-key gen- |
      eration, and provided extensive review of the protocol details.

      Bill Sommerfeld suggested using the Cookie values on successive    |
      exchanges to provide bi-directional user-oriented keying.

      Oliver Spatscheck developed a second independent implementation.   |
      International interoperability testing provided the impetus for
      many of the implementation notes herein.

      Randall Atkinson, Steven Bellovin, James Hughes, Brian LaMacchia,
      Cheryl Madson, Perry Metzger, Ron Rivest, and Rich Schroeppel pro-
      vided useful critiques of earlier versions of this document.


   References

      [BGMW93] E. Brickell, D. Gordon, K. McCurley, and D. Wilson, "Fast
               Exponentiation with Precomputation (Extended Abstract)",
               Advances in Cryptology -- EUROCRYPT '92, Lecture Notes in
               Computer Science, 658 (1993), Springer-Verlag, 200-207.

               Also U.S. Patent #5,299,262, E.F. Brickell, D.M. Gordon,
               K.S. McCurley, "Method for exponentiating in crypto-
               graphic systems", 29 Mar 1994.

      [Diffie90]
               Whitfield Diffie, "Authenticated Key Exchange and Secure
               Interactive Communication", Northern Telecom, Securicom
               '90, Paris France, 16 March 1990.

      [DH76]   Diffie, W., and Hellman, H.E., "New Directions in Cryp-
               tography", IEEE Transactions on Information Theory, v
               IT-22 n 6 pp 644-654, November 1976.





Karn & Simpson            expires in six months                [Page 74]


DRAFT                           Photuris                      April 1996


      [DOW92]  Whitfield Diffie, Paul C van Oorshot, Michael J Wiener,
               "Authentication and Authenticated Key Exchanges",
               Designs, Codes and Cryptography, v 2 pp 107-125, Kluwer
               Academic Publishers, 1992.

      [Firefly]
               "Photuris" is the latin name for the firefly.  "Firefly"
               is in turn the name for the USA National Security Admin-
               istration's (classified) key exchange protocol for the
               STU-III secure telephone.  Informed speculation has it
               that Firefly is based on very similar design principles.

      [OW96]   Paul C van Oorshot, Michael J Weiner, "On Diffie-Hellman
               Key Agreement with Short Exponents", work in progress.    -

      [Prime Commandment]
               A derivation of an apocryphal quote from the usenet list  |
               sci.crypt.                                                |

      [PO96]   Bart Preneel, Paul C van Oorshot, "...Two MACs", work in  |
               progress.

      [RFC-768]
               Postel, J., "User Datagram Protocol", STD 6, August 1980.

      [RFC-1321]
               Rivest, R., "The MD5 Message-Digest Algorithm", RFC-1321, +
               MIT Laboratory for Computer Science, April 1992.

      [RFC-1510]
               Kohl, J., Neuman, B., "The Kerberos Network Authentica-
               tion Service (V5)", September 1993.

      [RFC-1700]
               Reynolds, J., and Postel, J., "Assigned Numbers", STD 2,
               USC/Information Sciences Institute, October 1994.

      [RFC-1812]
               Baker, F., Editor, "Requirements for IP Version 4         +
               Routers", Cisco Systems, June 1995.

      [RFC-1825]
               Atkinson, R., "Security Architecture for the Internet
               Protocol", Naval Research Laboratory, July 1995.

      [RFC-1828]
               Metzger, P., Simpson, W., "IP Authentication using Keyed
               MD5", July 1995.



Karn & Simpson            expires in six months                [Page 75]


DRAFT                           Photuris                      April 1996


      [RFC-1829]
               Karn, P., Metzger, P., Simpson, W., "The ESP DES-CBC
               Transform", July 1995.

      [RFC-xxxx]
               Karn, P., and Simpson, W., "ICMP Security Failures Mes-   +
               sages", draft-ietf-ipsec-icmp-fail-01.txt, work in        +
               progress.

      [Rooij94]
               P. de Rooij, "Efficient exponentiation using precomputa-
               tion and vector addition chains", EUROCRYPT '94, pp
               403-415.

      [Schneier95]
               Schneier, B., "Applied Cryptography Second Edition", John
               Wiley & Sons, New York, NY, 1995.  ISBN 0-471-12845-7.

      [Schnorr91]
               Schnorr, C.P., "Efficient signature generation by smart   |
               cards", Cryptology, v 4 pp 161-174, 1991.                 -






























Karn & Simpson            expires in six months                [Page 76]


DRAFT                           Photuris                      April 1996


   Contacts                                                              |

      Comments should be submitted to the photuris@majordomo.soscorp.com +
      mailing list.                                                      +

      Questions about this memo can also be directed to:                 -

         Phil Karn
         Qualcomm, Inc.
         6455 Lusk Blvd.
         San Diego, California  92121-2779

             karn@qualcomm.com                                           +
             karn@unix.ka9q.ampr.org (preferred)                         +


         William Allen Simpson
         Daydreamer
         Computer Systems Consulting Services
         1384 Fontaine
         Madison Heights, Michigan  48071

             wsimpson@UMich.edu                                          |
             wsimpson@GreenDragon.com (preferred)                        |
             bsimpson@MorningStar.com                                    |


























Karn & Simpson            expires in six months                [Page 77]


Html markup produced by rfcmarkup 1.129c, available from https://tools.ietf.org/tools/rfcmarkup/