Network Working Group P Karn Internet Draft Qualcomm W A Simpson DayDreamer expires in six months October 1995 The Photuris Session Key Management Protocol draft-ietf-ipsec-photuris-06.txt | Status of this Memo This document is a submission to the IP Security Working Group of the Internet Engineering Task Force (IETF). Comments should be submitted to the ipsec@ans.net mailing list. Distribution of this memo is unlimited. This document is an Internet-Draft. Internet Drafts are working documents of the Internet Engineering Task Force (IETF), its Areas, and its Working Groups. Note that other groups may also distribute working 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 reference 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). Karn & Simpson expires in six months [Page i] DRAFT Photuris October 1995 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 networks. 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 protected against malicious attack or sabotage. With these criteria in mind, Photuris [Firefly] is designed: 1. for frequent exchange of short-lived individual session-keys, with a minimum of configuration and effort. 2. to support the use of a variety of authentication methods, and facilitate the exchange of many identification types. 3. to thwart certain types of denial of service attacks on host resources. Design Notes: Photuris was based on currently available tools, by experienced Karn & Simpson expires in six months [Page 1] DRAFT Photuris October 1995 network protocol designers with an interest in cryptography, rather than by cryptographers with an interest in network protocols. This specification is intended to be readily implementable without requiring an extensive background in cryptography. Therefore, only minimal background cryptographic discussion and rationale is included in this document. Although some review has been provided by the general cryptographic community, it is anticipated that design decisions and tradeoffs will be thoroughly analysed in subsequent dissertations and debated for many years to come. Implementors will find details of cryptographic hashing (such as MD5), encryption algorithms and modes (such as DES), digital signatures (such as DSS), and other algorithms in [Schneier94]. 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, as opposed to a public-key. private-key A key that is kept secret, and is part of a public/private key-pair. As used in this document, refers to RSA key pairs. public-key A publically distributable value that is part of a public/private key-pair. As used in this document, refers to RSA key pairs. secret-key A key that is not publically distributable, and not part of a 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 information such as sensitivity labelling. For further details, see [RFC-1825]. Karn & Simpson expires in six months [Page 2] DRAFT Photuris October 1995 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 frequently. shared-secret As used in this document, the calculated result of the Photuris exchange. transform A cryptographic manipulation of a particular set of data. As used in this document, refers to certain well-specified methods (which are defined elsewhere). For example, AH-MD5 [RFC-1828] transforms an IP datagram into a one-way hash, and ESP-DES-CBC [RFC-1829] transforms plaintext to ciphertext and back again. 1.2. Protocol Description The Photuris protocol consists of several simple phases: 1. A "Cookie" Exchange guards against simple flooding attacks sent | with bogus IP Sources. In addition, supported exchange schemes are offered for calculating the shared-secret. 2. A Value Exchange establishes a shared-secret between the parties. The Responder remains stateless until a shared-secret has been created. In addition, supported attributes are offered for use in the Security Associations. 3. An Identification Exchange identifies the parties to each other, and verifies the integrity of values sent in phases 1 and 2. The shared-secret provides a basis to generate separate Security Association session-keys in each direction, which are in turn used for conventional authentication or encryption. Additional security attributes are also exchanged as needed. Karn & Simpson expires in six months [Page 3] DRAFT Photuris October 1995 This exchange may also be encrypted for privacy using another permutation of the shared-secret. This protects the identities of the parties and hides the security parameter values. 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 privacy in the same fashion as above. Initiator Responder ========= ========= Cookie_Request -> <- Cookie_Response offer schemes Exchange_Request -> pick scheme offer value offer attributes <- Exchange_Response pick privacy method offer value offer attributes (generate shared-secret from exchanged values) Identification_Message -> make SPI pick key generation make session-key pick SPI attributes identify self authenticate <- Identification_Message make SPI pick key generation make session-key pick SPI attributes identify self authenticate (optional) Change_Message(s) -> <- Change_Message(s) Either party may initiate an exchange at any time. For example, the Karn & Simpson expires in six months [Page 4] DRAFT Photuris October 1995 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 two SPI values (one in each direction). The SPI is used in creating a separate session-key in each direction. When both parties initiate Photuris exchanges concurrently, or one party initiates more than one Photuris exchange, the Initiator Cookies (and UDP Ports) keep the exchanges separate. This results in more than one initial SPI for each Destination. To create multiple Security Associations with different parameters, the parties may also send Change_Messages. There is no requirement that all such outstanding SPIs be used. The sender selects an appropriate SPI for each datagram transmission. 1.3. Clogging Defense To grant access to authorized users regardless of location, it must be possible to cheaply detect and discard bogus datagrams. Otherwise, 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 management between trusted hosts at relatively little cost, given the speed of cryptographic hashing functions compared to public-key algorithms. 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 parties 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 cryptography are vulnerable to resource clogging attacks. Although a complete defense against such attacks is impossible, Photuris Karn & Simpson expires in six months [Page 5] DRAFT Photuris October 1995 features make them much more difficult. Cookie Exchange Photuris exchanges a "cookie" before initiating any public-key operations, thwarting the saboteur from using random IP Source addresses. The simple validation of this cookie uses the same level of resources as other Internet Security authentication mechanisms. This forces the attacker to: 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 does not protect against an observer that can copy a valid cookie, or an interceptor that can modify or substitute another cookie. However, these attacks are mitigated somewhat with time-variant cookies. Minimize State 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 repeating all the steps of the Photuris process. Precomputation Karn & Simpson expires in six months [Page 6] DRAFT Photuris October 1995 Once 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. Expiration All retained exchange state is subject to periodic expiration (typically 10 minutes). These LifeTimes are implementation dependent. 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 as the expired state is purged. 1.4. Traffic Anonymity Although each datagram carries a cleartext IP Destination, the | ultimate destination can be hidden by "laundering" it through an encrypted tunnel. The IP Source could be hidden in the same manner. | If the Source has been dynamically allocated, it provides no useful information to an eavesdropper. This leaves the identifying information that the parties send during the Identification Exchange. One would often like to deny this | information to an eavesdropper, especially when this would reveal the | location of a user. | The identification can be easily protected by encrypting the Identification Exchange with the shared-secret just established. This keeps a passive eavesdropper from learning the identities of the parties, either directly from the certificates or by checking signatures against a known database of public keys. The scheme is not foolproof. By posing as the Responder, an active attacker could trick the Initiator into revealing its identity. However, this active attack is considerably more difficult than passive vacuum-cleaner monitoring. Unless the attacker can steal the private/secret key belonging to the Responder, the Initiator will discover the deception when verifying the Identification Exchange. Karn & Simpson expires in six months [Page 7] DRAFT Photuris October 1995 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 transforms, and the key(s) used to authenticate, encrypt or decrypt the payload. The key management implementation usually maintains a table containing the several parameters for each concurrent Security Association. The implementation needs to access that security parameter table to determine how to process each datagram. The Security Parameters Index (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 LifeTime is usually related to the speed of the link (typically 30 to 300 seconds). The SPI can also be deleted by the SPI Owner using the Change_Message. Once the SPI has expired or been deleted, the parties cease using the SPI, and purge the associated state. The SPI LifeTime may be shorter or longer than the Exchange-Value LifeTime. These LifeTimes are not required to be related to each other. When an Exchange-Value expires (or is replaced by a newer value), the related SPIs are not affected. This is important to allow traffic to continue without interruption during new Photuris exchanges. 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 resurrection of old SPIs, implementations SHOULD remember those deleted or expired SPIs, but mark them as unusable until the shared-secret used to create them also expires. 1.6. User Support The Photuris exchange results in two kinds of state, each with Karn & Simpson expires in six months [Page 8] DRAFT Photuris October 1995 separate LifeTimes. 1) The small amount of state associated with the Photuris exchange itself. This state may be viewed as between Internet nodes. 2) The multiple Security Associations which are established. This state may be viewed as between users. 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. To provide user-oriented keying in Multi-Level Secure (MLS) environments, the nodes can initiate multiple concurrent Photuris | exchanges in each direction. Each MLS workstation MUST be capable of maintaining multiple separate 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. It has been suggested that the Photuris exchange could also be established between particular processes within the user space of a node. This is a matter for future research. Such a mechanism is outside the scope of this document. Implementation Notes: | Once exchange state has been established between nodes, repetitive exchanges can use many of the same previously computed values. 1.7. 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 configuration parameters. In this case, the receiver only knows that the message 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. Karn & Simpson expires in six months [Page 9] DRAFT Photuris October 1995 A given Destination is not necessarily in control of the selection process. In the case of multicast groups, a single node or cooperating 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 a mechanism is outside the scope of this document. Karn & Simpson expires in six months [Page 10] DRAFT Photuris October 1995 2. Protocol Details The Initiator begins a Photuris exchange when it has: 1) a datagram that it wishes to send with privacy, and has no current Photuris exchange state with the IP Destination. 2) received the ICMP message Destination Unreachable, Communication Administratively Prohibited (Type 3, Code 13). 3) received the (yet to be defined) ICMP message that indicates an expired/invalid SPI, or requirement for authentication. 4) received an Error_Message indicating that a new Cookie_Request should be sent. Other needs to initiate a Photuris exchange are likely to be a matter for considerable future debate. 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 message is received with an incorrect UDP checksum, it is silently discarded. Implementation Note: It is expected that installation of Photuris will ensure that UDP checksums are enabled for the computer operating system and later disabling by operators is prevented. Karn & Simpson expires in six months [Page 11] DRAFT Photuris October 1995 2.2. Header Format All of the messages have a format similar to the following, as transmitted left to right in network order (most significant to least significant): +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | ~ Initiator-Cookie ~ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | ~ Responder-Cookie ~ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Type | +-+-+-+-+-+-+-+-+ Initiator-Cookie 16 octets. Responder-Cookie 16 octets. Type one octet. Each message type has a unique value. Further details and differences are elaborated in the individual messages. 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 sufficient to protect against very high bit-rate flooding attacks. 2.3. Exchange Schemes 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 Karn & Simpson expires in six months [Page 12] DRAFT Photuris October 1995 each supported scheme, as indicated in the "Exchange Scheme List" Appendix. Design Notes: Although exchange schemes offer great flexibility, only a few well-chosen algorithms and parameters are specified. This provides opportunity for intensive review by the cryptographic community, reduces implementation complexity, and improves potential for interoperability. Only one exchange scheme is required to be supported, and MUST be present in every Offered-Schemes list. 2.4. Attributes Selection among several different security parameter attributes is needed to enable future implementation changes without affecting the 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. These are mixed in the same list for simplicity. The implementation can easily distinguish between the separate uses of each supported attribute, as indicated in the "Attribute List" Appendix. Each party may select one or more encryption methods. Encryption policy is in the SPI User (sender) direction. Only the sender knows whether each datagram needs privacy protection, and it uses an encryption SPI created by the receiver, in addition to an authentication SPI (as needed). When the sender needs privacy protection for a datagram, and the potential receiver has not yet created an encryption SPI, an Error_Message listing encryption attributes is sent and the original datagram is discarded. Each party may select one or more authentication methods. Authentication policy is 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 the authentication through the simple expedient of dropping all datagrams with missing or invalid Karn & Simpson expires in six months [Page 13] DRAFT Photuris October 1995 authentication, and sending an appropriate (yet to be defined) ICMP message. Implementation 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 implementation complexity, and improves potential for interoperability. Support for some attributes is required (MD5 and DES-CBC), and | SHOULD be present in every Offered-Attributes list. Where | encryption is prohibited, the DES-CBC attributes MAY be omitted. Typically, an encryption method is chosen for the primary attribute of the initial SPI. If integrity is needed, it is | recommended that an authentication method be added as an additional separate SPI. When both authentication and encryption methods 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 session-key. There is no known interaction between MD5 and DES- CBC. It is not required that a Security Association be created including every offered attribute, or that a SPI be created for every offered attribute. The authentication, compression, encryption and identification mechanisms, as well as the encapsulation mode (if any), need not be the same in both directions. 2.5. Variable Precision Numbers Many of the message fields require a value which may vary in the number of bits. These bits may not make up an integral number of octets. Each variable precision number is composed of two parts. Size two, four, or eight octets. The number of | significant bits used in the Value field. Always transmitted most significant octet first. Karn & Simpson expires in six months [Page 14] DRAFT Photuris October 1995 Size zero has no Value field; 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 | significant 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 | completeness. Value variable. 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. Always transmitted most significant octet first. Shortened forms SHOULD NOT be used when the Value includes a number | of leading zero significant bits. The Size SHOULD indicate the correct number of significant bits. | Design Notes: | The numbers are assumed to be unsigned. | The emphasis on significant bits was based on concerns that | cryptographic lengths and strengths be readily determined. This | is in contrast to the usual concern that each number have only one | unique (shortest) representation. Karn & Simpson expires in six months [Page 15] DRAFT Photuris October 1995 3. Cookie Exchange The Initiator initializes local state, and sends a Cookie_Request to the Responder. The Initiator also starts a retransmission timer. If no Cookie_Response is obtained within the time limit, the Cookie_Request is retransmitted. The Initiator-Cookie value in each such retransmission to the same IP Destination and UDP Port SHOULD be the same. On receipt of a Cookie_Request, the Responder determines if there are sufficient resources to begin another Photuris exchange. When too many SPI values are already in use for this particular peer, or some other resource limit is reached, an Error_Message is sent. Otherwise, the Responder generates a cookie, and returns it in a Cookie_Response. The Responder-Cookie value in each successive response MAY be different. Note that the Responder creates no additional state at this time. On receipt of a Cookie_Response, the Initiator validates the Initiator-Cookie. Invalid messages are silently discarded. Karn & Simpson expires in six months [Page 16] DRAFT Photuris October 1995 3.1. Cookie_Request +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | ~ Initiator-Cookie ~ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | ~ Responder-Cookie ~ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Type | +-+-+-+-+-+-+-+-+ Initiator-Cookie 16 octets. A randomized value that identifies the exchange. The Initiator will use this value to reject invalid responses. Responder-Cookie 16 octets. Unused, MUST be set to zero when transmitted, and MUST be ignored when received. Type 0 3.2. Cookie_Response +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | ~ Initiator-Cookie ~ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | ~ Responder-Cookie ~ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Type | Reserved | Offered-Schemes ... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Initiator-Cookie 16 octets. Copied from the Cookie_Request. Responder-Cookie 16 octets. A randomized value that identifies the exchange. The Responder will use this value to reject invalid requests. Karn & Simpson expires in six months [Page 17] DRAFT Photuris October 1995 Type 1 Reserved one octet. Unused, MUST be set to zero when transmitted, and MUST be ignored when received. Offered-Schemes variable. A list of one or more exchange schemes supported by the Responder, in increasing order of preference. Each value is two octets (see "Exchange Scheme Table" Appendix). The end of the list is indicated by the UDP Length. 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 must 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 calculate a cryptographic hashing function (such as MD5) over the IP Source and Destination addresses, the UDP Source and Destination ports, and a locally generated secret random value. An incoming cookie can be verified at any time by regenerating it locally from values contained in the incoming IP datagram and the local secret random value. Initiator The Initiator secret random value that affects the cookie SHOULD change for each new Photuris exchange, and is thereafter Karn & Simpson expires in six months [Page 18] DRAFT Photuris October 1995 internally cached on a per Responder basis. This provides improved synchronization and protection 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. Responder The Responder secret random value MAY remain the same for many different Initiators. Instead, the secret SHOULD be changed at the same frequency as its Exchange-Value. During the initial Cookie Exchange, the Responder regenerates its cookie for validation. The cookie is not cached per Initiator to avoid saving state during the initial Cookie Exchange. Once the Exchange_Request is received, both Initiator and Responder cookies are cached to identify the exchange. 4. Value Exchange On receipt of a valid Cookie_Response, the Initiator chooses an appropriate scheme and exchange-value, and sends an Exchange_Request. Later Cookie_Responses from the same Responder are silently discarded, until a new Cookie_Request is sent. The Initiator also starts a retransmission timer. If no valid Exchange_Response is obtained within the time limit, the same Exchange_Request is retransmitted. On receipt of an Exchange_Request, the Responder validates the Responder-Cookie and the Scheme-Choice. Whenever an invalid/expired cookie or scheme is detected by the Responder, an Error_Message is sent, and the message is discarded. When a valid Exchange_Request has been received, the Responder chooses an appropriate privacy method and an exchange-value for the indicated scheme, and sends an Exchange_Response. The Responder keeps a copy of the incoming Exchange_Request values, and its Exchange_Response. If a duplicate Exchange_Request is received, it merely resends its previous Exchange_Response, and takes no further action. Implementation Notes: Karn & Simpson expires in six months [Page 19] DRAFT Photuris October 1995 At this time, the Responder begins calculation of the shared- secret. This may take a substantial amount of time. The implementor should ensure that retransmission is not blocked by this calculation. This is not usually a problem, as retransmission timeouts typically exceed calculation time. Karn & Simpson expires in six months [Page 20] DRAFT Photuris October 1995 4.1. Exchange_Request +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | ~ Initiator-Cookie ~ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | ~ Responder-Cookie ~ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Type | Reserved | 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 Reserved one octet. Unused, MUST be set to zero when transmitted, and MUST be ignored when received. Scheme-Choice two octets. A value selected by the Initiator from the list of Offered-Schemes in the Cookie_Response. Initiator-Exchange-Value variable precision number. Provided by the Initiator for calculating a shared-secret between the parties. The 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 alignment shown is for convenience in the illustration. Initiator-Offered-Attributes variable. A list of three (minimum required) or more Security Parameter attributes supported by the Karn & Simpson expires in six months [Page 21] DRAFT Photuris October 1995 Initiator, in increasing order of preference. This list includes all attributes supported by the | Initiator. Each Responder "-Choice" selects from | this list. | The formats are specified in the "Attribute List" Appendix, where mandatory attributes are also specified. The end of the list is indicated by the UDP Length. Design Notes: Having the scheme chosen by the Initiator allows the greatest protocol 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 Initiator. 4.2. Exchange_Response +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | ~ Initiator-Cookie ~ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | ~ Responder-Cookie ~ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Type | Reserved | Privacy-Choice | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | ~ Responder-Exchange-Value ~ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Responder-Offered-Attributes ... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- Initiator-Cookie 16 octets. Copied from the Exchange_Request. Responder-Cookie 16 octets. Copied from the Exchange_Request. Karn & Simpson expires in six months [Page 22] DRAFT Photuris October 1995 Type 3 Reserved one octet. Unused, MUST be set to zero when transmitted, and MUST be ignored when received. Privacy-Choice variable. An optional encryption method selected by the Responder from the list of Initiator-Offered- Attributes in the Exchange_Request. This encryption method is used to protect the Identification_Messages and Change_Messages. It is separate from any encryption specified in later Security Associations (see "Attribute List" Appendix). When no privacy protection is in use, the value is two octets of zero. 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 illustration. Responder-Exchange-Value variable precision number. Provided by the Responder for calculating a shared-secret between the parties. The 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 alignment shown is for convenience in the illustration. Responder-Offered-Attributes variable. A list of three (minimum required) or more Security Parameter attributes supported by the Responder, in increasing order of preference. This list includes all attributes supported by the | Responder. Each Initiator "-Choice" selects from | this list. | The formats are specified in the "Attribute List" Appendix, where mandatory attributes are also specified. The end of the list is indicated by the Karn & Simpson expires in six months [Page 23] DRAFT Photuris October 1995 UDP Length. Design Note: A single Privacy-Choice is chosen for both directions. Each privacy attribute has only one non-negotiable key generation method. These restrictions are primarily to simplify implementation. 5. Identification Exchange On receipt of a valid Exchange_Response, the Initiator begins its parallel computation of the shared-secret. When the Initiator completes computation, it sends an Identification_Message to the Responder. The Initiator also starts a retransmission timer. If no Identification_Message response is obtained within the time limit, the same Identification_Message request is retransmitted. When the Responder completes its parallel computation of the shared- secret, and upon receipt of a valid Identification_Message, it sends an Identification_Message to the Initiator. The Responder keeps a copy of the incoming Identification_Message values, and its Identification_Message. If a duplicate Identification_Message is received, it merely resends its previous Identification_Message, and takes no further action. Whenever an invalid/expired cookie or attribute is detected by the receiver, an Error_Message is sent, and the message is discarded. Implementation Notes: Calculation of the shared-secret by the Initiator and Responder is executed in parallel to minimize delay. The scheme, exchange-values, and resulting shared-secret SHOULD be cached. When multiple Photuris exchanges occur between the same parties, and the exchange-values are discovered to be unchanged, the cached shared-secret can be used to rapidly generate new session-keys. Karn & Simpson expires in six months [Page 24] DRAFT Photuris October 1995 5.1. Identification_Message +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | ~ Initiator-Cookie ~ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | ~ Responder-Cookie ~ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Type | LifeTime | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Security-Parameter-Index | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Identity-Choice | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | | ~ Verification ~ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | ~ Identification ~ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Key-Generator-Choice | Attribute-Choices ... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ... Padding | Pad Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Initiator-Cookie 16 octets. Copied from the Exchange_Request. Responder-Cookie 16 octets. Copied from the Exchange_Request. Type 4 LifeTime three octets. The number of seconds remaining before the indicated SPI expires. Must be greater than zero. Security-Parameter-Index four octets. The SPI to be used for incoming communications. Identity-Choice variable. An identity attribute is selected from the list of Offered-Attributes sent by the peer, and is used to calculate the Verification. Karn & Simpson expires in six months [Page 25] DRAFT Photuris October 1995 This method is not necessarily the same as any SPI Attribute-Choices in use. 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 illustration. Verification variable precision number. The content is specified by the Identity-Choice attribute. 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 alignment shown is for convenience in the illustration. Identification variable. The content is specified by the Identity-Choice attribute. The field may be any integral number of octets in length. It does not require any particular alignment. The 32-bit alignment shown is for convenience in the illustration. Key-Generator-Choice variable. A cryptographic hashing function is selected from the peer's list of supported Attributes, and is used to calculate the session- key. This method is not necessarily the same as any SPI Attribute-Choices in use. Although the field is depicted as 16-bits for convenience, the size may be longer, as indicated by its Length field. Attribute-Choices variable. A list of one or more attributes for the Security Association. The formats are specified in the "Attribute List" Appendix. The end of the list is indicated by the UDP Length minus the Pad Length and Padding. Padding variable. Prior to encryption, it is filled with Karn & Simpson expires in six months [Page 26] DRAFT Photuris October 1995 unspecified implementation dependent (preferably random) values, to align the Pad Length field at a boundary appropriate to the Privacy-Choice. After decryption, it MUST be ignored. Pad Length one octet. The size of the Padding field in octets. It does not include the Pad Length fields. 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 though no Privacy-Choice is specified or no Padding is required. This field is opaque. That is, the value is set prior to encryption, and is examined only after decryption. Design Notes: The Verification field is located close to the beginning of the privacy protected area, to provide a highly randomized mixture early in the bit stream before the more likely known-text Identification and Attributes which follow. Karn & Simpson expires in six months [Page 27] DRAFT Photuris October 1995 5.2. Privacy This message is encrypted using the Privacy-Choice indicated in the Exchange_Response. The chosen method need not provide integrity, as sufficient integrity is provided by the identity verification. The fields protected, the length of the Padding (if any), and other details are described for each Privacy-Choice method. A non- negotiable key generation method is used to create a special privacy session-key. See the "Attribute List" Appendix for details. The Privacy-Choice specified cryptographic hash is calculated over the following concatenated values: + the computed shared-secret, + the SPI Owner (receiver) Exchange-Value, + the SPI User (sender) Exchange-Value, + the SPI Owner (receiver) Cookie, + the SPI User (sender) Cookie, + the computed shared-secret again. Since the order of the Exchange-Values and Cookies is different in each direction, the resulting privacy session-key will usually be different in each direction. 5.3. Identity Verification The two parties now verify the identities received. The indicated Identity-Choice method is calculated over the following concatenated values: + the computed shared-secret, + the Offered-Schemes, + the SPI Owner (receiver) Exchange-Value, + the SPI User (sender) Exchange-Value, + the SPI Owner (receiver) Offered-Attributes, + the SPI User (sender) Offered-Attributes, + the Type, LifeTime and SPI, + the Identification (see notes below), + the contents of the message following the Identification, + the authentication secret-key (if any), + the computed shared-secret again. Note that the order of the Exchange-Values and Offered-Attributes is different in each direction. The SPI and Identification are also likely to be different in each direction. Karn & Simpson expires in six months [Page 28] DRAFT Photuris October 1995 If identity verification fails, the users are notified, an Error_Message is sent, and the Security Association is destroyed. On success, normal operation begins with the authentication and/or encryption of user datagrams. Implementation Notes: 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 discarded. The exact details of the Identification that are included in the verification calculation are dependent on the Identity-Choice. | See the "Attribute List" Appendix for details. 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 | Error_Message as failure of the verification computation. As previously noted, the purpose of verification is to protect | against an insertion or modification attack. To provide anonymity | for mobile nodes, the identity is not coupled with or restricted | to any particular IP address. | Each party implements 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 policy considerations are outside the scope of this document. 5.4. Session-Key Computation Each SPI session-key is generated from the Key-Generator-Choice cryptographic hash calculated over the following concatenated values: Karn & Simpson expires in six months [Page 29] DRAFT Photuris October 1995 + the computed shared-secret, + the SPI Owner (receiver) Identity Verification, + the SPI User (sender) Identity Verification, + the SPI Owner (receiver) Cookie, + the SPI User (sender) Cookie, + the SPI, + the computed shared-secret again. Since the SPI is likely to be different in each direction, and the order of the Identity Verification and Cookie fields is different in each direction, the resulting session-key will usually be different in each direction. Karn & Simpson expires in six months [Page 30] DRAFT Photuris October 1995 6. Other Message Types The need for these messages has been indicated in previous processing descriptions. Details of use follow each message. 6.1. Change_Message +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | ~ Initiator-Cookie ~ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | ~ Responder-Cookie ~ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Type | LifeTime | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Security-Parameter-Index | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Validity-Choice | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | | ~ Verification ~ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Key-Generator-Choice | Attribute-Choices ... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ... Padding | Pad Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Initiator-Cookie 16 octets. Copied from the Exchange_Request. Responder-Cookie 16 octets. Copied from the Exchange_Request. Type 5 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 communications. This may be a new SPI value (for creation), or an existing SPI value (for deletion). Karn & Simpson expires in six months [Page 31] DRAFT Photuris October 1995 The value zero indicates all old SPIs for this IP Destination (typically used for deletion). Validity-Choice variable. A cryptographic hashing function is selected from the peer's list of supported Attributes, and used to provide message integrity. This method is not necessarily the same as any SPI Attribute-Choice in use. 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 illustration. Verification variable precision number. The result of the Validity-Choice. The calculation of the value is described in the Verification section. 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 alignment shown is for convenience in the illustration. Key-Generator-Choice variable. A cryptographic hashing function is selected from the peer's list of supported Attributes, and is used to calculate the session- key. This method is not necessarily the same as any SPI Attribute-Choices in use. Although the field is depicted as 16-bits for convenience, the size may be longer, as indicated by its Length field. Attribute-Choices variable. A list of one or more attributes for the Security Association, selected from the list of Attributes sent by the peer. The formats are specified in the "Attribute List" Appendix. The end of the list is indicated by the UDP Length minus the Pad Length and Padding. Karn & Simpson expires in six months [Page 32] DRAFT Photuris October 1995 Padding variable. Prior to encryption, it is filled with unspecified implementation dependent (preferably random) values, to align the Pad Length field at a boundary appropriate to the Privacy-Choice. After decryption, it MUST be ignored. Pad Length one octet. The size of the Padding field in octets. It does not include the Pad Length fields. 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 though no Privacy-Choice is specified or no Padding is required. This field is opaque. That is, the value is set prior to encryption, and is examined only after decryption. At any time after completion of the Identification Exchange, either party can send a Change_Message. The message has effect in only one direction, from the SPI Owner to the SPI User. This message is required to be encrypted for privacy in the same fashion chosen for the Identification_Messages. Whenever an invalid/expired cookie or attribute is detected by the receiver, an Error_Message is sent, and the message is discarded. 6.1.1. Creation This message can be used to create a new Security Association. Frequently, this message is used to create a separate authentication SPI when the initial SPI was used for encryption. 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. A new session-key is calculated using the Key-Generator-Choice in the same fashion as the Identification_Message, although the Key- Generator-Choice method may be different. Since the SPI value is always different than any previous SPI during the lifetime of the shared-secret, the resulting session-key will necessarily be different from all others used in the same direction. Karn & Simpson expires in six months [Page 33] DRAFT Photuris October 1995 When the peer's cookie or public-value has expired, it will send an Error_Message response. When the peer finds that too many SPI values are already in use for this party, or some other resource limit is reached, it will send an Error_Message response. 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 from the Cookie_Request. 6.1.2. Deletion This message can be used to delete existing Security Associations. This is especially useful when all associations need deletion, such as when the application that needed them terminates. No retransmission timer is necessary. Should all deletion attempts fail, eventually the peer will expire all existing SPIs through the normal LifeTime, and will begin the Photuris exchange again from the Cookie_Request. 6.1.3. Modification This message cannot be used to modify existing Security Associations, such as lengthen an existing SPI LifeTime, resurrect an expired SPI, alter the Key-Generator-Choice, or add or remove an Attribute-Choice. On receipt, such an otherwise valid message is silently discarded. 6.1.4. Integrity Verification This message requires independent verification of integrity, to prevent malicious forgery of Security Attributes after the more computationally intensive Identification Exchange. The indicated Validity-Choice is calculated over the following concatenated values: Karn & Simpson expires in six months [Page 34] DRAFT Photuris October 1995 + the computed shared-secret, + the SPI Owner (receiver) Identity Verification, + the SPI User (sender) Identity Verification, + the SPI Owner (receiver) Cookie, + the SPI User (sender) Cookie, + the contents of the message beginning with the Type field, + the computed shared-secret again. Note that the order of the Identity Verification and Cookie fields is different in each direction. If the verification fails, the users are notified, and an Error_Message is sent, without adding or deleting any Security Associations. On success, normal operation begins with the authentication and/or encryption of user datagrams. Implementation Notes: The Verification value is calculated prior to encryption for privacy, and verified after decryption. The Verification field is treated as zero during the calculation of the Validity-Choice. The Verification value is different from the SPI session-key that is created. However, the initial octets of the concatenated values are the same, and the implementor may save some calculation effort when the generating methods are the same. Separate external and internal verification of the expected Cookies prevents clogging by replay of earlier Change_Messages. Karn & Simpson expires in six months [Page 35] DRAFT Photuris October 1995 6.2. Error_Message +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | ~ Initiator-Cookie ~ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | ~ Responder-Cookie ~ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Type | Code | Attributes-Needed ... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- Initiator-Cookie 16 octets. Copied from the offending message. Responder-Cookie 16 octets. Copied from the offending message. Type 7 Code Indicates the problem: 0 implementation error 1 invalid/expired 2 resource limit 3 verification failure 4 need attributes Attributes-Needed variable. A list of zero or more attributes (for Code 4). The formats are specified in the "Attribute List" Appendix. The end of the list is indicated by the UDP Length. Issued in response to Photuris state loss or other problems. The message has effect in only one direction. No retransmission timer is necessary. This message is not encrypted for privacy in the fashion described for the Identification_Message. The receiver checks the Cookies for validity. Invalid messages are silently discarded. Karn & Simpson expires in six months [Page 36] DRAFT Photuris October 1995 6.2.1. Implementation Error This Error_Message Code is sent when a scheme or an attribute is received which was not offered, or is not allowed for the feature specified. When this Code is received, the implementation SHOULD log the occurance, and notify an operator as appropriate. 6.2.2. Invalid/Expired This Error_Message Code is sent when certain Photuris messages are received (as indicated in their accompanying description), and the receiver's cookie is invalid or the associated public-value has expired. When this Code is received, which was not itself discarded for invalid/expired Cookies, the shared-secret and other state between the parties is purged, and a new Cookie_Request is sent instead. However, existing SPIs are not deleted. They expire normally, and are purged sometime later. 6.2.3. Resource Limit This Error_Message Code is sent when a Cookie_Request or Change_Message is received, and too many SPI values are already in use for that peer, or some other Photuris resource is unavailable. When this Code is received, the party SHOULD NOT instantiate another SPI until it has deleted an existing SPI, or waited for a cached SPI entry to expire. 6.2.4. Verification Failure This Error_Message Code is sent when an Identification_Message or Change_Message is received, and verification fails. When this Code is received, the implementation SHOULD log the occurance, and notify an operator as appropriate. Karn & Simpson expires in six months [Page 37] DRAFT Photuris October 1995 6.2.5. Need Attributes This Error_Message Code is sent when a party needs particular attributes for a datagram (such as encryption), and the peer has not yet created a Security Association (SPI) that has those attributes. The missing attributes are included in the Error_Message. When this Code is received, the party SHOULD send a Change_Message that includes the necessary attributes. Karn & Simpson expires in six months [Page 38] DRAFT Photuris October 1995 7. Public Key Exchanges Photuris is based on public-key cryptography, specifically 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 Security, 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 generate 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 [Schneier94]. 7.1. Perfect Forward Secrecy Many security breaches in cryptographic systems have been facilitated by designs that generate traffic-encrypting keys (or their equivalents) 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 an RSA key- pair) to encrypt session-keys or actual traffic. Such keys should be used solely for authentication purposes. All keys for traffic encryption should be randomly generated immediately 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, Karn & Simpson expires in six months [Page 39] DRAFT Photuris October 1995 as defined by Diffie [Diffie90], using a combination of Diffie- Hellman (for key exchange) and authentication, as follows: 1. Agree on a shared-secret using the Diffie-Hellman algorithm. 2. Authenticate the Diffie-Hellman exchanges. This authenticates the parties to each other, thwarting the "man in the middle" active attack against Diffie-Hellman. When the shared-secret generated in step 1 is eventually destroyed, it is unrecoverable. Theft of the private/secret key used to sign the exchanges in step 2 would allow the thief to impersonate the party in future conversations, but it would not decode any past traffic that might have been recorded. 7.2. Modular Exponentiation Groups The original Diffie-Hellman technique 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 two of these values are exchanged between parties, the parties can calculate a shared-secret value between themselves. 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. In general, small secret exponent values should not be used. The cryptographic strength of the resulting shared-secret is one-half of the length of the smallest exponent used. Each modular exponentiation prime (p) must have the property that both p and (p-1)/2 are prime. A small set of such recommended strong primes for use as Photuris moduli are specified. Use of a very limited number of moduli (preferably one) has one minor and two very significant advantages: Overhead Avoiding the overhead of sending the full modulus. Karn & Simpson expires in six months [Page 40] DRAFT Photuris October 1995 Prime and Generator Pair Selection Discovery of strong primes is extremely computationally intensive, and practically impossible for commercially available processors to find in a reasonable interactive time. Thus, the primes used will be well-known, and embedded in the implementations. The generator (g) should be chosen such that the secret exponents will generate all possible public exponential values, evenly distributed throughout the range, without cycling through a smaller subset. Such a generator is called a "primitive root" (which is trivial to find when p is strong) [??? reference]. When the strong prime and generator pair are well chosen, the difficulty of a discrete log attack is maximized. By choosing the pairs in advance, thorough analysis of the pair characteristics is possible. This analysis can promote confidence in the security of the implementations. Precomputation Each party can precompute the D-H exchange-value. A background process can periodically destroy the old values, generate a new random secret exponent, and recalculate the exchange-value. This limits the exposure of both the secret exponent and shared-secret, as past secrets are not kept for possible discovery by a future intrusion, protecting earlier communications. 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 speeds up the apparent execution speed of the Photuris protocol. It also reduces CPU loading sufficiently to allow a single public/private key-pair to be used in several closely spaced Photuris executions, when creating Security Associations with several different hosts over a short period of time. Other precomputation suggestions are described in [BGMW93]. 7.3. Elliptic Curve Groups The points on an elliptic curve form a group under addition. This group can be used as the basis for the efficient implementation of Karn & Simpson expires in six months [Page 41] DRAFT Photuris October 1995 the Diffie-Hellman operations. To uniquely specify the computation, the implementor must know the finite field for representation of the point coordinates, the elliptic curve, and the generator. The elliptic curve addition formulas are more complicated than straight-forward component-wise addition, and the use of finite fields further complicates the description of the algorithms. A good reference for a succinct description of elliptic curves with finite fields is [P1363]; a more general treatment can be found in [Menezes]. Note that while the literature uses the term "addition" for the group operation, it is directly analogous to "multiplication" in modular exponentiation groups. Thus, the analogous term for "g**r" is "r*g" (that is, the scalar multiple r of g). The generator is specified as the (x,y) coordinates of an elliptic curve point, and the representation of x and y is given with respect to a finite field. Multiples of the generator are (x,y) pairs. Thus, the Initiator and Responder Exchange-Values are to be interpreted as two concatenated bit values in the order (x,y). The lengths of the numbers are implicit in the specification of the field. The field representation is uniquely determined by the irreducible polynomial specified in the group description. See the "Exchange Scheme Table" Appendix for details. Use of a very limited number of fields has similar advantages to those cited for modular exponentiation: reduced overhead, generator selection, and precomputation of the exchange-values. 7.4. Exponent Selection There is surprisingly little guidance in the literature about the length of the randomly chosen secret exponents. The size of these exponents dramatically affects the speed of Diffie-Hellman operations. It is desirable to use the smallest random exponent that is consistent with good security. The strength of the shared-secret is dependent on the work factor for solving the secret exponents. Revealing the exponent(s) of either party will unravel the shared-secret. Each party depends upon the other to provide sufficiently strong exponents. The most conservative advice received to date [Hellman95] is to make Karn & Simpson expires in six months [Page 42] DRAFT Photuris October 1995 the random exponents twice as long as the strength required of the intended session-key. This ensures that any space/time "meet in the middle" attack on the discrete logarithm problem will be at least as complex as a brute-force search on the resulting session-key space. Different attributes require different levels of session-key strength. Each party should use exponent(s) that provide the strength required for the strongest offered attribute. Implementation Notes: 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. The size of the exponent is entirely implementation dependent, is unknown to the other party, and can be easily changed. Karn & Simpson expires in six months [Page 43] DRAFT Photuris October 1995 A. Exchange Scheme Table The Exchange Scheme takes the form of a small index into a well-known table. Since only the first few indices will be published, the remaining values may be used by cooperating parties to indicate private schemes. (1) Implementation Optional. Elliptic curve: curve: y^2 + xy = x^3 + 0x7338F generator: (0x7B, 0x1C8) irreducible polynomial: u^155 + u^62 + 1 Provides 155 bits of keying material (in 160 bits). The cryptographic strength is 155/2 bits. Supplied by Hilarie Orman . (2) Implementation Required. A 1024-bit strong prime (p), expressed in hex: 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. Provides 1024 bits of keying material. The cryptographic strength is length/2 of the shortest exponent used. This prime was randomly generated by a freely available program written by the author. (3) Reserved. (4) Reserved. (5) Implementation Optional. A 1024-bit strong prime (p), expressed in hex: Karn & Simpson expires in six months [Page 44] DRAFT Photuris October 1995 a478 8e21 84b8 d68b fe02 690e 4dbe 485b 17a8 0bc5 f21d 680f 1a84 1313 9734 f7f2 b0db 4e25 3750 018a ad9e 86d4 9b60 04bb bcf0 51f5 2fcb 66d0 c5fc a63f bfe6 3417 3485 bbbf 7642 e9df 9c74 b85b 6855 e942 13b8 c2d8 9162 abef f434 2435 0e96 be41 edd4 2de9 9a69 6163 8c1d ac59 8bc9 0da0 69b5 0c41 4d8e b865 2adc ff4a 270d 567f The recommended generator (g) for this prime is 5. Provides 1024 bits of keying material. The cryptographic strength is length/2 of the shortest exponent used. This prime was randomly generated by a freely available program written by the author. (6) Reserved. (7) Reserved. (8) Implementation Optional. A 2048-bit strong prime (p), expressed in hex: 72a9 25f7 60b2 f954 ed28 7f1b 0953 f3e6 aef9 2e45 6172 f9fe 86fd d882 2241 b9c9 788f bc28 9982 743e fbcd 2ccf 062b 242d 7a56 7ba8 bbb4 0d79 bca7 b8e0 b6c0 5f83 5a5b 938d 9858 16bc 6489 85ad cff5 402a a767 56b3 6c84 5a84 0a1d 059c e027 07e1 9cf4 7af0 b5a8 82f3 2315 c19d 1b86 a56c 5389 c5e9 bee1 6b65 fde7 b1a8 d74a 7675 de9b 707d 4c5a 4633 c029 0c95 ff30 a605 aeb7 ae86 4ff4 8370 f13c f01d 49ad b9f2 3d19 a439 f753 ee77 03cf 342d 87f4 3110 5c84 3c78 ca4d f639 931f 3458 fae8 a94d 1687 e99a 76ed 99d0 ba87 189f 42fd 31ad 8262 c54a 8cf5 914a e6c2 8c54 0d71 4a5f 6087 a171 fb74 f481 4c6f 968d 7238 6ef3 56a0 5180 c3be c7dd d5ef 6fe7 6b1f 717b The recommended generator (g) for this prime is 2. Karn & Simpson expires in six months [Page 45] DRAFT Photuris October 1995 Provides 2048 bits of keying material. The cryptographic strength is length/2 of the shortest exponent used. This prime was randomly generated by a freely available program written by the author. (256) Moduli-indices of 256 to 65535 are available for private use. Karn & Simpson expires in six months [Page 46] DRAFT Photuris October 1995 B. Attribute List +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Type | Length | Value(s) ... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Type one octet. A unique value indicating the authentication, compression, encryption, identification, and other operational types available for exchange between the parties. Length one octet. The size of the Value field in octets. When the Type is zero, no Length field is present. Value(s) Zero or more optional values. The size of the value list is indicated by the Length field. When the Length is zero, no Value(s) field is present. Up-to-date values for the Attribute Type are specified in the most recent "Assigned Numbers" [RFC-1700]. Initial values are assigned as follows: A I K P V Type 0 padding 1 reserved + + + + 2 MD2 3 reserved + + + + 4 MD4 * * * * 5 MD5 + + + + 6 SHA 7-11 unassigned + + 12 RC2 13 reserved + + 14 RC4 + + 15 RC5 + 16 DES-CBC, 0-bit IV * 17 DES-CBC, 32-bit IV * * 18 DES-CBC, 64-bit IV 19 reserved + 20 Triple DES-CBC, 0-bit IV + 21 Triple DES-CBC, 32-bit IV + + 22 Triple DES-CBC, 64-bit IV 23 reserved + + 24 IDEA Karn & Simpson expires in six months [Page 47] DRAFT Photuris October 1995 + 25 DSS + 26 PKCS + 27 DNS-SIG certificate + 28 PGP certificate + 29 X.509 certificate chain 30-31 unassigned + 32 Sensitivity Label + 33 VJ Header Compression + 34 LZ77 + 35 Stac LZS + 36 AH-Sequence 37-254 unassigned x x x x x 255 Organizational A Initiator/Responder Attribute-Choice I Identity-Choice K Key-Generator-Choice P Privacy-Choice V Validity-Choice * algorithm must be supported + feature must be supported when algorithm optionally supported x feature may be supported when algorithm optionally supported Attributes that are required to be supported are included in this document. Other attributes are specified elsewhere. Each attribute may have value fields that are multiple octets. To facilitate processing efficiency, these fields are aligned on integral (modulo 8) octet boundaries. Padding is accomplished by insertion of 1 to 7 padding octets (Type 0) before the attribute that needs alignment. No padding is used after the final attribute in a list. Karn & Simpson expires in six months [Page 48] DRAFT Photuris October 1995 B.1. MD5 Type 5 Length 0 Key-Generator-Choice When selected as a Key-Generator-Choice, generates 128-bits of keying material. The strength of the generated key material is presumed to be the same strength as the shared-secret. Attribute-Choice When selected as an Initiator or Responder Attribute-Choice, pursuant to [RFC-1828], its SPI session-key uses the entire Key-Generator- Choice generated keying material. The strength of the generated key material is recommended to be at least 64-bits. Identity-Choice When selected as an Identity-Choice, the resulting Verification field is 128-bits (18 octets including Size). The MD5 hash is calculated as described in "Identity Verification". | The authentication secret-key (as specified) is selected based on the contents of the Identification field. The Identification field contains a variable precision number. Valid | Identifications and secret-keys are preconfigured 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 Fully Qualified Domain Name or an | email address which contains such a Domain Name. Examples include: | node.site. | user@node.site. | rcmd@node.site. | There is no requirement that the Domain Name match any of the | particular IP addresses in use by the parties. Karn & Simpson expires in six months [Page 49] DRAFT Photuris October 1995 Validity-Choice When selected as a Validity-Choice, the resulting Verification field is 128-bits (18 octets including Size). The hash is calculated as described in "Change Verification". The leading shared-secret is not padded to any particular alignment. Karn & Simpson expires in six months [Page 50] DRAFT Photuris October 1995 B.2. DES-CBC Type 16, 17 or 18 Length 0 Attribute-Choice When selected as an Initiator or Responder Attribute-Choice, pursuant to [RFC-1829], its SPI session-key uses the most significant 64-bits of Key-Generator-Choice generated material. The least significant bit of each octet is ignored (parity). The strength of the generated key material is recommended to be at least 56-bits. Privacy-Choice When selected as a Privacy-Choice, its privacy session-key always uses MD5 as the cryptographic hash over the fields specified. The most significant 64-bits of the generated hash are used. The least significant bit of each octet is ignored (parity). The strength of the shared-secret is recommended to be at least 56- bits. The 64-bit Initialization Vector (IV) is set to the Type, LifeTime, and SPI fields. Encryption begins with the next field, and continues to the end of the data indicated by the UDP Length. Karn & Simpson expires in six months [Page 51] DRAFT Photuris October 1995 B.3. Organizational +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Type | Length | OUI +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ... | Kind | Value(s) ... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Type 255 Length >= 4 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. Value(s) Zero or more optional values. The size of the value list is indicated by the Length field. When the Length is four, no Value(s) field is present. Some implementors might not need or want to publish their proprietary algorithms and attributes. This OUI mechanism is available to specify these without encumbering the IANA with proprietary number requests. Karn & Simpson expires in six months [Page 52] DRAFT Photuris October 1995 Security Considerations Security issues are the primary topic of this memo. The security of Photuris critically depends on the quality of the secret random numbers generated by each party. A poor random number generator at either party will compromise the shared-secret produced by the algorithm. Generating cryptographic quality random numbers on a general purpose computer without hardware assistance is a very tricky problem. In general, this requires using a cryptographic hashing function to "distill" the entropy from a large number of semi-random external events, such as the timing of key strokes. An excellent discussion can be found in [RFC-1750]. Each Photuris exchange generates a calculated shared-secret. The strength of the shared-secret is essential to the strength of the Security Associations. Discovery of the underlying shared-secret would compromise the Security Associations relying upon it. Therefore, the shared-secret is itself only indirectly used for creating those keys that actually protect session traffic. Discovery of one such key should not reveal related session-keys. This use of the calculated shared-secret, for message integrity, for privacy, and for creating multiple session-keys by hashing with a new SPI, substantially depends on the quality of the chosen cryptographic hashing function(s) that generate the keys. This is mitigated by carefully organized differences in calculation of the integrity, privacy, and SPI session-keys in each direction, the opportunity for varying key generation algorithms for each SPI, and the optional concealment of the algorithms chosen for each SPI. When an interceptor can modify or substitute another SPI, alteration of the SPI will interrupt communication, but the attacker will gain no additional information. The Verification method must not allow "message recovery", to prevent determination of the shared-secret or any long-term distributed secret-key (where applicable). More specifically, it should not be feasible to compute any of the bits of an authenticated message from the verification value. In general, where a secret (such as the shared-secret or session- keys) is involved in any calculation, the algorithms selected should not reveal information about the secret, either directly or indirectly. Karn & Simpson expires in six months [Page 53] DRAFT Photuris October 1995 The modular exponentiation, elliptic curve, and key generation algorithms provide a differing number of bits of keying material. It is important to distinguish the characteristics of these bits. A. The length of the shared-secret depends on the modulus or field size. B. The strength of the shared-secret depends on the minimum exponent size used by either party. C. The length of the generated keying material depends on the details of the key generation algorithm. D. The strength of the generated keying material depends on the strength of the shared-secret, and is limited by the length of the generated keying material itself. E. The length of the session-key used by a transform depends on the details of the transform. F. The strength of the session-key used by a transform depends on the strength of the keying material, and is limited by the length of the session-key used by the transform itself. Use of an exponent(s) or a key generation algorithm that produces less strength than required for a selected transform results in less robust security than would otherwise be expected. It is the responsibility of the implementor to choose a useful set of attributes for each Security Association, that provide the best tradeoff of security and performance for a given application. In general, when more than one attribute providing the same function is offered, the strongest algorithm should be selected. 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 is principally responsible for the design of the protocol phases, particularly the clogging defense, and initial internet security protocol implementation experience spanning more than 4 years. William Simpson was responsible for adding attributes, other message Karn & Simpson expires in six months [Page 54] DRAFT Photuris October 1995 types, editing and formatting. All such mistakes are his responsibity. This protocol was later discovered to have many elements in common with the Station-To-Station authentication protocol, described in [DOW92]. Hilarie Orman provided text regarding elliptic curves, and extensive review of the protocol details. Paul C van Oorschot suggested signing both the public exponents and the session-key, to provide an authentication-only version of identity verification. Randall Atkinson, Cheryl Madson, James Hughes, Angelos Keromytis, Perry Metzger, Ron Rivest, and Bill Sommerfeld provided 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. [Diffie90] Whitfield Diffie, "Authenticated Key Exchange and Secure Interactive Communication", Northern Telecom, Securicom '90, Paris France, 16 March 1990. [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 Administration's (classified) key exchange protocol for the STU-III secure telephone. Informed speculation has it that Firefly is based on very similar design principles. [Hellman95] Martin Hellman, personal communication. * [Menezes] Alfred J. Menezes, "Elliptic Curve Public Key Karn & Simpson expires in six months [Page 55] DRAFT Photuris October 1995 Cryptosystems", Kluwer Academic Publishers, 1993. [P1363] Alfred J. Menezes, Minghua Qu, and Scott A. Vanstone, "Standard for RSA, Diffie-Hellman and Related Public Key Cryptography", Working Draft of IEEE P1363 Standard, Oct. 30, 1994. http://www.rsa.com/pub/p1363/draft/ | [Prime Commandment] | A derivation of an apocryphal quote from the usenet | sci.crypt. [RFC-768] Postel, J., "User Datagram Protocol", STD 6, August 1980. | [RFC-1510] | Kohl, J., Neuman, B., "The Kerberos Network Authentication | Service (V5)", September 1993. [RFC-1700] Reynolds, J., and Postel, J., "Assigned Numbers", STD 2, | USC/Information Sciences Institute, October 1994. [RFC-1750] Eastlake, Crocker & Schiller, "Randomness Recommendations for Security", December 1994. [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. [RFC-1829] Karn, P., Metzger, P., Simpson, W., "The ESP DES-CBC | Transform", July 1995. [Schneier94] Schneier, B., "Applied Cryptography", John Wiley & Sons, New York, NY, 1994. ISBN 0-471-59756-2. Author's Address(es) Questions about this memo can also be directed to: Karn & Simpson expires in six months [Page 56] DRAFT Photuris October 1995 Phil Karn Qualcomm, Inc. 6455 Lusk Blvd. San Diego, California 92121-2779 karn@qualcomm.com karn@unix.ka9q.ampr.org (prefered) William Allen Simpson Daydreamer Computer Systems Consulting Services 1384 Fontaine Madison Heights, Michigan 48071 Bill.Simpson@um.cc.umich.edu bsimpson@MorningStar.com (prefered) Karn & Simpson expires in six months [Page 57] DRAFT Photuris October 1995 Table of Contents 1. Introduction .......................................... 1 1.1 Terminology ..................................... 2 1.2 Protocol Description ............................ 3 1.3 Clogging Defense ................................ 5 1.4 Traffic Anonymity ............................... 7 1.5 Security Parameters ............................. 8 1.6 User Support .................................... 8 1.7 Multicast Support ............................... 9 2. Protocol Details ...................................... 11 2.1 UDP ............................................. 11 2.2 Header Format ................................... 12 2.3 Exchange Schemes ................................ 12 2.4 Attributes ...................................... 13 2.5 Variable Precision Numbers ...................... 14 3. Cookie Exchange ....................................... 16 3.1 Cookie_Request .................................. 17 3.2 Cookie_Response ................................. 17 3.3 Cookie Generation ............................... 18 4. Value Exchange ........................................ 19 4.1 Exchange_Request ................................ 21 4.2 Exchange_Response ............................... 22 5. Identification Exchange ............................... 24 5.1 Identification_Message .......................... 25 5.2 Privacy ......................................... 28 5.3 Identity Verification ........................... 28 5.4 Session-Key Computation ......................... 29 6. Other Message Types ................................... 31 6.1 Change_Message .................................. 31 6.1.1 Creation ........................................ 33 6.1.2 Deletion ........................................ 34 6.1.3 Modification .................................... 34 6.1.4 Integrity Verification .......................... 34 6.2 Error_Message ................................... 36 6.2.1 Implementation Error ............................ 37 6.2.2 Invalid/Expired ................................. 37 6.2.3 Resource Limit .................................. 37 6.2.4 Verification Failure ............................ 37 6.2.5 Need Attributes ................................. 38 7. Public Key Exchanges .................................. 39 Karn & Simpson expires in six months [Page ii] DRAFT Photuris October 1995 7.1 Perfect Forward Secrecy ......................... 39 7.2 Modular Exponentiation Groups ................... 40 7.3 Elliptic Curve Groups ........................... 41 7.4 Exponent Selection .............................. 42 APPENDICES ................................................... 44 A. Exchange Scheme Table ................................. 44 B. Attribute List ........................................ 47 B.1 MD5 ............................................. 49 B.2 DES-CBC ......................................... 51 B.3 Organizational .................................. 52 SECURITY CONSIDERATIONS ...................................... 53 ACKNOWLEDGEMENTS ............................................. 54 REFERENCES ................................................... 55 AUTHOR'S ADDRESS ............................................. 56