Network Working Group D.L. Mills
Request for Comments: 1004 University of Delaware
April 1987
A Distributed-Protocol Authentication Scheme
1. Introduction and Overview
This document suggests mediated access-control and authentication procedures suitable for those cases when an association is to be set up between multiple users belonging to different trust environments, but running distributed protocols like the existing Exterior Gateway Protocol (EGP) [2], proposed Dissimilar Gateway Protocol (DGP) [3] and similar protocols. The proposed prcedures are evolved from those described by Needham and Shroeder [5], but specialized to the distributed, multiple-user model typical of these protocols.
Mills [Page 1]
RFC 1004 April 1987
The procedures are intended for distributed systems where each user i runs a common protocol automaton using private state variables for each of possibly several associations simultaneously, one for each user j. An association is initiated by interrogating the Cookie Jar for a one-time key K(i,j), which is used to encrypt the checksum which authenticates messages exchanged between the users. The initiator then communicates the key to its associate as part of a connection establishment procedure such as described in [3].
2. Procedures
Each user i is assigned a public address A(i) and private key K(i) by an out-of-band procedure beyond the scope of this discussion. The address can take many forms: an autonomous system identifier [2], an Internet address [6] or simply an arbitrary name. However, no matter what form it takes, every message is presumed to carry both the sender and receiver addresses in its header. Each address and its access-control list is presumed available in a public directory accessable to all users, but the private key is known only to the user and Cookie Jar and is not disclosed in messages exchanged between users or between users and the Cookie Jar.
Mills [Page 2]
RFC 1004 April 1987
In the diagrams that follow all fields not specifically mentioned are unencrypted. While the natural implementation would include the address fields of the message header in the checksum, this raises significant difficulties, since they may be necessary to determine the route through the network itself. As will be evident below, even if a perpetrator could successfully tamper with the address fields in order to cause messages to be misdelivered, the result would not be a useful association.
+-----------+-----------+
| A(i) | A(C) | message header
+-----------+-----------+
| I | checksum | message ID
+-----------+-----------+
| A(i) | A(j) | assoc specifier
+-----------+-----------+
2. The Cookie Jar checks the access list to determine if the association [A(i),A(j)] is valid. If so, it rolls a random number K(i,j) and constructs the reply below. It checksums the message, encrypts the j cookie field with K(j), then encrypts it and the other fields indicated with K(i) and finally sends the reply:
Mills [Page 3]
RFC 1004 April 1987
+-----------+-----------+
| A(C) | A(i) | message header
+-----------+-----------+
| I | checksum | message ID (encrypt K(i))
+-----------+-----------+
| K(i,j) | i cookie (encrypt K(i))
+-----------+
| K(i,j) | j cookie (encrypt K(j)K(i))
+-----------+
3. Upon receipt of the reply the requestor i decrypts the indicated fields, saves the (encrypted) j cookie field and copies the i cookie field to the j cookie field, so that both cookie fields are now the original K(i,j) provided by the Cookie Jar. Then it verifies the checksum and matches the message ID with its list of outstanding requests, retaining K(i,j) for its own use. It then rolls a random number X for the j cookie field (to confuse wiretappers) and another I' for the (initial) message ID, then recomputes the checksum. Finally, it inserts the saved j cookie field in the i cookie field, encrypts the message ID fields with K(i,j) and sends the following message to its associate:
+-----------+-----------+
| A(i) | A(j) | message header
+-----------+-----------+
| I' | checksum | message ID (encrypt K(i,j))
+-----------+-----------+
| K(i,j) | i cookie (encrypt K(j))
+-----------+
| X | j cookie (noise)
+-----------+
4. Upon receipt of the above message the associate j decrypts the i cookie field, uses it to decrypt the message ID fields and verifies the checksum, retaining the I' and K(i,j) for later use. Finally, it rolls a random number J' as its own initial message ID, inserts it and the checksum in the confirm message, encrypts the message ID fields with K(i,j) and sends the message:
+-----------+-----------+
| A(j) | A(i) | message header
+-----------+-----------+
| J' | checksum | message ID (encrypt K(i,j))
+-----------+-----------+
Mills [Page 4]
RFC 1004 April 1987
5. Subsequent messages are all coded in the same way. As new data are generated the message ID is incremented, a new checksum computed and the message ID fields encrypted with K(i,j). The receiver decrypts the message ID fields with K(i,j) and discards the message in case of incorrect checksum or sequence number.
3. Discussion
Since the access lists are considered public read-only, there is no need to validate Cookie Jar requests. A perpetrator might intercept, modify and replay portions of Cookie Jar replies or subsequent messages exchanged between the associates. However, presuming the perpetrator does not know the keys involved, tampered messages would fail the checksum test and be discarded.
Mills [Page 5]
RFC 1004 April 1987
The fact that the addresses in the message headers are included in the checksum protects against playbacks with modified addresses. However, it may still be possible to destabilize an association by playing back unmodified messages from prior associations. There are several possibilities:
4. Application to EGP and DGP
This scheme can be incorporated in the Exterior Gateway Protocol (EGP) [2] and Dissimilar Gateway Protocol (DGP) [3] models by adding the fields above to the Request and Confirm messages in a straightforward way. An example of how this might be done is given in [3]. In order to retain the correctness of the state machine, it is convenient to treat the Cookie Jar reply as a Start event, with the understanding that the Cookie Jar request represents an extrinsic event which evokes that response.
Mills [Page 6]
RFC 1004 April 1987
The neighbor-acquisition strategy intended in the Dissimilar Gateway Protocol DGP follows the strategy in EGP. The stability of the EGP state machine, used with minor modifications by DGP, was verified by state simulation and discussed in an appendix to [2]. Either associate can send a Request command at any time, which causes both the sender and the receiver to reinitialize all state information and send a Confirm response. In DGP the Request operation involves the Cookie Jar transaction (messages 1 and 2) and then the Request command itself (message 3). In DGP the keys are reinitialized as well and each retransmission of a Request command is separately authenticated.
Mills [Page 7]
RFC 1004 April 1987 5. AcknowledgmentsDan Nessett and Phil Karn both provided valuable ideas and comments on early drafts of this report. Steve Kent and Dennis Perry both provided valuable advice on its review strategy.
6. References
[1] Kent, S.T., "Encryption-Based Protection for Interactive