view Side-By-Side changes
Network Working Group R.Droms (Editor)Droms, Editor INTERNET DRAFT Bucknell University Obsoletes:draft-ietf-dhc-authentication-01.txt Februarydraft-ietf-dhc-authentication-02.txt November 1996 ExpiresAugust 1996May 1997 Authentication for DHCP Messages<draft-ietf-dhc-authentication-02.txt><draft-ietf-dhc-authentication-03.txt> Status of this memo 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 inappropriate to use Internet-Drafts as reference material or to cite them other than as ``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), munnari.oz.au (Pacific Rim), ds.internic.net (US East Coast), or ftp.isi.edu (US West Coast). Abstract The Dynamic Host Configuration Protocol (DHCP) [1] provides a framework for passing configuration information to hosts on a TCP/IP network. In some situations, network administrators may wish to constrain the allocation of addresses to authorized hosts. Additionally, some network administrators may wish to provide forclientauthentication ofDHCP messages from DHCP servers. The goalthe source and contents ofthis proposal is to suggestDHCP messages. This document defines atechniquenew DHCP option through which authorization tickets can be easily generated and newly attached hosts with proper authorization can be automatically configured from an authenticated DHCP server. 1. Introduction DHCP transports protocol stack configuration parameters from centrally administered servers to TCP/IP hosts. Among those parameters are an IP address. DHCP servers can be configured to dynamically allocate addresses from a pool of addresses, eliminating a manual step in configuration of TCP/IP hosts. Droms [Page 1] DRAFT Authentication for DHCP MessagesFebruaryNovember 1996In some situations, network administrators may wish to constrain the allocation of addresses to authorized hosts. Such constraint may be desirable in "hostile" environments where the network medium is not physically secured, such as wireless networks or college residence halls. Additionally, someSome network administrators may wish to provide authentication of the source and contents of DHCPmessages from DHCP servers. In some environments,messages. For example, clients may be subject to denial of service attacks through the use of bogus DHCP servers, or may simply be misconfigured due to unintentionally instantiated DHCP servers.The goalNetwork administrators may wish to constrain the allocation ofthis proposal isaddresses tosuggest a technique through which authorization tickets can be easily generated and newly attachedauthorized hostswith proper authorization can be automatically configured from an authenticated DHCP server. Overview The idea behind this proposal is to use well-known techniquestoauthenticate the source and contentsavoid denial ofDHCP messages. Each authenticated DHCP message will include an encrypted value generated byservice attacks in "hostile" environments where thesourcenetwork medium is not physically secured, such as wireless networks or college residence halls. This document defines amessagetechnique that can provide both entity authenticationcode (MAC),andwill contain amessagedigest confirmingauthentication. 1.1 Requirements Throughout this document, the words that are used to define themessage contents have not been altered in transit. There is one "feature"significance ofDHCPparticular requirements are capitalized. These words are: o "MUST" This word or the adjective "REQUIRED" means thatcomplicatestheauthentication of DHCP messages. DHCP clients use limited broadcast for all messages. To allow for deliveryitem is an absolute requirement ofDHCP messages to serversthis specification. o "MUST NOT" This phrase means thatare not on the same subnet, a DHCP relay agent onthesame subnet asitem is an absolute prohibition of this specification. o "SHOULD" This word or theclient receivesadjective "RECOMMENDED" means that there may exist valid reasons in particular circumstances to ignore this item, but theinitial messagefull implications should be understood andforwardsthemessage on tocase carefully weighed before choosing a different course. o "SHOULD NOT" This phrase means that there may exist valid reasons in particular circumstances when theDHCP server. The relay agent changeslisted behavior is acceptable or even useful, but thecontents of two fields - 'giaddr'full implications should be understood and'hops' - inthe case carefully weighed before implementing any behavior described with this label. Droms [Page 2] DRAFT Authentication for DHCPmessage. Thus,Messages November 1996 o "MAY" This word or themessage digest, whichadjective "OPTIONAL" means that this item is truly optional. One vendor may choose tobe computed byinclude the item because a particular marketplace requires it or because it enhances the product, for example; another vendor may omit the same item. 1.2 Terminology This document uses the following terms: o "DHCP client" A DHCP clientand confirmed byor "client" is an Internet host using DHCP to obtain configuration parameters such as a network address. o "DHCP server" A DHCP server of "server"is an Internet host that returns configuration parameters to DHCP clients. 2. Format of theserver, cannot includeauthentication option The following diagram defines the'giaddr' and 'hops' fields. Messageformat of the DHCP authenticationSupposeoption: +----------+----------+----------+ | Code | Length | Protocol | +----------+----------+----------+-----------+--- | Authentication information ... +----------+----------+----------+-----------+--- The code for thesender, S, and receiver, R, share a secret key, K, where Kauthentication option isunique to any messages exchanged between STBD, andR. Sthe length field contains the length of the protocol andR are a DHCP client/server pair. S formsauthentication information fields in octets. The protocol field defines theMAC by encoding a counter value with K.particular technique for authentication used in the option. Thiscounter should be monotonically increasingdocument defines two protocols in sections 3 and 4, encoded with protocol field values 0 andlarge enough1. Protocol field values 2-254 are reserved for future use. Other protocols may be defined according tohold an NTP-format timestamp. The MAC: counter, f(K, MD(message + counter)) (where MD is a message digest function as specified below) is includedthe procedure described in section 5. 3. Protocol 0 If theDHCP message generated by S. Encoding function fprotocol field is 0, the authentication information field Droms [Page2]3] DRAFT Authentication for DHCP MessagesFebruaryNovember 1996must haveholds a simple authentication token: +----------+----------+----------+ | Code | n+1 | 0 | +----------+----------+----------+-----------+------ | Authentication token (n octets) ... +----------+----------+----------+-----------+------ The authentication token is an opaque, unencoded value known to both thecharacteristics that K cannot be deducedsender and receiver. The sender inserts the authentication token in the DHCP message and the receiver matches the token from theMACmessage to the shared token. If the authentication option is present andf(K, MD(message + counter)) can'tthe token from the message does not match the shared token, the receiver MUST discard the message. Protocol 0 may beguessed. R can then compute f(K, MD(message + counter))used toverify that S must have known K. Usingpass acounter valueplain-text password and provides only weak entity authentication and no message authentication. This protocol is useful for rudimentary protection against, e.g., inadvertently instantiated DHCP servers. DISCUSSION: The intent here is to pass a constant, non-computed token such asthe current timea plain-text password. Other types ofday can reduce the danger of replay attacks. Key management Assume thatentity authentication using computed tokens such as Kerberos tickets or one-time passwords will be defined as separate protocols. 4. Protocol 1 If theshared key, K,protocol field isdistributed1, the authentication information contains an encrypted value generated by the source as a message authentication code (MAC) to provide message authentication and entity authentication. This technique is based on theclient through some out-of-band mechanism. The client must store K locallyHMAC protocol [3] using the MD5 hash {2]. Droms [Page 4] DRAFT Authentication foruse in all authenticatedDHCPmessages.Messages November 1996 4.1 Format Theserver must knowformat of theKsauthentication information forall authorized clients. To avoid centralized management of a listprotocol 1 is: +----------+----------+----------+ | Code | n | 1 | +----------+----------+----------+----------+- | Counter (8 octets) ... +----------+----------+----------+----------+- | MAC ... +----------+----------+----------+----------+- The following definitions will be used in the description ofrandom keys, suppose Kthe authentication information foreach client is generated from some value unique to that client. That is,protocol 1: K= f(MK, unique-id), where MK is- a secretmaster key and f is an encoding function as described above. Each DHCP client must have a unique "client-id" through which its interactions withvalue shared between theDHCP server (specifically,source and destination of theaddress currently allocated tomessage Counter - theclient) can be identified. This client-id may bevalue of a 64-bit monotonically increasing counter HMAC-MD5 - the MACaddress or a manufacturer's serial number;generating function as defined by [3] and [2] The sender computes thespecific choiceMAC as described in [3]. The 'counter' field ofclient-id is leftthe authentication option MUST be set to thenetwork administrator. The client-id meetsvalue of a monotonically increasing counter and therequirements'MAC' field of theunique-id usedauthentication option MUST be set togenerate K inall 0s for theprevious paragraph. Without knowledgecomputation of themaster key MK, an unauthorized client cannot generate its own key K. The server can quickly validate an incoming message fromMAC. Because anew client by regenerating K from the client-id. For known clients, the server can choose to recoverDHCP relay agent may alter theclient's K dynamically fromvalues of theclient-id'giaddr' and 'hops' fields in the DHCP message,or can choosethe contents of those two fields MUST also be set toprecompute and cache allzero for the computation of theKsmessage digest. Using apriori. Selection of encoding function The exact encoding function is TBD. One suggestion is to borrow from DNSSEC, in whichcounter value such as theencoding function is designated bycurrent time of day (e.g., anidentifier inNTP-format timestamp [4]) can reduce themessage. The identifier then selects no encoding, a default encoding (usingdanger of replay attacks. DISCUSSION: Protocol 1 specifies thePublic Key Cryptographic Standarduse of HMAC-MD5. Use of a different technique, such asspecified in DNSSEC) which mustHMAC-SHA, will beprovided, or one of several other optional encodings. Message contents verification MD5 isspecified as awell-known mechanism for generatingseparate protocol. 4.2 Message validation To validate an incoming message, the receiver checks the 'counter' field and computes the MAC as described in [3]. If the 'counter' field does not contain adigest that can confirmvalue larger than the last value of 'counter' used by the sender, the receiver MUST discard the incoming message. The receiver MUST set thecontents'MAC' field ofa message have not been altered in transit. The only modificationthe authentication option toMD5all 0s foruse incomputation of the MAC. Because a DHCPis to require thatrelay agent may alter the values of the 'giaddr' and 'hops' fields in the DHCP message, the contents of those two fields MUST also be set toall 0s for the MD5Droms [Page3]5] DRAFT Authentication for DHCP MessagesFebruaryNovember 1996computation. Message contents Putting allzero for the computation ofthis together, S builds:the MAC. If the MAC computed by the receiver does not match the MAC contained in the authentication option, the receiver MUST discard the DHCPmessage, counter, f(K, MD5(message - ('giaddr'message. 4.3 Key utilization Each DHCP client has a key, K. The client uses its key to encode any messages it sends to the server and'hops') + counter)) where K isto authenticate and verify any messages it receives from the server. The client'skey. R can then verifykey must be initially distributed to thecontents ofclient through some out-of-band mechanism, and must be stored locally on themessage fromclient for use in all authenticated DHCP messages. Once theMD5 digest value, and verifyclient has been given its key, it may use thatSkey for all transactions even if the client's configuration changes; e.g., if the client is assigned a new network address. Each DHCP server musthave heldknow theshared secret key fromkeys for all authorized clients. If all clients use thevalue of f(K, MD5(message - ('giaddr' and 'hops') + counter)) Applicabilitysame key, clients can perform both entity andSpecification This scheme is equally applicablemessage authentication for all messages received from servers. Servers will be able to perform message authentication. To authenticate the identity of individual clients, each client must be configured with a unique key. Appendix A describes a technique for key management. 5. Definition of new authentication protocols The author ofboth DHCPv4 and DHCPv6 messages. If this mechanism is adopteda new DHCP option will follow these steps to obtain acceptance of the option as a part of the DHCP Internet Standard: 1. The author devises the new authentication protocol. 2. The author documents the new protocol as an Internet Draft. 3. The author submits the Internet Draft for review through the IETF standards process as defined in "Internet Official Protocol Standards" (STD 1). The new protocol will be submitted for eventual acceptance aspart ofan Internet Standard. 4. The new protocol progresses through theDHCPv4 or DHCPv6 specification,IETF standards process; theauthentication datanew option will beencodedreviewed by the Dynamic Host Configuration Working Group (if that group still exists), or as anoption.Internet Draft not submitted by an IETF working group. This procedure for defining new authentication protocols will ensure that: * new options are reviewed for technical correctness and appropriateness, and * documentation for new options is complete and published. Droms [Page 6] DRAFT Authentication for DHCP Messages November 1996 6. References [1] Droms, R., "Dynamic Host Configuration Protocol", RFC 1541, Bucknell University, October 1993. [2] Rivest, R., "The MD5 Message-Digest Algorithm", RFC-1321, April 1992. [3] Krawczyk H., M. Bellare and R. Canetti, "HMAC: Keyed-Hashing for Message Authentication" <draft-ietf-ipsec-hmac-md5-01.txt> (work in progress), August 1996. [4] Mills, D., "Network Time Protocol (Version 3)", RFC-1305, March 1992. 7. Acknowledgments Jeff Schiller and Christian Huitema developed this scheme during a terminal room BOF at the Dallas IETF meeting, December1996.1995. Theeditor of this documentauthor transcribed the notes from thatdiscussion.discussion, which form the basis for this document. The editor appreciates Jeff's and Christian's patience in reviewing this document and its earlier drafts. Thanks also to John Wilkins, Ran Atkinson andThomas NartenShawn Mamros for reviewinga draft ofthisproposal,document, and toShawn Mamros for noticing that the original draft neglected to accountThomas Narten forthe 'hops' field. References [1] Droms, R., "Dynamic Host Configuration Protocol", RFC 1541, Bucknell University, October 1993.reviewing earlier drafts of this document. 8. SecurityConsiderationsconsiderations Thismemodocument describes authentication and verification mechanisms forDHCP Editor's AddressDHCP. 9. Author's address Ralph Droms Computer Science Department 323 Dana Engineering Bucknell University Lewisburg, PA 17837 Phone: (717) 524-1145 EMail: droms@bucknell.edu Droms [Page4]7] DRAFT Authentication for DHCP MessagesFebruaryNovember 1996EMail: droms@bucknell.eduAppendix A - Key Management Technique To avoid centralized management of a list of random keys, suppose K for each client is generated from the pair (client identifier, subnet address), which must be unique to that client. That is, K = MD5(MK, unique-id), where MK is a secret master key and MD5 is some encoding function. Without knowledge of the master key MK, an unauthorized client cannot generate its own key K. The server can quickly validate an incoming message from a new client by regenerating K from the client-id. For known clients, the server can choose to recover the client's K dynamically from the client-id in the DHCP message, or can choose to precompute and cache all of the Ks a priori. Droms [Page5]8] ----