User-based Security Model for version 3 of the Simple Network Management Protocol (SNMPv3) 09 May 1997 U. Blumenthal IBM T. J. Watson Research uri@watson.ibm.com B. Wijnen IBM T. J. Watson Research wijnen@vnet.ibm.com 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 ds.internic.net (US East Coast), nic.nordu.net (Europe), ftp.isi.edu (US West Coast), or munnari.oz.au (Pacific Rim). Abstract This document describes the User-based Security Model (USEC) for SNMP version 3 for use in the SNMPng architecture [SNMPng-ARCH]. This document defines the Elements of Procedure for providing SNMP message level security. This document also includes a MIB for remotely monitoring/managing the configuration parameters for this Security model. Blumenthal/Wijnen Expires November 1997 [Page 1] Draft User-based Security Model (USEC) for SNMPv3 May 1997 0. Change Log [version 1.0] - first version posted to the v3editors mailing list. - based on v2adv slides, v2adv items and issues list and on RFC1910 and SNMPv2u and SNMPv2* documents. - various iterations were done by the authors via private email. Blumenthal/Wijnen Expires November 1997 [Page 2] Draft User-based Security Model (USEC) for SNMPv3 May 1997 1. Introduction Please refer to the introduction of the SNMP Architectural model [SNMPng-ARCH] for an overall introduction to the SNMP components. That same document explains the terminology in the various SNMP components and documents. This memo [SNMPv3-USEC] describes the User-Based Security model as it is used within the SNMPng Architectural model. The main idea is that we use the traditional concept of a user (identified by a userName) to associate security information with. This memo describes the use of Keyed-MD5 as the authentication protocol and the use of CBC-DES as the privacy protocol. The User-based Security model however allows for other such protocols to be used instead of or concurrent with these protocols. So the description of Keyed-MD5 and CBC-DES are in separate sections. That way it shows that they are supposed to be self-contained pieces that can be replaced or supplemented in the future. 1.1. Threats Several of the classical threats to network protocols are applicable to the network management problem and therefore would be applicable to any SNMPv3 security model. Other threats are not applicable to the network management problem. This section discusses principal threats, secondary threats, and threats which are of lesser importance. The principal threats against which this SNMPv3 security model should provide protection are: - Modification of Information The modification threat is the danger that some unauthorized entity may alter in-transit SNMPv3 messages generated on behalf of an authorized user in such a way as to effect unauthorized management operations, including falsifying the value of an object. - Masquerade The masquerade threat is the danger that management operations not authorized for some user may be attempted by assuming the identity of another user that has the appropriate authorizations. Two secondary threats are also identified. The security protocols defined in this memo provide limited protection against: - Disclosure The disclosure threat is the danger of eavesdropping on the exchanges between managed agents and a management station. Protecting against this threat may be required as a matter of local policy. Blumenthal/Wijnen Expires November 1997 [Page 3] Draft User-based Security Model (USEC) for SNMPv3 May 1997 - Message Stream Modification The SNMPv3 protocol is typically based upon a connection-less transport service which may operate over any sub-network service. The re-ordering, delay or replay of messages can and does occur through the natural operation of many such sub-network services. The message stream modification threat is the danger that messages may be maliciously re-ordered, delayed or replayed to an extent which is greater than can occur through the natural operation of a sub-network service, in order to effect unauthorized management operations. There are at least two threats that an SNMPv3 security protocol need not protect against. The security protocols defined in this memo do not provide protection against: - Denial of Service An SNMPv3 security protocol need not attempt to address the broad range of attacks by which service on behalf of authorized users is denied. Indeed, such denial-of-service attacks are in many cases indistinguishable from the type of network failures with which any viable network management protocol must cope as a matter of course. - Traffic Analysis In addition, an SNMPv3 security protocol need not attempt to address traffic analysis attacks. Indeed, many traffic patterns are predictable - agents may be managed on a regular basis by a relatively small number of management stations - and therefore there is no significant advantage afforded by protecting against traffic analysis. 1.2. Goals and Constraints Based on the foregoing account of threats in the SNMP network management environment, the goals of this SNMPv3 security model are as follows. 1) The protocol should provide for verification that each received SNMPv3 message has not been modified during its transmission through the network in such a way that an unauthorized management operation might result. 2) The protocol should provide for verification of the identity of the user on whose behalf a received SNMPv3 message claims to have been generated. 3) The protocol should provide for detection of received SNMPv3 messages, which request or contain management information, whose time of generation was not recent. 4) The protocol should provide, when necessary, that the contents of each received SNMPv3 message are protected from disclosure. Blumenthal/Wijnen Expires November 1997 [Page 4] Draft User-based Security Model (USEC) for SNMPv3 May 1997 In addition to the principal goal of supporting secure network management, the design of this SNMPv3 security model is also influenced by the following constraints: 1) When the requirements of effective management in times of network stress are inconsistent with those of security, the design should prefer the former. 2) Neither the security protocol nor its underlying security mechanisms should depend upon the ready availability of other network services (e.g., Network Time Protocol (NTP) or key management protocols). 3) A security mechanism should entail no changes to the basic SNMP network management philosophy. 1.3. Security Services The security services necessary to support the goals of an SNMPv3 security model are as follows. - Data Integrity is the provision of the property that data has not been altered or destroyed in an unauthorized manner, nor have data sequences been altered to an extent greater than can occur non-maliciously. - Data Origin Authentication is the provision of the property that the claimed identity of the user on whose behalf received data was originated is corroborated. - Data Confidentiality is the provision of the property that information is not made available or disclosed to unauthorized individuals, entities, or processes. For the protocols specified in this memo, it is not possible to assure the specific originator of a received SNMPv3 message; rather, it is the user on whose behalf the message was originated that is authenticated. For these protocols, it not possible to obtain data integrity without data origin authentication, nor is it possible to obtain data origin authentication without data integrity. Further, there is no provision for data confidentiality without both data integrity and data origin authentication. The security protocols used in this memo are considered acceptably secure at the time of writing. However, the procedures allow for new authentication and privacy methods to be specified at a future time if the need arises. Blumenthal/Wijnen Expires November 1997 [Page 5] Draft User-based Security Model (USEC) for SNMPv3 May 1997 1.4. Implementation Organization The security protocols defined in this memo are implemented in three different modules and each have their specific responsibilities such that together they realize the goals and security services described above: - The timeliness module must provide for: - Protection against message delay or replay (to an extent greater than can occur through normal operation) - The authentication module must provide for: - Data Integrity, - Data Origin Authentication - The privacy module must provide for - Protection against disclosure of the message payload. The timeliness module is fixed for this User-based Security model while there is provision for multiple authentication and/or privacy modules, each of which implements a specific authentication or privacy protocol respectively. 1.4.1. Timeliness Module Section 3 (Elements of procedure) uses the time values in an SNMPv3 message to do timeliness checking. The timeliness check is only performed if authentication is applied to the message. Since the complete message is checked for integrity, we can assume that the time values in a message that passes the authentication module are trustworthy. 1.4.2. Authentication Protocol Section 6 describes the Keyed-MD5 authentication protocol which is the first authentication protocol to be used with the User-based Security model. In the future additional or replacement authentication protocols may be defined as new needs arise. This User-based Security model prescribes that the complete message is checked for integrity in the authentication module. For a message to be authenticated, it needs to pass authentication check by the authentication module and the timeliness check which is a fixed part of this User-based Security model. Blumenthal/Wijnen Expires November 1997 [Page 6] Draft User-based Security Model (USEC) for SNMPv3 May 1997 1.4.3. Privacy Protocol Section 7 describes the CBC-DES Symmetric Encryption Protocol which the first privacy protocol to be used with the User-based Security model. In the future additional or replacement privacy protocols may be defined as new needs arise. This User-based Security model prescribes that the scopedPDU is protected from disclosure when a message is sent with privacy. This User-based Security model also prescribes that a message needs to be authenticated if privacy is in use. 1.5 Mechanisms to protect against Message Replay, Delay and Redirection 1.5.1 Authoritative SNMP Engine In order to protect against message replay, delay and redirection, one of the SNMP engines involved in each communication is designated to be the authoritative engine. For messages with a GET, GETNEXT, GETBULK, SET or INFORM request as the payload, the receiver of such messages is authoritative. For messages with a SNMPv2-TRAP, RESPONSE or REPORT as the payload, the sender is authoritative. 1.5.2 The following mechanisms are used: - To protect against the threat of message delay or replay (to an extent greater than can occur through normal operation), a set of time (at the authoritative source) indicators and a request-id are included in each message generated. An SNMPv3 engine evaluates the time indicators to determine if a received message is recent. An SNMPv3 engine may evaluate the time indicators to ensure that a received message is at least as recent as the last message it received from the same source. A non-authoritative SNMPv3 engine uses received authentic messages to advance its notion of time at the remote authoritative source. An SNMPv3 engine also evaluates the request-id in received Response messages and discards messages which do not correspond to outstanding requests. These mechanisms provide for the detection of messages whose time of generation was not recent in all but one circumstance; this circumstance is the delay or replay of a Report message (sent to a receiver) when the receiver has has not recently communicated with the source of the Report message. In this circumstance, the detection guarantees only that the Report message is more recent than the last communication between source and destination of the Report message. However, Report messages do not request or contain management information, and thus, goal #3 in Section 1.2 above is met; further, Report messages can at most cause the receiver to advance its notion of time (at the source) by less than the proper amount. Blumenthal/Wijnen Expires November 1997 [Page 7] Draft User-based Security Model (USEC) for SNMPv3 May 1997 This protection against the threat of message delay or replay does not imply nor provide any protection against unauthorized deletion or suppression of messages. Also, an SNMPv3 engine may not be able to detect message reordering if all the messages involved are sent within the Time Window interval. Other mechanisms defined independently of the security protocol can also be used to detect the re-ordering replay, deletion, or suppression of messages containing set operations (e.g., the MIB variable snmpSetSerialNo [RFC1907]). - verifying that a message sent to/from one SNMPv3 engine cannot be replayed to/as-if-from another SNMPv3 engine. Included in each message is an identifier unique to the SNMPv3 engine associated with the sender or intended recipient of the message. Also, each message containing a Response PDU contains a request-id which associates the message to a recently generated request. A Report message sent by one SNMPv3 engine to a second SNMPv3 engine can potentially be replayed to another SNMPv3 engine. However, Report messages do not request or contain management information, and thus, goal #3 in Section 1.2 above is met; further, Report messages can at most cause the receiver to advance its notion of time (at the authoritative source) by less than the correct amount. - detecting messages which were not recently generated. A set of time indicators are included in the message, indicating the time of generation. Messages (other than those containing Report PDUs) without recent time indicators are not considered authentic. In addition, messages containing Response PDUs have a request-id; if the request-id does not match that of a recently generated request, then the message is not considered to be authentic. A Report message sent by an SNMPv3 engine can potentially be replayed at a later time to an SNMPv3 engine which has not recently communicated with that source engine. However, Report messages do not request or contain management information, and thus, goal #3 in Section 1.2 above is met; further, Report messages can at most cause the receiver to advance its notion of time (at the authoritative source) by less than the correct amount. This memo allows the same user to be defined on multiple SNMPv3 engines. Each SNMPv3 engine maintains a value, snmpEngineID, which uniquely identifies the engine. This value is included in each message sent to/from the engine that is authoritative (see section 1.5.1). On receipt of a message, an authoritative engine checks the value to ensure it is the intended recipient, and a non-authoritative engine uses the value to ensure that the message is processed Blumenthal/Wijnen Expires November 1997 [Page 8] Draft User-based Security Model (USEC) for SNMPv3 May 1997 using the correct state information. Each SNMPv3 engine maintains two values, engineBoots and engineTime, which taken together provide an indication of time at that engine. Both of these values are included in an authenticated message sent to/received from that engine. On receipt, the values are checked to ensure that the indicated time is within a time window of the current time. The time window represents an administrative upper bound on acceptable delivery delay for protocol messages. For an SNMPv3 engine to generate a message which an authoritative engine will accept as authentic, and to verify that a message received from that authoritative engine is authentic, such an engine must first achieve time synchronization with the authoritative engine. Blumenthal/Wijnen Expires November 1997 [Page 9] Draft User-based Security Model (USEC) for SNMPv3 May 1997 2. Elements of the Model This section contains definitions required to realize the security model defined by this memo. 2.1. SNMPv3 Users Management operations using this security model make use of a defined set of user identities. For any SNMPv3 user on whose behalf management operations are authorized at a particular SNMPv3 engine, that engine must have knowledge of that user. An SNMPv3 engine that wishes to communicate with another SNMPv3 engine must also have knowledge of a user known to that engine, including knowledge of the applicable attributes of that user. A user and its attributes are defined as follows: An octet string representing the name of the user. An octet string representing the group that the user belongs to. An indication of whether messages sent on behalf of this user can be authenticated, and if so, the type of authentication protocol which is used. One such protocol is defined in this memo: the Digest Authentication Protocol. An indication of whether messages sent on behalf of this user can be protected from disclosure, and if so, the type of privacy protocol which is used. One such protocol is defined in this memo: the Symmetric Encryption Protocol. 2.2. Replay Protection Each SNMPv3 engine maintains three objects: - snmpEngineID, which is an identifier unique among all SNMPv3 engines in (at least) an administrative domain; - engineBoots, which is a count of the number of times the engine has re-booted/re-initialized since snmpEngineID was last configured; and, - engineTime, which is the number of seconds since engineBoots was last incremented. Each SNMPv3 engine is always authoritative with respect to these objects in its own engine. It is the responsibility of a non- Blumenthal/Wijnen Expires November 1997 [Page 10] Draft User-based Security Model (USEC) for SNMPv3 May 1997 authoritative SNMPv3 engine to synchronize with the authoritative engine, as appropriate. An authoritative SNMPv3 engine is required to maintain the values of its snmpEngineID and engineBoots in non-volatile storage. 2.2.1. snmpEngineID The engineID value contained in an authenticated message is used to defeat attacks in which messages from one engine to another engine are replayed to a different engine. When an authoritative engine is first installed, it sets its local value of snmpEngineID according to a enterprise-specific algorithm (see the definition of engineID in the SNMPng Architectural model document [SNMPng-ARCH]). 2.2.2. engineBoots and engineTime The engineBoots and engineTime values contained in an authenticated message are used to defeat attacks in which messages are replayed when they are no longer valid. Through use of engineBoots and engineTime, there is no requirement for an SNMPv3 engine to have a non-volatile clock which ticks (i.e., increases with the passage of time) even when the engine is powered off. Rather, each time an SNMPv3 engine re-boots, it retrieves, increments, and then stores engineBoots in non-volatile storage, and resets engineTime to zero. When an SNMPv3 engine is first installed, it sets its local values of engineBoots and engineTime to zero. If engineTime ever reaches its maximum value (2147483647), then engineBoots is incremented as if the engine has re-booted and engineTime is reset to zero and starts incrementing again. Each time an authoritative SNMPv3 engine re-boots, any SNMPv3 engines holding that authoritative engine's values of engineBoots and engineTime need to re-synchronize prior to sending correctly authenticated messages to that authoritative engine (see Section 2.4 for (re-)synchronization procedures). Note, however, that the procedures do provide for a notification to be accepted as authentic by a receiving engine, when sent by an authoritative engine which has re-booted since the receiving engine last (re-)synchronized. If an authoritative SNMPv3 engine is ever unable to determine its latest engineBoots value, then it must set its engineBoots value to 0xffffffff. Whenever the local value of engineBoots has the value 0xffffffff, it latches at that value and an authenticated message always causes an usecStatsNotInTimeWindows authentication failure. Blumenthal/Wijnen Expires November 1997 [Page 11] Draft User-based Security Model (USEC) for SNMPv3 May 1997 In order to reset an engine whose engineBoots value has reached the value 0xffffffff, manual intervention is required. The engine must be physically visited and re-configured, either with a new snmpEngineID value, or with new secret values for the authentication and privacy protocols of all users known to that engine. 2.2.3. Time Window The Time Window is a value that specifies the window of time in which a message generated on behalf of any user is valid. This memo specifies that the same value of the Time Window, 150 seconds, is used for all users. 2.3. Error Reporting While processing a received communication, an SNMPv3 engine may determine that the message is unacceptable (see Section 3). In this case, the appropriate counter from the snmpGroup [RFC1907] or usecStatsGroup object groups is incremented and an error indication is returned to the calling module. If an SNMPv3 engine acting in the authoritative role makes such a determination and the reportableFlag indicates that a report may be generated, then after incrementing the appropriate counter, it is required to generate a message containing a report PDU, with the same userName as in the received message, and to send it to the transport address which originated the received message. For all report PDUs, except those generated due to incrementing the usecStatsNotInTimeWindows counter, the report PDU is unauthenticated. For those generated due to incrementing usecStatsNotInTimeWindows, the report PDU is authenticated only if the received message was authenticated. The reportableFlag in a message may only be set if the message contains a Get, GetNext, GetBulk, Set, Inform operation. The reportableFlag should never be set for a message that contains a Response, SNMPv2-Trap or Report operation. 2.4. Time Synchronization Time synchronization, required by a non-authoritative engine (see section 5.1.1) in order to proceed with authentic communications, has occurred when the non-authoritative engine has obtained local values of engineBoots and engineTime from the authoritative engine that are within the authoritative engine's time window. To remain synchronized, the local values must remain within the authoritative engine's time window and thus must be kept loosely synchronized with the values stored at the authoritative engine. In addition to keeping a local version of engineBoots and engineTime, a non-authoritative engine must also keep one other local variable, latestReceivedEngineTime. This value records the highest value of Blumenthal/Wijnen Expires November 1997 [Page 12] Draft User-based Security Model (USEC) for SNMPv3 May 1997 engineTime that was received by the non-authoritative engine from the authoritative engine and is used to eliminate the possibility of replaying messages that would prevent the non-authoritative engine's notion of the engineTime from advancing. Time synchronization occurs as part of the procedures of receiving a message (Section 3.2, step 7b). As such, no explicit time synchronization procedure is required by a non-authoritative engine. Note, that whenever the local value of snmpEngineID is changed (e.g., through discovery) or when a new secret is configured, the local values of engineBoots and latestReceivedEngineTime should be set to zero. This will cause the time synchronization to occur when the next authentic message is received. 2.5. SNMPv3 Messages Using this Model The syntax of an SNMPv3 message using this security model adheres to the message format defined in the SNMPng Architectural model document [SNMPng-ARCH]. The securityParameters in the message are defined as an OCTET STRING. The format of that OCTET STRING for the User-based Security model is as follows: securityParameters ::= SEQUENCE { -- global parameters engineID OCTET STRING (SIZE(12)), engineBoots Unsigned32 (0..4294967295), engineTime Unsigned32 (0..2147483647), userName OCTET STRING (SIZE(1..16)), authParameters OCTET STRING, privParameters OCTET STRING, } END The authParameters are defined by the authentication protocol in use for the message (as defined by the authProtocol column in the user's entry in the usecUserTable). The privParameters are defined by the privacy protocol in use for the message (as defined by the privProtocol column in the user's entry in the usecUserTable). 2.6 Input and Output of the User-based Security Module This section describes the inputs and outputs that the User-based Blumenthal/Wijnen Expires November 1997 [Page 13] Draft User-based Security Model (USEC) for SNMPv3 May 1997 Security module expects and produces when the Message Processing and Control module (MPC) invokes the User-base Security module for services. 2.6.1 Input and Output when generating an SNMPv3 Message When the Message Processing and Control module (MPC) invokes the User-based Security module to secure an outgoing SNMPv3 message, it must pass as arguments: this is the global data in the message. The important piece of information is the Level of Security (LoS) from which the User-based Security module determines if the message needs to be protected from disclosure and if the message needs to be authenticated. this is the message payload. The data is opaque as far as the User-based Security module is concerned. this is an implementation specific handle that identifies an entry in the usecUserTable. cached security data to be used when securing an outgoing response. If no cachedSecurityData exists, then the securityCookie is used. -- Editor's note: It is important that a response uses the same auth and priv protocols and secrets as the incoming request. The security module is not supposed to look at the PDU-type. So it seems we need to cache the protocols and secrets either as part of the securityCookie or it needs to be cached as info that is attached to the msgID. We think we prefer the latter, because the MPC also needs to cache certain info (like msgID, origin addressing info) about a message that may result in a response. So it seems we need one more in/output to the MPC. We will use this cached data in the remainder of the text, assuming that for now this is the best way to do it. -- End Editor's note Upon completion of the process, the User-based Security module will return either and error indication or the completed message with privacy and authentication applied if such was requested by the Level of Security (LoS) flags passed as part of the . 2.6.1 Input and Output when receiving an SNMPv3 Message Blumenthal/Wijnen Expires November 1997 [Page 14] Draft User-based Security Model (USEC) for SNMPv3 May 1997 When the Message Processing and Control module (MPC) invokes the User-based Security module to verify proper security of an incoming SNMPv3 message, it must pass as arguments: this is the global data in the message. The important piece of information is the Level of Security (LoS) from which the User-based Security module determines if the message has been protected from disclosure and if the message has to be checked for authentication. Another piece of information used by the User-based Security module is the Maximum Message Size (MMS) in order to calculate the MMS that a scopedPDU can use in a potential response. this is the octet string that contains the User-based Security model specific security parameters. See section 2.5 for details. this is the complete message as it was received by the Message Processing and Control module (MPC). In the case of authentication, a digest needs to be calculated over the complete message. Upon completion of the process, the User-based Security module will return either and error indication or these pieces of information/data: this is the maximum message size that a possible response PDU may use. The User-based Security module calculates this size such that there is always space available for any security parameters that need to be added to the response message. this is the group to which the user belongs. The User-base Security module retrieves this information from the usecUserTable. this is an implementation specific handle that identifies an entry in the usecUserTable. It is to be used later when a response message must be secured. cached security data to be used when securing a possible outgoing response to this request. this is the message payload. The data is opaque as far as the User-based Security module is concerned. But if the data was encrypted because privacy protection was in effect, then upon Blumenthal/Wijnen Expires November 1997 [Page 15] Draft User-based Security Model (USEC) for SNMPv3 May 1997 return from the User-based Security module the data will have been decrypted. Blumenthal/Wijnen Expires November 1997 [Page 16] Draft User-based Security Model (USEC) for SNMPv3 May 1997 3. Elements of Procedure This section describes the security related procedures followed by an SNMPv3 engine when processing SNMPv3 messages according to the User-based Security model. 3.1. Processing an Outgoing Message This section describes the procedure followed by an SNMPv3 engine whenever it generates a message containing a management operation (either a request, a response, a notification, or a report) on behalf of a user, with a particular Level of Security (LoS). 1) - If any cachedSecurityData exists for this message, then information concerning the user is extracted from the cachedSecurityData. - Otherwise, based on the information in the securityCookie, information concerning the user at the destination engineID is extracted from the Security Configuration Datastore (SCD, usecUserTable). 2) If the Level of Security (LoS) specifies that the message is to be protected from disclosure, but the user does not support both an authentication and a privacy protocol then the message cannot be sent. An error indication is returned to the calling module. 3) If the Level of Security (LoS) specifies that the message is to be authenticated, but the user does not support an authentication protocol, then the message cannot be sent. An error indication is returned to the calling module. 4) If the Level of Security (LoS) specifies that the message is to be protected from disclosure, then the octet sequence representing the serialized scopedPDU is encrypted according to the user's privacy protocol. To do so a call is made to the privacy module that implements the user's privacy protocol. Input passed to the privacy module is: the engineID of the authoritative SNMPv3 engine as it will be included in the message. the user on whose behalf the message is to be encrypted. the engineTime value as it will be included in the message. -- Editor's note: This has been added as an additional input so that the privacy protocol can use it if it so wishes/needs. Turns out that this value is a good value for the IV for DES. -- End Editor's note Blumenthal/Wijnen Expires November 1997 [Page 17] Draft User-based Security Model (USEC) for SNMPv3 May 1997 the possible cached security data if this is a response to an earlier request message. the data to be encrypted. Upon completion the privacy module must return either an error indication or: the encrypted scopedPDU (encoded as an octet string). The privacy parameters (encoded as an octet string) that need to be sent in the outgoing message. If an error indication is returned by the privacy module then the message cannot be sent and an error indication is returned to the calling module. If the privacy module returns success, then the field is put into the securityParameters and the serves as the payload of the message being prepared. 5) If the Level of Security (LoS) specifies that the message is not to be protected from disclosure, then the NULL string is encoded as an octet string into the field of the securityParameters and the scopedPDU serves as the payload of the message being prepared. 6) The engineID is encoded as an octet string into the field of the securityParameters. 7) If the Level of Security (LoS) specifies that the message is to be authenticated, then the current values of engineBoots, and engineTime corresponding to engineID from the SCD are used. Otherwise, a zero value is used for engineBoots and engineTime. The values are encoded as Unsigned32 into the and fields of the securityParameters. 8) The userName is encoded as an octet string into the field of the securityParameters. 9) If the Level of Security (LoS) specifies that the message is to be authenticated, the message is authenticated according to the user's authentication protocol. To do so, a call is made to the authentication module that implements the user's authentication protocol. Input passed to the authentication module is: the engineID of the authoritative SNMPv3 engine as it will be included in the message. the user on whose behalf the message is to be authenticated. Blumenthal/Wijnen Expires November 1997 [Page 18] Draft User-based Security Model (USEC) for SNMPv3 May 1997 the possible cached security data if this is a response to an earlier request message. the authParameters, to be filled by the authentication module. the message to be authenticated. Output expected from the authentication module is an error indication or the completed message. If an error indication is returned by the authentication module, then the message cannot be sent and an error indication is returned to the calling module. 10) If the Level of Security (LoS) specifies that the message is not to be authenticated then the NULL string is encoded as an octet string into the field of the securityParameters. 11) The completed message is returned to the calling module. 3.2. Processing an Incoming Message This section describes the procedure followed by an SNMPv3 engine whenever it receives a message containing a management operation on behalf of a user, with a particular Level of Security (LoS). 1) If the received securityParameters is not the serialization (according to the conventions of [RFC1906]) of an OCTET STRING formatted according to the securityParameters defined in section 2.5, then the snmpInASNParseErrs counter [RFC1907] is incremented, and an error indication is returned to the calling module. 2) The values of the security parameter fields are extracted from the securityParameters. 3) If the field contained in the securityParameters is unknown then: - a manager that performs discovery may optionally create a new entry in its Security Configuration Database (SCD) and continue processing; or - the usecStatsUnknownEngineIDs counter is incremented, a report PDU is generated, and an error indication is returned to the calling module. 4) Information about the value of the and fields is extracted from the local Security Configuration Database (SCD, usecUserTable). If no information is available for this user, then the usecStatsUnknownUserNames counter is Blumenthal/Wijnen Expires November 1997 [Page 19] Draft User-based Security Model (USEC) for SNMPv3 May 1997 incremented, a report PDU is generated, and an error indication is returned to the calling module. 5) If the information about the user indicates that it does not support the Level of Security indicated by the field in the globalData, then the usecStatsUnsupportedLoS counter is incremented, a report PDU is generated, and an error indication is returned to the calling module. 6) If the Lever of Security (LoS) specifies that the message is to be authenticated, then the message is authenticated according to the user's authentication protocol. To do so, a call is made to the authentication module that implements the user's authentication protocol. Input passed to the authentication module is: the engineID of the authoritative SNMPv3 engine as it was included in the message. the user on whose behalf the message is to be authenticated. the authParameters. the message to be authenticated. If the message is not authentic according to the authentication protocol module (i.e. it returns an error indication), then an error indication is returned to the calling module. Otherwise the authentication module must return these pieces of information/data: the cached security data so that it can be used later when a response to a request message must be secured. -- Editor's note: If we are not supposed to look at the PDU type, then it seems we must always cache the security data. But that then makes it problematic as to who gets rid of the cache and when..... or do we consider that an implementation issue? -- End Editor's note 7) If the field indicates an authenticated message, then the local values of engineBoots and engineTime corresponding to the value of the field are extracted from the Security Configuration Database (SCD). a) If the value is the same as the engineID of the processing SNMPv3 engine (meaning that this is the authoritative engine), then if any of the following Blumenthal/Wijnen Expires November 1997 [Page 20] Draft User-based Security Model (USEC) for SNMPv3 May 1997 conditions is true, then the message is considered to be outside of the Time Window: - the local value of engineBoots is 0xffffffff; - the field differs from the local value of engineBoots; or, - the value of the field differs from the local notion of engineTime by more than +/- 150 seconds. If the message is considered to be outside of the Time Window then the usecStatsNotInTimeWindows counter is incremented, an authenticated report PDU is generated (see section 2.3), and an error indication is returned to the calling module. b) If the value is not the same as the engineID of the processing SNMPv3 engine (meaning that this engine is not the authoritative engine), then: - if all of the following conditions are true: - if the field indicates that privacy is not in use; - the SNMPv2 operation type determined from the ASN.1 tag value associated with the PDU's component is a Report; -- Editor's note: So it turns out we do need to look at the PDU data Mmmm... this is against our own rules of cohesion and encapsulation -- End Editor's note - the Report was generated due to a usecStatsNotInTimeWindows error condition; and, - the field is greater than the local value of engineBoots, or the field is equal to the local value of engineBoots and the field is greater than the value of latestReceivedEngineTime, then the SCD entry corresponding to the value of the field is updated, by setting the local value of engineBoots from the field, the value latestReceivedEngineTime from the field, and the local value of engineTime from the field. - if any of the following conditions is true, then the message is considered to be outside of the Time Window: - the local value of engineBoots is 0xffffffff; Blumenthal/Wijnen Expires November 1997 [Page 21] Draft User-based Security Model (USEC) for SNMPv3 May 1997 - the field is less than the local value of engineBoots; or, - the field is equal to the local value of engineBoots and the field is more than 150 seconds less than the local notion of engineTime. If the message is considered to be outside of the Time Window then the usecStatsNotInTimeWindows counter is incremented, and an error indication is returned to the calling module; however, time synchronization procedures may be invoked. Note that this procedure allows for to be greater than the local value of engineBoots to allow for received messages to be accepted as authentic when received from an authoritative SNMPv3 engine that has re-booted since the receiving SNMPv3 engine last re-synchronized. - if at least one of the following conditions is true: - the field is greater than the local value of engineBoots; or, - the field is equal to the local value of engineBoots and the field is greater than the value of latestReceivedEngineTime, then the SCD entry corresponding to the value of the field is updated, by setting the local value of engineBoots from the field, the local value latestReceivedEngineTime from the field, and the local value of engineTime from the field. 8) If the field indicates that the message was protected from disclosure, then the octet sequence representing the is decrypted according to the user's privacy protocol to obtain a serialized scopedPDUs value. Otherwise the data component is assumed to directly contain the scopedPDUs value. To do the decryption, a call is made to the privacy module that implements the user's privacy protocol. Input passed to the privacy module is: the engineID of the authoritative SNMPv3 engine as it was included in the message. the user on whose behalf the message is to be decrypted. the engineTime value as it was included in the message. the data to be decrypted Blumenthal/Wijnen Expires November 1997 [Page 22] Draft User-based Security Model (USEC) for SNMPv3 May 1997 Output expected from the privacy module is an error code or: the cached security data so that it can be used later when the decrypted scopedPDU. If an error code is returned by the privacy module, then an error indication is returned to the calling module. 9) The scopedPDU-MMS is calculated. 10) The groupName is retrieved from the usecUserTable. 11) The is retrieved from the usecUserTable 12) A return is made to the calling module, passing these values: the maximum message size that a possible response may use. the name of the group that the user, on whose behalf the message was sent, belongs to. this is an implementation specific handle that identifies an entry in the usecUserTable. It is to be used later when a response message must be secured. the cached security data so that it can be used later when the scopedPDU (message payload) Blumenthal/Wijnen Expires November 1997 [Page 23] Draft User-based Security Model (USEC) for SNMPv3 May 1997 4. Discovery This security model requires that a discovery process obtain sufficient information about other SNMPv3 entities in order to communicate with them. Discovery requires the SNMPv3 manager to learn the engine's snmpEngineID value before communication may proceed. This may be accomplished by formulating a get-request communication with the LoS set to noAuth/noPriv, the userName set to "public", the snmpEngineID set to all zeros (binary), and the varBindList left empty. The response to this message will be a report PDU that contains the snmpEngineID within the field (and containing the usecStatsUnknownEngineIDs counter in the varBindList). If authenticated communication is required then the discovery process may invoke the procedure described in Section 2.4 to synchronize the clocks. Blumenthal/Wijnen Expires November 1997 [Page 24] Draft User-based Security Model (USEC) for SNMPv3 May 1997 5. Definitions SNMPv3-USEC-MIB DEFINITIONS ::= BEGIN IMPORTS Counter32, Unsigned32, MODULE-IDENTITY, OBJECT-TYPE, snmpModules FROM SNMPv2-SMI TEXTUAL-CONVENTION, TestAndIncr, RowStatus, AutonomousType, StorageType, TDomain, TAddress FROM SNMPv2-TC MODULE-COMPLIANCE, OBJECT-GROUP FROM SNMPv2-CONF, SnmpV3GroupName, SnmpV3ContextName, SnmpV3LoS, SnmpV3EngineID, SnmpV3SecurityModel, SnmpV3SecurityCookie FROM SNMPv3-MIB; -- Editor's note: Not sure if the above are all in SNMPv3-MIB, need to see how the complete MPC document will look like. -- End Editor's note snmpV3UsecMIB MODULE-IDENTITY LAST-UPDATED "9705090000Z" -- 09 May 1997, midnight ORGANIZATION "SNMPv3 Working Group" CONTACT-INFO "WG-email: snmpv3@tis.com Subscribe: majordomo@tis.com In msg body: subscribe snmpv3 Chair: Russ Mundy Trutsed Information Systems postal: 3060 Washington Rd Glenwood MD 21738 email: mundy@tis.com phone: 301-854-6889 Co-editor Uri Blumenthal IBM T. J. Watson Research postal: 30 Saw Mill River Pkwy, Hawthorne, NY 10532 USA email: uri@watson.ibm.com phone: +1.914.784.7964 Co-editor: Bert Wijnen IBM T. J. Watson Research postal: Schagen 33 3461 GL Linschoten Netherlands email: wijnen@vnet.ibm.com phone: +31-348-412-498 " Blumenthal/Wijnen Expires November 1997 [Page 25] Draft User-based Security Model (USEC) for SNMPv3 May 1997 DESCRIPTION "The management information definitions for the SNMPv3 User-based Security model. " ::= { snmpModules xx } -- Administrative assignments **************************************** snmpV3UsecAdmin OBJECT IDENTIFIER ::= { snmpV3UsecMIB 1 } snmpV3UsecMIBObjects OBJECT IDENTIFIER ::= { snmpV3UsecMIB 2 } snmpV3UsecMIBConformance OBJECT IDENTIFIER ::= { snmpV3UsecMIB 3 } usecAuthProtocols OBJECT IDENTIFIER ::= { snmpV3UsecAdmin 1 } -- no Authentication Protocol usecNoAuthProtocol OBJECT IDENTIFIER ::= { usecAuthProtocols 1 } -- the Digest Authentication Protocol usecMD5AuthProtocol OBJECT IDENTIFIER ::= { usecAuthProtocols 2 } -- Privacy Protocols usecPrivProtocols OBJECT IDENTIFIER ::= { usecAdmin 2 } -- no Privacy Protocol usecNoPrivProtocol OBJECT IDENTIFIER ::= { usecPrivProtocols 1 } -- the Symmetric Encryption Protocol usecDESPrivProtocol OBJECT IDENTIFIER ::= { usecPrivProtocols 2 } -- Editor's note: We picked these up from earlier MIBs. It all seems a bit overdone though. If a user has no auth or priv protocol, we could just put the NULL OID { 0 0 } in the usecUserPrivProtocol or usecUserAuthProtocol column. There also seems no need to split between auth and priv protocols. How about the following (simpler) scheme: usecProtocols OBJECT IDENTIFIER ::= { snmpV3UsecAdmin 1 } -- the Digest Authentication Protocol usecMD5AuthProtocol OBJECT IDENTIFIER ::= { usecProtocols 1 } -- the Symmetric Encryption Protocol usecDESPrivProtocol OBJECT IDENTIFIER ::= { usecProtocols 2 } -- End Editor's note -- Each engine has authoritative values for itself ******************* snmpEngine OBJECT IDENTIFIER ::= { snmpV3UsecMIBObjects 1 } snmpEngineID OBJECT-TYPE SYNTAX SnmpEngineID MAX-ACCESS read-only STATUS current Blumenthal/Wijnen Expires November 1997 [Page 26] Draft User-based Security Model (USEC) for SNMPv3 May 1997 DESCRIPTION "The SNMP engine's administratively-unique identifier." ::= { snmpEngine 1 } snmpEngineBoots OBJECT-TYPE SYNTAX Unsigned32 MAX-ACCESS read-only STATUS current DESCRIPTION "The number of times that the engine has re-initialized itself since its initial configuration. " ::= { snmpEngine 2 } snmpEngineTime OBJECT-TYPE SYNTAX Unsigned32 (0..2147483647) UNITS "seconds" MAX-ACCESS read-only STATUS current DESCRIPTION "The number of seconds since the engine last incremented the snmpEngineBoots object. " ::= { snmpEngine 3 } -- Statistics for the User-based Security model *********************** usecStats OBJECT IDENTIFIER ::= { snmpV3UsecMIBObjects 2 } usecStatsUnsupportedLoS OBJECT-TYPE SYNTAX Counter32 MAX-ACCESS read-only STATUS current DESCRIPTION "The total number of packets received by the SNMPv3 engine which were dropped because they requested a Level of Security that was unknown to the engine or otherwise unavailable. " ::= { usecStats 1 } usecStatsNotInTimeWindows OBJECT-TYPE SYNTAX Counter32 MAX-ACCESS read-only STATUS current DESCRIPTION "The total number of packets received by the SNMPv3 engine which were dropped because they appeared outside of the engine's window. " ::= { usecStats 2 } usecStatsUnknownUserNames OBJECT-TYPE SYNTAX Counter32 MAX-ACCESS read-only STATUS current Blumenthal/Wijnen Expires November 1997 [Page 27] Draft User-based Security Model (USEC) for SNMPv3 May 1997 DESCRIPTION "The total number of packets received by the SNMPv3 engine which were dropped because they referenced a user that was not known to the engine. " ::= { usecStats 3 } usecStatsUnknownEngineIDs OBJECT-TYPE SYNTAX Counter32 MAX-ACCESS read-only STATUS current DESCRIPTION "The total number of packets received by the SNMPv3 engine which were dropped because they referenced an engineID that was not known to the engine. " ::= { usecStats 4 } -- Textual Conventions *********************************************** UserName ::= TEXTUAL-CONVENTION STATUS current DESCRIPTION "An octet string representing the name of a user for use in accordance with the SNMPv3 User-based Security model. " SYNTAX OCTET STRING (SIZE(1..16)) -- The valid users for the User-based Security model ****************** usecUser OBJECT IDENTIFIER ::= { snmpV3UsecMIBObjects 3 } usecUserTable OBJECT-TYPE SYNTAX SEQUENCE OF UsecUserEntry MAX-ACCESS not-accessible STATUS current DESCRIPTION "The table of users configured in the SNMPv3 entity's security configuration datastore (SCD)." ::= { usecUser 1 } usecUserEntry OBJECT-TYPE SYNTAX UsecUserEntry MAX-ACCESS not-accessible STATUS current DESCRIPTION "A user configured in the SNMPv3 entity's security configuration datastore (SCD) for the User-based Security model. " INDEX { usecUserEngineID, IMPLIED usecUserName } ::= { usecUserTable 1 } Blumenthal/Wijnen Expires November 1997 [Page 28] Draft User-based Security Model (USEC) for SNMPv3 May 1997 UsecUserEntry ::= SEQUENCE { usecUserEngineID SnmpEngineID, usecUserName UserName, usecUserGroupName SnmpV3GroupName, usecUserAuthProtocol OBJECT IDENTIFIER, usecUserPrivProtocol OBJECT IDENTIFIER, usecUserStorageType StorageType, usecUserSecurityCookie SnmpV3SecurityCookie, usecUserStatus RowStatus } usecUserEngineID OBJECT-TYPE SYNTAX SnmpEngineID MAX-ACCESS not-accessible STATUS current DESCRIPTION "An SNMPv3 engine's administratively-unique identifier. In a simple agent, this value is always that agent's own snmpEngineID value. This value can also take the value of the snmpEngineID of a remote SNMP engine with which this user can communicate. " ::= { usecUserEntry 1 } usecUserName OBJECT-TYPE SYNTAX UserName MAX-ACCESS not-accessible STATUS current DESCRIPTION "An octet string representing the name of the user." ::= { usecUserEntry 2 } usecUserGroupName OBJECT-TYPE SYNTAX SnmpV3GroupName MAX-ACCESS read-write STATUS current DESCRIPTION "An octet string representing the group to which the user belongs. A group name of zero length indicates that the user is not [perhaps yet] a member of any group, possibly because the entry has not yet been completely configured. Users which are not a part of any group are effectively disabled to perform any SNMP operations. " DEFVAL { ''H } -- the empty string ::= { usecUserEntry 3 } usecUserAuthProtocol OBJECT-TYPE SYNTAX OBJECT IDENTIFIER Blumenthal/Wijnen Expires November 1997 [Page 29] Draft User-based Security Model (USEC) for SNMPv3 May 1997 MAX-ACCESS read-create STATUS current DESCRIPTION "An indication of whether messages sent on behalf of this user to/from the engine identified by usecUserEngineID, can be authenticated, and if so, the type of authentication protocol which is used. An instance of this object is created concurrently with the creation of any other object instance for the same user (i.e., as part of the processing of the set operation which creates the first object instance in the same conceptual row). Once created, the value of an instance of this object can not be changed. " DEFVAL { usecMD5AuthProtocol } ::= { usecUserEntry 4 } usecUserPrivProtocol OBJECT-TYPE SYNTAX OBJECT IDENTIFIER MAX-ACCESS read-create STATUS current DESCRIPTION "An indication of whether messages sent on behalf of this user to/from the engine identified by usecUserEngineID, can be protected from disclosure, and if so, the type of privacy protocol which is used. An instance of this object is created concurrently with the creation of any other object instance for the same user (i.e., as part of the processing of the set operation which creates the first object instance in the same conceptual row). Once created, the value of an instance of this object can not be changed. " DEFVAL { usecNoPrivProtocol } ::= { usecUserEntry 5 } usecUserStorageType OBJECT-TYPE SYNTAX StorageType MAX-ACCESS read-create STATUS current DESCRIPTION "The storage type for this conceptual row." DEFVAL { nonVolatile } ::= { usecUserEntry 7 } usecUserSecurityCookie OBJECT-TYPE SYNTAX SnmpV3SecurityCookie MAX-ACCESS read-only STATUS current DESCRIPTION "An implementation specific handle that identifies Blumenthal/Wijnen Expires November 1997 [Page 30] Draft User-based Security Model (USEC) for SNMPv3 May 1997 the User-based Security model and this entry in the usecUserTable. " DEFVAL { nonVolatile } ::= { usecUserEntry 7 } usecUserStatus OBJECT-TYPE SYNTAX RowStatus MAX-ACCESS read-create STATUS current DESCRIPTION "The status of this conceptual row. Until instances of all corresponding columns are appropriately configured, the value of the corresponding instance of the usecUserStatus column is 'notReady'. For those columnar objects which permit write-access, their value in an existing conceptual row can be changed irrespective of the value of usecUserStatus for that row. " ::= { usecUserEntry 8 } -- Conformance Information ******************************************* snmpV3UsecMIBCompliances OBJECT IDENTIFIER ::= { snmpV3UsecMIBConformance 1 } snmpV3UsecMIBGroups OBJECT IDENTIFIER ::= { snmpV3UsecMIBConformance 2 } -- Compliance statements snmpV3UsecMIBCompliance MODULE-COMPLIANCE STATUS current DESCRIPTION "The compliance statement for SNMPv3 engines which implement the SNMPv3 USEC MIB. " MODULE -- this module MANDATORY-GROUPS { snmpV3UsecMIBBasicGroup } OBJECT usecUserGroupName MIN-ACCESS read-only DESCRIPTION "Write access is not required." OBJECT usecUserAuthProtocol MIN-ACCESS read-only DESCRIPTION "Write access is not required." OBJECT usecUserPrivProtocol MIN-ACCESS read-only DESCRIPTION "Write access is not required." Blumenthal/Wijnen Expires November 1997 [Page 31] Draft User-based Security Model (USEC) for SNMPv3 May 1997 ::= { snmpV3UsecMIBCompliances 1 } -- Units of compliance snmpV3UsecMIBBasicGroup OBJECT-GROUP OBJECTS { snmpEngineID, snmpEngineBoots, snmpEngineTime, usecStatsUnsupportedLoS, usecStatsNotInTimeWindows, usecStatsUnknownUserNames, usecStatsUnknownEngineIDs, usecUserGroupName, usecUserAuthProtocol, usecUserPrivProtocol, usecUserSecurityCookie, usecUserStorageType, usecUserStatus } STATUS current DESCRIPTION "A collection of objects providing for configuration of an SNMPv3 entity which implements the SNMPv3 User-based Security model. " ::= { snmpV3UsecMIBGroups 1 } END Blumenthal/Wijnen Expires November 1997 [Page 32] Draft User-based Security Model (USEC) for SNMPv3 May 1997 6. MD5 Authentication Protocol This section describes the Keyed-MD5 authentication protocol. This protocol is the first authentication protocol defined for the User-based Security model. Over time, other authentication protocols may be defined either as a replacement of this protocol or in addition to this protocol. 6.1 Mechanisms - In support of data integrity, a message digest algorithm is required. A digest is calculated over an appropriate portion of an SNMPv3 message and included as part of the message sent to the recipient. - In support of data origin authentication and data integrity, a secret value is both inserted into, and appended to, the SNMPv3 message prior to computing the digest; the inserted value is overwritten prior to transmission, and the appended value is not transmitted. The secret value is shared by all SNMPv3 engines authorized to originate messages on behalf of the appropriate user. - In order to not expose the shared secrets (keys) at all SNMPv3 engines in case one of the engines is compromised, such secrets (keys) are localized for each authoritative SNMPv3 engine, see [Localized-Key]. 6.1.1. Digest Authentication Protocol The Digest Authentication Protocol defined in this memo provides for: - verifying the integrity of a received message (i.e., the message received is the message sent). The integrity of the message is protected by computing a digest over an appropriate portion of a message. The digest is computed by the originator of the message, transmitted with the message, and verified by the recipient of the message. - verifying the user on whose behalf the message was generated. A secret value known only to SNMPv3 engines authorized to generate messages on behalf of a user is both inserted into, and appended to, the message prior to the digest computation. Thus, the verification of the user is implicit with the verification of the digest. (Note that the use of two copies of the secret, one near the start and one at the end, is recommended by [KEYED-MD5].) This protocol uses the MD5 [MD5] message digest algorithm. A 128-bit digest is calculated over the designated portion of an SNMPv3 message Blumenthal/Wijnen Expires November 1997 [Page 33] Draft User-based Security Model (USEC) for SNMPv3 May 1997 and included as part of the message sent to the recipient. The size of both the digest carried in a message and the private authentication key (the secret) is 16 octets. 6.2 Elements of the Digest Authentication Protocol This section contains definitions required to realize the authentication module defined by this memo. 6.2.1. SNMPv3 Users Authentication using this Digest Authentication protocol makes use of a defined set of user identities. For any SNMPv3 user on whose behalf a message must be authenticated at a particular SNMPv3 engine, that engine must have knowledge of that user. An SNMPv3 engine that wishes to communicate with another SNMPv3 engine must also have knowledge of a user known to that engine, including knowledge of the applicable attributes of that user. A user and its attributes are defined as follows: An octet string representing the name of the user. If messages sent on behalf of this user can be authenticated, the (private) authentication key for use with the authentication protocol. Note that a user's authentication key will normally be different at different authoritative engines. 6.2.2. EngineID The engineID value contained in an authenticated message specifies the authoritative SNMPv3 engine for that particular message. (see the definition of engineID in the SNMPng Architectural model document [SNMPng-ARCH]). The user's (private) authentication key is normally different at each authoritative SNMPv3 engine and so the snmpEngineID is used to select the proper key for the authentication process. 6.2.3. SNMPv3 Messages Using this Authentication Protocol Messages using this authentication protocol carry an authParameters field as part of the securityParameters. For this protocol, the authParameters field is the serialized octet string representing the MD5 digest of the wholeMessage. The digest is calculated over the wholeMessage so if a message is authenticated, that also means that all the fields in the message are intact and have not been tampered with. Blumenthal/Wijnen Expires November 1997 [Page 34] Draft User-based Security Model (USEC) for SNMPv3 May 1997 6.2.4 Input and Output of the MD5 Authentication Module This section describes the inputs and outputs that the MD5 Authentication module expects and produces when the User-based Security module invokes the MD5 Authentication module for services. 6.2.4.1 Input and Output when generating an SNMPv3 Message When the User-based Security module invokes the MD5 Authentication module to authenticate an outgoing message, it must pass as arguments: the engineID of the authoritative SNMPv3 engine as it will be included in the message. the user on whose behalf the message is to be authenticated. the possible cached security data if this is a response to an earlier request message. the authParameters, to be filled by the authentication module. the message to be authenticated. Output from the MD5 Authentication module is an error indication or the completed wholeMessage (that is with the digest inserted into the authParameters field). If an error indication is returned by the MD5 Authentication module, then the message cannot be sent. 6.2.4.2 Input and Output when receiving an SNMPv3 Message When the User-based Security module invokes the MD5 Authentication module to authenticate an incoming message, it must pass as arguments: the engineID of the authoritative SNMPv3 engine as it was included in the message. the user on whose behalf the message is to be authenticated. the authParameters. the message to be authenticated. Output from the MD5 Authentication module is an error indication or the authentic wholeMessage plus any cachedSecurityData that may be needed when authenticating a possible outgoing response to this Blumenthal/Wijnen Expires November 1997 [Page 35] Draft User-based Security Model (USEC) for SNMPv3 May 1997 (request) message. If an error indication is returned by the MD5 Authentication module, then the message cannot be trusted. In the case that there was not enough information in the Security Configuration Database (SCD) to actually perform the authentication process, then a report PDU may have been generated to inform the sender about the error condition. 6.3 Elements of Procedure This section describes the procedures for the Keyed-MD5 authentication protocol. 6.3.1 Processing an Outgoing Message This section describes the procedure followed by an SNMPv3 engine whenever it must authenticate an outgoing message using the usecMD5AuthProtocol. 1) - If any cachedSecurityData exists for this message, then information concerning the user is extracted from the cachedSecurityData. - Otherwise, the engineID and the userName are used to extract the information concerning the user from the Security Configuration Datastore (SCD, authMD5Table). 2) If the engineID is not known by this authentication module, then the message cannot be sent. An error indication is returned to the calling module. 3) If the userName is not known by this authentication module, then the message cannot be sent. An error indication is returned to the calling module. 4) The authParameters field is set to the serialization according to the rules in [RFC1907] of an octet string representing the secret (localized) key of the user. 5) The secret (localized) key of the user is then appended to the end of the wholeMessage. 6) The MD5-Digest is calculated according to [MD5]. Then the authParameters field is replaced with the calculated digest. 7) The wholeMessage (excluding the appended secret key) is then returned to the caller. 6.3.2 Processing an Incoming Message This section describes the procedure followed by an SNMPv3 engine whenever it must authenticate an incoming message using the Blumenthal/Wijnen Expires November 1997 [Page 36] Draft User-based Security Model (USEC) for SNMPv3 May 1997 usecMD5AuthProtocol. 1) If the engineID is not known by this authentication module, then the authMD5StatsUnknownEngineIDs counter is incremented, a report PDU is generated and an error indication is returned to the calling module. 2) If the userName is not known by this authentication module, then the authMD5StatsUnknownUserNames counter is incremented, a report PDU is generated and an error indication is returned to the calling module. 3) If the digest received in the authParameters field is not 16 octets long, then the authMD5StatsWrongDigests counter is incremented, a report PDU is generated and an error indication is returned to the calling module. 4) The digest received in the authParameters field is saved. 5) The engineID and the userName are used to extract information concerning the user from the Security Configuration Datastore (SCD, authMD5Table). 6) The digest in the authParameters field is replaced by the user's secret (localized) key. 7) The secret (localized) key of the user is then appended to the end of the wholeMessage. 8) The MD5-Digest is calculated according to [MD5]. The authParameters field is replaced with the digest value that was saved in step 4). 9) Then the newly calculated digest is compared with the digest saved in step 4). If the digests do not match, then the authMD5StatsUnknownUserNames counter is incremented, a report PDU is generated and an error indication is returned to the calling module. 10) The secret key (used for calculating the digest) is cached as part of the cachedSecurityData. 11) The wholeMessage (excluding the appended secret key) and the cachedSecurityData is then returned to the caller. Blumenthal/Wijnen Expires November 1997 [Page 37] Draft User-based Security Model (USEC) for SNMPv3 May 1997 6.4 Definitions SNMPv3-AUTH-MD5-MIB DEFINITIONS ::= BEGIN IMPORTS Counter32, Unsigned32, MODULE-IDENTITY, OBJECT-TYPE, snmpModules FROM SNMPv2-SMI TEXTUAL-CONVENTION, TestAndIncr, RowStatus, AutonomousType, StorageType, TDomain, TAddress, RowPointer FROM SNMPv2-TC MODULE-COMPLIANCE, OBJECT-GROUP FROM SNMPv2-CONF, SnmpV3GroupName, SnmpV3ContextName, SnmpV3LoS, SnmpV3EngineID, SnmpV3SecurityModel FROM SNMPv3-MIB, UserName, usecMD5AuthProtocol FROM SNMPv3-USEC-MIB; authMD5MIB MODULE-IDENTITY LAST-UPDATED "9705090000Z" -- 09 May 1997, midnight ORGANIZATION "SNMPv3 Working Group" CONTACT-INFO "WG-email: snmpv3@tis.com Subscribe: majordomo@tis.com In msg body: subscribe snmpv3 Chair: Russ Mundy Trutsed Information Systems postal: 3060 Washington Rd Glenwood MD 21738 email: mundy@tis.com phone: 301-854-6889 Co-editor Uri Blumenthal IBM T. J. Watson Research postal: 30 Saw Mill River Pkwy, Hawthorne, NY 10532 USA email: uri@watson.ibm.com phone: +1.914.784.7964 Co-editor: Bert Wijnen IBM T. J. Watson Research postal: Schagen 33 3461 GL Linschoten Netherlands email: wijnen@vnet.ibm.com phone: +31-348-412-498 " DESCRIPTION "The management information definitions for the Keyed-MD5 authentication protocol for use with the SNMPv3 User-based Security model. " Blumenthal/Wijnen Expires November 1997 [Page 38] Draft User-based Security Model (USEC) for SNMPv3 May 1997 ::= { snmpModules xx } -- Administrative assignments **************************************** authMD5Admin OBJECT IDENTIFIER ::= { authMD5MIB 1 } authMD5MIBObjects OBJECT IDENTIFIER ::= { authMD5MIB 2 } authMD5MIBConformance OBJECT IDENTIFIER ::= { authMD5MIB 3 } -- Textual Conventions ********************************************** -- Editor's note: -- Do we need to define this so generic. -- Maybe we can just assume the usecAuthMD5Protocol -- If we make it generic, then we can use this TC with several -- ciphers - those we use now, and those people might want to -- use in the future, like IDEA, Blowfish, SEAL, whatever... -- But certainly for now it makes this TC more complicated then -- what we need now. -- End Editor's note KeyChange ::= TEXTUAL-CONVENTION STATUS current DESCRIPTION "Every definition of an object with this syntax must identify a protocol, P, and a secret key, K. The object's value is a manager-generated, partially-random value which, when modified, causes the value of the secret key, K, to be modified via a one-way function. The value of an instance of this object is the concatenation of two components: a 'random' component and a 'delta' component. The lengths of the random and delta components are given by the corresponding value of the protocol, P; if P requires K to be a fixed length, the length of both the random and delta components is that fixed length; if P allows the length of K to be variable up to a particular maximum length, the length of the random component is that maximum length and the length of the delta component is any length less than or equal to that maximum length. For example, usecMD5AuthProtocol requires K to be a fixed length of 16 octets. Other protocols may define other sizes, as deemed appropriate. When an instance of this object is modified to have a new value by the management protocol, the agent generates a new value of K as follows: - a temporary variable is initialized to the existing value of K; - if the length of the delta component is greater than 16 bytes, then: Blumenthal/Wijnen Expires November 1997 [Page 39] Draft User-based Security Model (USEC) for SNMPv3 May 1997 - the random component is appended to the value of the temporary variable, and the result is input to the MD5 hash algorithm to produce a digest value, and the temporary variable is set to this digest value; - the value of the temporary variable is XOR-ed with the first (next) 16-bytes of the delta component to produce the first (next) 16-bytes of the new value of K. - the above two steps are repeated until the unused portion of the delta component is 16 bytes or less, - the random component is appended to the value of the temporary variable, and the result is input to the MD5 hash algorithm to produce a digest value; - this digest value, truncated if necessary to be the same length as the unused portion of the delta component, is XOR-ed with the unused portion of the delta component to produce the (final portion of the) new value of K. i.e., iterations = (lenOfDelta - 1)/16; /* integer division */ temp = keyOld; for (i = 0; i < iterations; i++) { temp = MD5 (temp || random); keyNew[i*16 .. (i*16)+15] = temp XOR delta[i*16 .. (i*16)+15]; } temp = MD5 (temp || random); keyNew[i*16 .. lenOfDelta-1] = temp XOR delta[i*16 .. lenOfDelta-1]; The value of an object with this syntax, whenever it is retrieved by the management protocol, is always the zero- length string." SYNTAX OCTET STRING -- ******************************************************************* authMD5Stats OBJECT IDENTIFIER ::= { authMD5MIBObjects 1 } authMD5StatsUnknownUserNames OBJECT-TYPE SYNTAX Counter32 MAX-ACCESS read-only STATUS current DESCRIPTION "The total number of packets received by the SNMPv3 engine which were dropped because they referenced a user that was not known to the MD5 authentication module in the engine. " ::= { authMD5Stats 1 } authMD5StatsUnknownEngineIDs OBJECT-TYPE Blumenthal/Wijnen Expires November 1997 [Page 40] Draft User-based Security Model (USEC) for SNMPv3 May 1997 SYNTAX Counter32 MAX-ACCESS read-only STATUS current DESCRIPTION "The total number of packets received by the SNMPv3 engine which were dropped because they referenced an engineID that was not known to the MD5 authentication module in the engine. " ::= { authMD5Stats 2 } authMD5StatsWrongDigests OBJECT-TYPE SYNTAX Counter32 MAX-ACCESS read-only STATUS current DESCRIPTION "The total number of packets received by the SNMPv3 engine which were dropped because they didn't contain the expected digest value. " ::= { authMD5Stats 3 } -- ******************************************************************* authMD5Table OBJECT-TYPE SYNTAX SEQUENCE OF AuthMD5TableEntry MAX-ACCESS not-accessible STATUS current DESCRIPTION "The SNMPv3 security configuration database (SCD) for authentication information for users who use the usecAuthMD5Protocol as the authentication protocol. " ::= { authMD5MIBObjects 2 } authMD5TableEntry OBJECT-TYPE SYNTAX AuthMD5TableEntry MAX-ACCESS not-accessible STATUS current DESCRIPTION "An entry for a particular SNMPv3 user and engineID." INDEX { authMD5EngineID, IMPLIED authMD5UserName } ::= { authMD5Table 1 } AuthMD5TableEntry ::= SEQUENCE { authMD5EngineID SnmpV3EngineID, authMD5UserName UserName, authMD5KeyChange KeyChange, authMD5CloneFrom RowPointer, authMD5Public OCTET STRING, authMD5StorageType StorageType, authMD5Status RowStatus } Blumenthal/Wijnen Expires November 1997 [Page 41] Draft User-based Security Model (USEC) for SNMPv3 May 1997 authMD5EngineID OBJECT-TYPE SYNTAX SnmpEngineID MAX-ACCESS not-accessible STATUS current DESCRIPTION "An SNMPv3 engine's administratively-unique identifier. In a simple agent, this value is always that agent's own snmpEngineID value. This value can also take the value of the snmpEngineID of a remote SNMP engine with which this user can communicate. " ::= { authMD5TableEntry 1 } authMD5UserName OBJECT-TYPE SYNTAX UserName MAX-ACCESS not-accessible STATUS current DESCRIPTION "An octet string representing the name of the user." ::= { authMD5TableEntry 2 } authMD5KeyChange OBJECT-TYPE SYNTAX KeyChange -- typically (SIZE (0..32)) MAX-ACCESS read-create STATUS current DESCRIPTION "An object, which when modified, causes the secret authentication key used for messages sent on behalf of this user to/from the engine identified by authMD5EngineID, to be modified via a one-way function. The associated protocol is the usecAuthMD5Protocol. The associated secret key is the user's secret authentication key. When creating a new user, it is an 'inconsistentName' error for a set operation to refer to this object unless it is previously or concurrently initialized through a set operation on the corresponding value of authMD5CloneFrom. " DEFVAL { ''H } -- the empty string ::= { authMD5TableEntry 3 } authMD5CloneFrom OBJECT-TYPE SYNTAX RowPointer MAX-ACCESS read-create STATUS current DESCRIPTION "A pointer to another conceptual row in this authMD5Table. The user in this other conceptual row Blumenthal/Wijnen Expires November 1997 [Page 42] Draft User-based Security Model (USEC) for SNMPv3 May 1997 is called the clone-from user. When a new user is created (i.e., a new conceptual row is instantiated in this table), the authentication parameters of the new user are cloned from its clone-from user. The first time an instance of this object is set by a management operation (either at or after its instantiation), the cloning process is invoked. Subsequent writes are successful but invoke no action to be taken by the agent. The cloning process fails with an 'inconsistentName' error if the conceptual row representing the clone-from user is not in an active state when the cloning process is invoked. Cloning also causes the initial values of the secret authentication key of the new user to be set to the same value as the corresponding secret of the clone-from user. When this object is read, the zero length string is returned. " ::= { authMD5TableEntry 4 } authMD5Public OBJECT-TYPE SYNTAX OCTET STRING (SIZE(0..32)) MAX-ACCESS read-create STATUS current DESCRIPTION "A publicly-readable value which is written as part of the procedure for changing a user's secret key, and later read to determine whether the change of the secrets was effected. " DEFVAL { ''H } -- the empty string ::= { authMD5TableEntry 5 } authMD5StorageType OBJECT-TYPE SYNTAX StorageType MAX-ACCESS read-create STATUS current DESCRIPTION "The storage type for this conceptual row. Conceptual rows having the value 'permanent' must allow write-access at a minimum to authMD5KeyChange and authMD5Public. Note that any user which employs authentication must allow its secret to be updated and thus an entry in Blumenthal/Wijnen Expires November 1997 [Page 43] Draft User-based Security Model (USEC) for SNMPv3 May 1997 this table cannot be 'readOnly'. " DEFVAL { nonVolatile } ::= { authMD5TableEntry 6 } authMD5Status OBJECT-TYPE SYNTAX RowStatus MAX-ACCESS read-create STATUS current DESCRIPTION "The status of this conceptual row. Until instances of all corresponding columns are appropriately configured, the value of the corresponding instance of the authMD5Status column is 'notReady'. In particular, a value must have been written to the authMD5CloneFrom column. For those columnar objects which permit write-access, their value in an existing conceptual row can be changed irrespective of the value of authMD5Status for that row. " ::= { authMD5TableEntry 7 } authMD5SecretSpinLock OBJECT-TYPE SYNTAX TestAndIncr MAX-ACCESS read-write STATUS current DESCRIPTION "An advisory lock used to allow several cooperating SNMPv3 engines, all acting in a manager role, to coordinate their use of facilities to alter secrets in the authMD5Table. " ::= { authMD5MIBObjects 3 } -- Conformance Information ******************************************* authMD5MIBCompliances OBJECT IDENTIFIER ::= { authMD5MIBConformance 1 } authMD5MIBGroups OBJECT IDENTIFIER ::= { authMD5MIBConformance 2 } -- Compliance statements authMD5MIBCompliance MODULE-COMPLIANCE STATUS current DESCRIPTION "The compliance statement for SNMPv3 engines which implement the SNMPv3 authMD5 MIB. " MODULE -- this module MANDATORY-GROUPS { authMD5MIBBasicGroup } Blumenthal/Wijnen Expires November 1997 [Page 44] Draft User-based Security Model (USEC) for SNMPv3 May 1997 ::= { authMD5MIBCompliances 1 } -- Units of compliance authMD5MIBBasicGroup OBJECT-GROUP OBJECTS { authMD5StatsUnknownUserNames, authMD5StatsUnknownEngineIDs, authMD5StatsWrongDigests, authMD5KeyChange, authMD5CloneFrom, authMD5Public, authMD5StorageType, authMD5Status, authMD5SecretSpinLock } STATUS current DESCRIPTION "A collection of objects providing for configuration of an SNMPv3 entity which implements the SNMPv3 MD5 Authentication Protocol. " ::= { authMD5MIBGroups 1 } END Blumenthal/Wijnen Expires November 1997 [Page 45] Draft User-based Security Model (USEC) for SNMPv3 May 1997 7. DES Privacy Protocol This section describes the DES privacy protocol. This protocol is the first privacy protocol defined for the User-based Security model. Over time, other privacy protocols may be defined either as a replacement of this protocol or in addition to this protocol. 7.1 Mechanisms - In support of data confidentiality, an encryption algorithm is required. An appropriate portion of the message is encrypted prior to being transmitted. The User-based Security model specifies that the scopedPDU is the portion of the message that needs to be encrypted. - A secret value is in combination with a time value is used to create the en/decryption key and the initialization vector. The secret value is shared by all SNMPv3 engines authorized to originate messages on behalf of the appropriate user. - In order to not expose the shared secrets (keys) at all SNMPv3 engines in case one of the engines is compromised, such secrets (keys) are localized for each authoritative SNMPv3 engine, see [Localized-Key]. 7.1.1. Symmetric Encryption Protocol The Symmetric Encryption Protocol defined in this memo provides support for data confidentiality. The designated portion of an SNMPv3 message is encrypted and included as part of the message sent to the recipient. This memo requires that if data confidentiality is supported by an SNMPv3 engine, this engine must implement at least the Data Encryption Standard (DES) in the Cipher Block Chaining mode of operation. Two organizations have published specifications defining the DES: the National Institute of Standards and Technology (NIST) [DES-NIST] and the American National Standards Institute [DES-ANSI]. There is a companion Modes of Operation specification for each definition (see [DESO-NIST] and [DESO-ANSI], respectively). The NIST has published three additional documents that implementers may find useful. - There is a document with guidelines for implementing and using the DES, including functional specifications for the DES and its modes of operation [DESG-NIST]. Blumenthal/Wijnen Expires November 1997 [Page 46] Draft User-based Security Model (USEC) for SNMPv3 May 1997 - There is a specification of a validation test suite for the DES [DEST-NIST]. The suite is designed to test all aspects of the DES and is useful for pinpointing specific problems. - There is a specification of a maintenance test for the DES [DESM-NIST]. The test utilizes a minimal amount of data and processing to test all components of the DES. It provides a simple yes-or-no indication of correct operation and is useful to run as part of an initialization step, e.g., when a computer re-boots. 7.1.1.1 DES key and Initialization Vector. The first 8 bytes of the 16-byte secret (private privacy key) are used as a DES key. Since DES uses only 56 bits, the Least Significant Bit in each byte is disregarded. The Initialization Vector for encryption is obtained using the following procedure. The last 8 bytes of the 16-byte secret (private privacy key) are used as pre-IV. The 32-bit engineTime is converted to a 4-byte octet string, Most Significant Byte first. This octet string is XOR-ed with the first four bytes of the pre-IV. The result is the Initialization Vector to be used in the subsequent encryption. The engine must ensure that the same value of engineTime is encoded in the securityParameters structure. -- Editor's note: Possibly, if we want to keep things clean and properly separated, then the engineTime should be duplicated in the privParameters. The engineTime in the header of the securityParameters is used for the timeliness checks, and so is used/handled in a different module. Do we want those extra bytes on the wire? -- End Editor's note 7.1.1.2 Data Encryption. The data to be encrypted is treated as sequence of octets. Its length should be an integral multiple of 8 - and if not, the data is padded at the end as necessary. The actual pad value is irrelevant. The data is encrypted in Cipher Block Chaining mode. The plaintext is divided into 64-bit blocks. The plaintext for each block is XOR-ed with the ciphertext of the previous block, the result is encrypted and the output of the encryption is the ciphertext for the block. This procedure is repeated until there are no more plaintext blocks. Blumenthal/Wijnen Expires November 1997 [Page 47] Draft User-based Security Model (USEC) for SNMPv3 May 1997 For the very first block, the Initialization Vector is used instead of the ciphertext of the previous block. 7.1.1.3 Data Decryption Before decryption, the encrypted data length is verified. If the length of the octet sequence to be decrypted is not an integral multiple of 8 octets, the processing of the octet sequence is halted and an appropriate exception noted. When decrypting, the padding is ignored. The first ciphertext block is decrypted, the decryption output is XOR-ed with the Initialization Vector, and the result is the first plaintext block. For each subsequent block, the ciphertext block is decrypted, the decryption output is XOR-ed with the previous ciphertext block and the result is the plaintext block. 7.2 Elements of the DES Privacy Protocol This section contains definitions required to realize the privacy module defined by this memo. 7.2.1. SNMPv3 Users Data En/Decryption using this Symmetric Encryption Protocol makes use of a defined set of user identities. For any SNMPv3 user on whose behalf a message must be en/decrypted at a particular SNMPv3 engine, that engine must have knowledge of that user. An SNMPv3 engine that wishes to communicate with another SNMPv3 engine must also have knowledge of a user known to that engine, including knowledge of the applicable attributes of that user. A user and its attributes are defined as follows: An octet string representing the name of the user. If messages sent on behalf of this user can be en/decrypted, the (private) privacy key for use with the privacy protocol. Note that a user's privacy key will normally be different at different authoritative engines. 7.2.2. EngineID The engineID value contained in an authenticated message specifies the authoritative SNMPv3 engine for that particular message. (see the definition of engineID in the SNMPng Architectural model Blumenthal/Wijnen Expires November 1997 [Page 48] Draft User-based Security Model (USEC) for SNMPv3 May 1997 document [SNMPng-ARCH]). The user's (private) authentication key is normally different at each authoritative SNMPv3 engine and so the snmpEngineID is used to select the proper key for the authentication process. 7.2.3. SNMPv3 Messages Using this Privacy Protocol Messages using this privacy protocol carry a privParameters field as part of the securityParameters. For this protocol, the privParameters field is the serialized octet string representing a NULL (zero length) string. 7.2.4 Input and Output of the DES Privacy Module This section describes the inputs and outputs that the DES Privacy module expects and produces when the User-based Security module invokes the DES Privacy module for services. 7.2.4.1 Input and Output when generating an SNMPv3 Message When the User-based Security module invokes the DES Privacy module to encrypt part of an outgoing message, it must pass as arguments: the engineID of the authoritative SNMPv3 engine as it will be included in the message. the user on whose behalf the message is to be encrypted. the engineTime value as it will be included in the message. the possible cached security data if this is a response to an earlier request message. the data to be encrypted. Upon completion the privacy module must return either an error indication or: the encrypted scopedPDU (encoded as an octet string). The privacy parameters (encoded as an octet string) that need to be sent in the outgoing message. 7.2.4.2 Input and Output when receiving an SNMPv3 Message When the User-based Security module invokes the DES Privacy module to decrypt part of an incoming message, it must pass as arguments: Blumenthal/Wijnen Expires November 1997 [Page 49] Draft User-based Security Model (USEC) for SNMPv3 May 1997 the engineID of the authoritative SNMPv3 engine as it was included in the message. the user on whose behalf the message is to be decrypted. the engineTime value as it was included in the message. the data to be decrypted Output expected from the privacy module is an error code or: the cached security data so that it can be used later when the decrypted scopedPDU. If an error indication is returned by the DES Privacy module, then the message cannot be decrypted and so the data is unusable and cannot be trusted. In the case that there was not enough information in the Security Configuration Database (SCD) to actually perform the privacy process, then a report PDU may have been generated to inform the sender about the error condition. 7.3 Elements of Procedure. This section describes the procedures for the DES privacy protocol. 7.3.1 Processing an Outgoing Message This section describes the procedure followed by an SNMPv3 engine whenever it must encrypt part of an outgoing message using the usecDESPrivProtocol. 1) - If any cachedSecurityData exists for this message, then information concerning the user is extracted from the cachedSecurityData. - Otherwise, the engineID and the userName are used to extract the information concerning the user from the Security Configuration Datastore (SCD, privDESTable). 2) If the engineID is not known by this privacy module, then the message cannot be sent. An error indication is returned to the calling module. 3) If the userName is not known by this privacy module, then the message cannot be sent. An error indication is returned to the calling module. 4) The authParameters field is set to the serialization according to the rules in [RFC1907] of an octet string representing the Blumenthal/Wijnen Expires November 1997 [Page 50] Draft User-based Security Model (USEC) for SNMPv3 May 1997 the NULL (zero length) string. 5) The secret (localized) key of the user and the engineTime are then used to construct the DES encryption key and pre-IV (as described in 7.1.1.1). 6) The scopedPDU is encrypted (as described in 7.1.1.2) and the encrypted data is serialized according to the rules in [RFC1907] as an octet string. 7) The the serialized octet string representing the encrypted scopedPDU and the cachedSecurityData together with the privParameters is returned to the caller. 7.3.2 Processing an Incoming Message This section describes the procedure followed by an SNMPv3 engine whenever it must decrypt part of an incoming message using the usecDESPrivProtocol. 1) If the engineID is not known by this privacy module, then the privDESStatsUnknownEngineIDs counter is incremented, a report PDU is generated and an error indication is returned to the calling module. 2) If the userName is not known by this privacy module, then the privDESStatsUnknownUserNames counter is incremented, a report PDU is generated and an error indication is returned to the calling module. 3) If the privParameters field is not the NULL (zero length) string, then the privDESStatsDecryptionErrors counter is incremented, a report PDU is generated and an error indication is returned to the calling module. 4) The engineID and the userName are used to extract information concerning the user from the Security Configuration Datastore (SCD, privDESTable). 5) The secret (localized) key of the user and the engineTime are then used to construct the DES decryption key and pre-IV (as described in 7.1.1.1). 6) The encryptedPDU is decrypted (as described in 7.1.1.3). 7) If the encryptedPDU cannot be decrypted, then the privDESStatsDecryptionErrors counter is incremented, a report PDU is generated and an error indication is returned to the calling module. 8) The secret (localized) key (used for constructing the DES Blumenthal/Wijnen Expires November 1997 [Page 51] Draft User-based Security Model (USEC) for SNMPv3 May 1997 decryption key and the pre-IV) is cached as part of the cachedSecurityData. 9) The decrypted data is returned to the calling module as the scopedPDU together with the cachedSecurityData. Blumenthal/Wijnen Expires November 1997 [Page 52] Draft User-based Security Model (USEC) for SNMPv3 May 1997 7.4 Definitions SNMPv3-PRIV-DES-MIB DEFINITIONS ::= BEGIN IMPORTS Counter32, Unsigned32, MODULE-IDENTITY, OBJECT-TYPE, snmpModules FROM SNMPv2-SMI TEXTUAL-CONVENTION, TestAndIncr, RowStatus, AutonomousType, StorageType, TDomain, TAddress, RowPointer FROM SNMPv2-TC MODULE-COMPLIANCE, OBJECT-GROUP FROM SNMPv2-CONF, SnmpV3GroupName, SnmpV3ContextName, SnmpV3LoS, SnmpV3EngineID, SnmpV3SecurityModel FROM SNMPv3-MIB, UserName, usecDESPrivProtocol FROM SNMPv3-USEC-MIB, KeyChange FROM SNMPv3-AUTH-MD5-MIB; privDESMIB MODULE-IDENTITY LAST-UPDATED "9705090000Z" -- 09 May 1997, midnight ORGANIZATION "SNMPv3 Working Group" CONTACT-INFO "WG-email: snmpv3@tis.com Subscribe: majordomo@tis.com In msg body: subscribe snmpv3 Chair: Russ Mundy Trutsed Information Systems postal: 3060 Washington Rd Glenwood MD 21738 email: mundy@tis.com phone: 301-854-6889 Co-editor Uri Blumenthal IBM T. J. Watson Research postal: 30 Saw Mill River Pkwy, Hawthorne, NY 10532 USA email: uri@watson.ibm.com phone: +1.914.784.7964 Co-editor: Bert Wijnen IBM T. J. Watson Research postal: Schagen 33 3461 GL Linschoten Netherlands email: wijnen@vnet.ibm.com phone: +31-348-412-498 " DESCRIPTION "The management information definitions for the Keyed-MD5 authentication protocol for use with the SNMPv3 User-based Security model. " Blumenthal/Wijnen Expires November 1997 [Page 53] Draft User-based Security Model (USEC) for SNMPv3 May 1997 ::= { snmpModules xx } -- Administrative assignments **************************************** privDESAdmin OBJECT IDENTIFIER ::= { privDESMIB 1 } privDESMIBObjects OBJECT IDENTIFIER ::= { privDESMIB 2 } privDESMIBConformance OBJECT IDENTIFIER ::= { privDESMIB 3 } -- ******************************************************************* privDESStats OBJECT IDENTIFIER ::= { privDESMIBObjects 1 } privDESStatsUnknownUserNames OBJECT-TYPE SYNTAX Counter32 MAX-ACCESS read-only STATUS current DESCRIPTION "The total number of packets received by the SNMPv3 engine which were dropped because they referenced a user that was not known to the DES privacy module in the engine. " ::= { privDESStats 1 } privDESStatsUnknownEngineIDs OBJECT-TYPE SYNTAX Counter32 MAX-ACCESS read-only STATUS current DESCRIPTION "The total number of packets received by the SNMPv3 engine which were dropped because they referenced an engineID that was not known to the DES privacy module in the engine. " ::= { privDESStats 2 } privDESStatsDecryptionErrors OBJECT-TYPE SYNTAX Counter32 MAX-ACCESS read-only STATUS current DESCRIPTION "The total number of packets received by the SNMPv3 engine which were dropped because they could not be decrypted. " ::= { privDESStats 3 } -- ******************************************************************* privDESTable OBJECT-TYPE SYNTAX SEQUENCE OF PrivDESTableEntry MAX-ACCESS not-accessible STATUS current DESCRIPTION "The SNMPv3 security configuration database (SCD) for Blumenthal/Wijnen Expires November 1997 [Page 54] Draft User-based Security Model (USEC) for SNMPv3 May 1997 privacy information for users who use the usecDESPrivProtocol as the privacy protocol. " ::= { privDESMIBObjects 2 } privDESTableEntry OBJECT-TYPE SYNTAX PrivDESTableEntry MAX-ACCESS not-accessible STATUS current DESCRIPTION "An entry for a particular SNMPv3 user and engineID." INDEX { privDESEngineID, IMPLIED privDESUserName } ::= { privDESTable 1 } PrivDESTableEntry ::= SEQUENCE { privDESEngineID SnmpV3EngineID, privDESUserName UserName, privDESKeyChange KeyChange, privDESCloneFrom RowPointer, privDESPublic OCTET STRING, privDESStorageType StorageType, privDESStatus RowStatus } privDESEngineID OBJECT-TYPE SYNTAX SnmpEngineID MAX-ACCESS not-accessible STATUS current DESCRIPTION "An SNMPv3 engine's administratively-unique identifier. In a simple agent, this value is always that agent's own snmpEngineID value. This value can also take the value of the snmpEngineID of a remote SNMP engine with which this user can communicate. " ::= { privDESTableEntry 1 } privDESUserName OBJECT-TYPE SYNTAX UserName MAX-ACCESS not-accessible STATUS current DESCRIPTION "An octet string representing the name of the user." ::= { privDESTableEntry 2 } privDESKeyChange OBJECT-TYPE SYNTAX KeyChange -- typically (SIZE (0..32)) MAX-ACCESS read-create STATUS current Blumenthal/Wijnen Expires November 1997 [Page 55] Draft User-based Security Model (USEC) for SNMPv3 May 1997 DESCRIPTION "An object, which when modified, causes the secret privacy key used for messages sent on behalf of this user to/from the engine identified by privDESEngineID, to be modified via a one-way function. The associated protocol is the usecDESPrivProtocol. The associated secret key is the user's secret privacy key. When creating a new user, it is an 'inconsistentName' error for a set operation to refer to this object unless it is previously or concurrently initialized through a set operation on the corresponding value of privDESCloneFrom. " DEFVAL { ''H } -- the empty string ::= { privDESTableEntry 3 } privDESCloneFrom OBJECT-TYPE SYNTAX RowPointer MAX-ACCESS read-create STATUS current DESCRIPTION "A pointer to another conceptual row in this privDESTable. The user in this other conceptual row is called the clone-from user. When a new user is created (i.e., a new conceptual row is instantiated in this table), the privacy parameters of the new user are cloned from its clone-from user. The first time an instance of this object is set by a management operation (either at or after its instantiation), the cloning process is invoked. Subsequent writes are successful but invoke no action to be taken by the agent. The cloning process fails with an 'inconsistentName' error if the conceptual row representing the clone-from user is not in an active state when the cloning process is invoked. Cloning also causes the initial values of the secret privacy key of the new user to be set to the same value as the corresponding secret of the clone-from user. When this object is read, the zero length string is returned. " ::= { privDESTableEntry 4 } privDESPublic OBJECT-TYPE Blumenthal/Wijnen Expires November 1997 [Page 56] Draft User-based Security Model (USEC) for SNMPv3 May 1997 SYNTAX OCTET STRING (SIZE(1..32)) MAX-ACCESS read-create STATUS current DESCRIPTION "A publicly-readable value which is written as part of the procedure for changing a user's secret key, and later read to determine whether the change of the secrets was effected. " DEFVAL { ''H } -- the empty string ::= { privDESTableEntry 5 } privDESStorageType OBJECT-TYPE SYNTAX StorageType MAX-ACCESS read-create STATUS current DESCRIPTION "The storage type for this conceptual row. Conceptual rows having the value 'permanent' must allow write-access at a minimum to privDESKeyChange and privDESPublic. Note that any user which employs privacy must allow its secret to be updated and thus an entry in this table cannot be 'readOnly'. " DEFVAL { nonVolatile } ::= { privDESTableEntry 6 } privDESStatus OBJECT-TYPE SYNTAX RowStatus MAX-ACCESS read-create STATUS current DESCRIPTION "The status of this conceptual row. Until instances of all corresponding columns are appropriately configured, the value of the corresponding instance of the privDESStatus column is 'notReady'. In particular, a value must have been written to the privDESCloneFrom column. For those columnar objects which permit write-access, their value in an existing conceptual row can be changed irrespective of the value of privDESStatus for that row. " ::= { privDESTableEntry 7 } privDESSecretSpinLock OBJECT-TYPE SYNTAX TestAndIncr MAX-ACCESS read-write STATUS current DESCRIPTION "An advisory lock used to allow several cooperating Blumenthal/Wijnen Expires November 1997 [Page 57] Draft User-based Security Model (USEC) for SNMPv3 May 1997 SNMPv3 engines, all acting in a manager role, to coordinate their use of facilities to alter secrets in the privDESTable. " ::= { privDESMIBObjects 3 } -- Conformance Information ******************************************* privDESMIBCompliances OBJECT IDENTIFIER ::= { privDESMIBConformance 1 } privDESMIBGroups OBJECT IDENTIFIER ::= { privDESMIBConformance 2 } -- Compliance statements privDESMIBCompliance MODULE-COMPLIANCE STATUS current DESCRIPTION "The compliance statement for SNMPv3 engines which implement the SNMPv3 privDES MIB. " MODULE -- this module MANDATORY-GROUPS { privDESMIBBasicGroup } ::= { privDESMIBCompliances 1 } -- Units of compliance privDESMIBBasicGroup OBJECT-GROUP OBJECTS { privDESStatsUnknownUserNames, privDESStatsUnknownEngineIDs, privDESStatsDecryptionErrors, privDESKeyChange, privDESCloneFrom, privDESPublic, privDESStorageType, privDESStatus, privDESSecretSpinLock } STATUS current DESCRIPTION "A collection of objects providing for configuration of an SNMPv3 entity which implements the SNMPv3 DES Privacy Protocol. " ::= { privDESMIBGroups 1 } END Blumenthal/Wijnen Expires November 1997 [Page 58] Draft User-based Security Model (USEC) for SNMPv3 May 1997 8. Editor's Addresses Co-editor Uri Blumenthal IBM T. J. Watson Research postal: 30 Saw Mill River Pkwy, Hawthorne, NY 10532 USA email: uri@watson.ibm.com phone: +1-914-784-7064 Co-editor: Bert Wijnen IBM T. J. Watson Research postal: Schagen 33 3461 GL Linschoten Netherlands email: wijnen@vnet.ibm.com phone: +31-348-432-794 9. Acknowledgements This document is based on the recommendations of the SNMP Security and Administrative Framework Evolution team, comprised of David Harrington (Cabletron Systems Inc.) Jeff Johnson (Cisco) David Levi (SNMP Research Inc.) John Linn (Openvision) Russ Mundy (Trusted Information Systems) chair Shawn Routhier (Epilogue) Glenn Waters (Nortel) Bert Wijnen (IBM T. J. Watson Research) Further a lot of "cut and paste" material comes from RFC1910 and from earlier draft documents from the SNMPv2u and SNMPv2* series. Further more a special thanks is due to the SNMPv3 WG, specifically: .... Blumenthal/Wijnen Expires November 1997 [Page 59] Draft User-based Security Model (USEC) for SNMPv3 May 1997 10. Security Considerations 10.1. Recommended Practices This section describes practices that contribute to the secure, effective operation of the mechanisms defined in this memo. - A management station must discard SNMPv3 responses for which neither the msgID nor the request-id component or the represented management information corresponds to any currently outstanding request. Although it would be typical for a management station to do this as a matter of course, when using these security protocols it is significant due to the possibility of message duplication (malicious or otherwise). - A management station must generate unpredictable msgIDs and request-ids in authenticated messages in order to protect against the possibility of message duplication (malicious or otherwise). - A management station should perform time synchronization using authenticated messages in order to protect against the possibility of message duplication (malicious or otherwise). - When sending state altering messages to a managed agent, a management station should delay sending successive messages to the managed agent until a positive acknowledgement is received for the previous message or until the previous message expires. No message ordering is imposed by the SNMPv3. Messages may be received in any order relative to their time of generation and each will be processed in the ordered received. Note that when an authenticated message is sent to a managed agent, it will be valid for a period of time of approximately 150 seconds under normal circumstances, and is subject to replay during this period. Indeed, a management station must cope with the loss and re-ordering of messages resulting from anomalies in the network as a matter of course. However, a managed object, snmpSetSerialNo [RFC1907], is specifically defined for use with SNMPv2 set operations in order to provide a mechanism to ensure the processing of SNMPv2 messages occurs in a specific order. - The frequency with which the secrets of an SNMPv3 user should be changed is indirectly related to the frequency of their use. Protecting the secrets from disclosure is critical to the overall security of the protocols. Frequent use of a secret provides a continued source of data that may be useful to a cryptanalyst in Blumenthal/Wijnen Expires November 1997 [Page 60] Draft User-based Security Model (USEC) for SNMPv3 May 1997 exploiting known or perceived weaknesses in an algorithm. Frequent changes to the secret avoid this vulnerability. Changing a secret after each use is generally regarded as the most secure practice, but a significant amount of overhead may be associated with that approach. Note, too, in a local environment the threat of disclosure may be less significant, and as such the changing of secrets may be less frequent. However, when public data networks are the communication paths, more caution is prudent. 10.2 Defining Users The mechanisms defined in this document employ the notion of "users" which map into "groups" and such "groups" have access rights. How "users" are defined is subject to the security policy of the network administration. For example, users could be individuals (e.g., "joe" or "jane"), or a particular role (e.g., "operator" or "administrator"), or a combination (e.g., "joe-operator", "jane-operator" or "joe-admin"). Furthermore, a "user" may be a logical entity, such as a manager station application or set of manager station applications, acting on behalf of an individual or role, or set of individuals, or set of roles, including combinations. Appendix A describes an algorithm for mapping a user "password" to a 16 octet value for use as either a user's authentication key or privacy key (or both). Note however, that using the same password (and therefore the same key) for both authentication and privacy is very poor security practice and should be strongly discouraged. Passwords are often generated, remembered, and input by a human. Human-generated passwords may be less than the 16 octets required by the authentication and privacy protocols, and brute force attacks can be quite easy on a relatively short ASCII character set. Therefore, the algorithm is Appendix A performs a transformation on the password. If the Appendix A algorithm is used, SNMP implementations (and SNMP configuration applications) must ensure that passwords are at least 8 characters in length. Because the Appendix A algorithm uses such passwords (nearly) directly, it is very important that they not be easily guessed. It is suggested that they be composed of mixed-case alphanumeric and punctuation characters that don't form words or phrases that might be found in a dictionary. Longer passwords improve the security of the system. Users may wish to input multiword phrases to make their password string longer while ensuring that it is memorable. Since it is infeasible for human users to maintain different passwords for every engine, but security requirements strongly discourage having the same key for more than one engine, SNMPv3 Blumenthal/Wijnen Expires November 1997 [Page 61] Draft User-based Security Model (USEC) for SNMPv3 May 1997 employs a compromise proposed in [Localized-key]. It derives the user keys for the SNMPv3 engines from user's password in such a way that it is practically impossible to either determine the user's password, or user's key for another SNMPv3 engine from any combination of user's keys on SNMPv3 engines. Note however, that if user's password is disclosed, key localization will not help and network security may be compromised in this case. 10.3. Conformance To be termed a "Secure SNMPv3 implementation" based on the User-base Security model, an SNMPv3 implementation: - must implement one or more Authentication Protocol(s). The MD5 Authentication Protocol defined in this memo is one such protocol. - must, to the maximal extent possible, prohibit access to the secret(s) of each user about which it maintains information in a Security Configuration Database (SCD) under all circumstances except as required to generate and/or validate SNMPv3 messages with respect to that user. - must implement these MIBs: - SNMPv3 USEC MIB. - the authentication MIB for the authentication protocol(s) in use. The SNMPv3 AUTH-MD5 MIB defined in this memo is one such MIB. In addition, an SNMPv3 agent must provide initial configuration in accordance with Appendix A.1. Implementation of a Privacy Protocol (the Symmetric Encryption Protocol defined in this memo is one such protocol) and its related MIB (the SNMPv3 PRIV-DES MIB defined in this memo is one such MIB) is optional. Blumenthal/Wijnen Expires November 1997 [Page 62] Draft User-based Security Model (USEC) for SNMPv3 May 1997 11. References [RFC1902] The SNMPv2 Working Group, Case, J., McCloghrie, K., Rose, M., and S., Waldbusser, "Structure of Management Information for Version 2 of the Simple Network Management Protocol (SNMPv2)", RFC 1905, January 1996. [RFC1905] The SNMPv2 Working Group, Case, J., McCloghrie, K., Rose, M., and S., Waldbusser, "Protocol Operations for Version 2 of the Simple Network Management Protocol (SNMPv2)", RFC 1905, January 1996. [RFC1906] The SNMPv2 Working Group, Case, J., McCloghrie, K., Rose, M., and S. Waldbusser, "Transport Mappings for Version 2 of the Simple Network Management Protocol (SNMPv2)", RFC 1906, January 1996. [RFC1907] The SNMPv2 Working Group, Case, J., McCloghrie, K., Rose, M., and S. Waldbusser, "Management Information Base for Version 2 of the Simple Network Management Protocol (SNMPv2)", RFC 1907 January 1996. [RFC1908] The SNMPv2 Working Group, Case, J., McCloghrie, K., Rose, M., and S. Waldbusser, "Coexistence between Version 1 and Version 2 of the Internet-standard Network Management Framework", RFC 1908, January 1996. [SNMPng-ARCH] The SNMPv3 Working Group, Harrington, D., Wijnen, B., "Architectural Model for the Next Generation Simple Network Managememt Protocol (SNMPng)", draft-ietf-snmpv3-next-gen-arch-00.txt, March 1997. [SNMPv3-MPC] The SNMPv3 Working Group, Wijnen, B., Harrington, D., "Message Processing and Control Model for version 3 of the Simple Network Management Protocol (SNMPv3)", draft-ietf-snmpv3-mpc-00.txt, March 1997. [SNMPv3-LPM] The SNMPv3 Working Group, Wijnen, B., Harrington, D., "Local Processing Model for version 3 of the Simple Network Management Protocol (SNMPv3)", draft-ietf-snmpv3-lpm-00.txt, March 1997. [SNMPv3-USEC] The SNMPv3 Working Group, Blumenthal, U., Wijnen, B. "User-Based Security Model for version 3 of the Simple Network Managememt Protocol (SNMPv3)", draft-ietf-snmpv3-usec-00.txt, April 1997. [Localized-Key] U. Blumenthal, N. C. Hien, B. Wijnen Blumenthal/Wijnen Expires November 1997 [Page 63] Draft User-based Security Model (USEC) for SNMPv3 May 1997 "Key Derivation for Network Management Applications" IEEE Network Magazine, April/May issue, 1997. [KEYED-MD5] Krawczyk, H., "Keyed-MD5 for Message Authentication", Work in Progress, IBM, June 1995. [MD5] Rivest, R. "Message Digest Algorithm MD5" RFC 1321. [DES-NIST] Data Encryption Standard, National Institute of Standards and Technology. Federal Information Processing Standard (FIPS) Publication 46-1. Supersedes FIPS Publication 46, (January, 1977; reaffirmed January, 1988). [DES-ANSI] Data Encryption Algorithm, American National Standards Institute. ANSI X3.92-1981, (December, 1980). [DESO-NIST] DES Modes of Operation, National Institute of Standards and Technology. Federal Information Processing Standard (FIPS) Publication 81, (December, 1980). [DESO-ANSI] Data Encryption Algorithm - Modes of Operation, American National Standards Institute. ANSI X3.106-1983, (May 1983). [DESG-NIST] Guidelines for Implementing and Using the NBS Data Encryption Standard, National Institute of Standards and Technology. Federal Information Processing Standard (FIPS) Publication 74, (April, 1981). [DEST-NIST] Validating the Correctness of Hardware Implementations of the NBS Data Encryption Standard, National Institute of Standards and Technology. Special Publication 500-20. [DESM-NIST] Maintenance Testing for the Data Encryption Standard, National Institute of Standards and Technology. Special Publication 500-61, (August, 1980). Blumenthal/Wijnen Expires November 1997 [Page 64] Draft User-based Security Model (USEC) for SNMPv3 May 1997 APPENDIX A - Installation A.1. Engine Installation Parameters During installation, an SNMPv3 engine acting in an authoritative role is configured with several parameters. These include: (1) one or more secrets These are the authentication/privacy secrets for the first user to be configured. One way to accomplish this is to have the installer enter a "password" for each required secret. The password is then algorithmically converted into the required secret by: - forming a string of length 1,048,576 octets by repeating the value of the password as often as necessary, truncating accordingly, and using the resulting string as the input to the MD5 algorithm [MD5]. The resulting digest, termed "digest1", is used in the next step. - a second string of length 44 octets is formed by concatenating digest1, the SNMPv3 engine's snmpEngineID value, and digest1. This string is used as input to the MD5 algorithm [MD5]. The resulting digest is the required secret (see Appendix A.2). With these configured parameters, the SNMPv3 engine instantiates the following usecUserEntry in the usecUserTable: no privacy support privacy support ------------------ --------------- usecUserEngineID localEngineID localEngineID usecUserName "public" "public" usecUserGroupName "public" "public" usecUserAuthProtocol usecMD5AuthProtocol usecMD5AuthProtocol usecUserPrivProtocol none usecDESPrivProtocol usecUserStorageType permanent permanent usecUserSecurityCookie usecUserStatus active active With these configured parameters, the SNMPv3 engine instantiates the following authMD5TableEntry in the authMD5Table: no privacy support privacy support ------------------ --------------- authMD5EngineID localEngineID localEngineID authMD5UserName "public" "public" authMD5KeyChange "" "" authMD5CloneFrom ZeroDotZero ZeroDotZero Blumenthal/Wijnen Expires November 1997 [Page 65] Draft User-based Security Model (USEC) for SNMPv3 May 1997 authMD5Public "" "" authMD5StorageType permanent permanent authMD5Status active active With these configured parameters, the SNMPv3 engine instantiates the following authMD5TableEntry in the authMD5Table: no privacy support privacy support ------------------ --------------- authMD5EngineID localEngineID authMD5UserName "public" authMD5KeyChange "" authMD5CloneFrom ZeroDotZero authMD5Public "" authMD5StorageType permanent authMD5Status active Blumenthal/Wijnen Expires November 1997 [Page 66] Draft User-based Security Model (USEC) for SNMPv3 May 1997 A.2. Password to Key Algorithm The following code fragment demonstrates the password to key algorithm which can be used when mapping a password to an authentication or privacy key. The calls to MD5 are as documented in RFC1321 [RFC1321] void password_to_key( u_char *password, /* IN */ u_int passwordlen, /* IN */ u_char *agentID, /* IN - ptr to 12 octet long snmpEngineID */ u_char *key) /* OUT - caller's pointer to 16-byte buffer */ { MD5_CTX MD; u_char *cp, password_buf[64]; u_long password_index = 0; u_long count = 0, i; MD5Init (&MD); /* initialize MD5 */ /**********************************************/ /* Use while loop until we've done 1 Megabyte */ /**********************************************/ while (count < 1048576) { cp = password_buf; for (i = 0; i < 64; i++) { /*************************************************/ /* Take the next byte of the password, wrapping */ /* to the beginning of the password as necessary.*/ /*************************************************/ *cp++ = password[password_index++ % passwordlen]; } MDupdate (&MD, password_buf, 64); count += 64; } MD5Final (key, &MD); /* tell MD5 we're done */ /*****************************************************/ /* Now localize the key with the agentID and pass */ /* through MD5 to produce final key */ /*****************************************************/ memcpy(password_buf, key, 16); memcpy(password_buf+16, agentID, 12); memcpy(password_buf+28, key, 16); MD5Init(&MD); MDupdate(&MD, password_buf, 44); MD5Final(key, &MD); return; } Blumenthal/Wijnen Expires November 1997 [Page 67] Draft User-based Security Model (USEC) for SNMPv3 May 1997 A.3. Password to Key Sample The following shows a sample output of the password to key algorithm. With a password of "maplesyrup" the output of the password to key algorithm before the key is localized with the engine's engineID is: '9f af 32 83 88 4e 92 83 4e bc 98 47 d8 ed d9 63'H After the intermediate key (shown above) is localized with the snmpEngineID value of: '00 00 00 00 00 00 00 00 00 00 00 02'H the final output of the password to key algorithm is: '52 6f 5e ed 9f cc e2 6f 89 64 c2 93 07 87 d8 2b'H Blumenthal/Wijnen Expires November 1997 [Page 68] Draft User-based Security Model (USEC) for SNMPv3 May 1997 Table of Contents 0. Change Log 2 1. Introduction 3 1.1. Threats 3 1.2. Goals and Constraints 4 1.3. Security Services 5 1.4. Implementation Organization 6 1.4.1. Timeliness Module 6 1.4.2. Authentication Protocol 6 1.4.3. Privacy Protocol 7 1.5 Mechanisms to protect against Message Replay, Delay and Redirection 7 1.5.1 Authoritative SNMP Engine 7 1.5.2 The following mechanisms are used: 7 1.5.1). On receipt of a message, an authoritative engine checks the 8 2. Elements of the Model 10 2.1. SNMPv3 Users 10 2.2. Replay Protection 10 2.2.1. snmpEngineID 11 2.2.2. engineBoots and engineTime 11 2.4 for (re-)synchronization procedures). Note, however, that the 11 2.2.3. Time Window 12 2.3. Error Reporting 12 2.4. Time Synchronization 12 2.5. SNMPv3 Messages Using this Model 13 2.6 Input and Output of the User-based Security Module 13 2.6.1 Input and Output when generating an SNMPv3 Message 14 2.6.1 Input and Output when receiving an SNMPv3 Message 14 3. Elements of Procedure 17 3.1. Processing an Outgoing Message 17 3.2. Processing an Incoming Message 19 2.5, then the snmpInASNParseErrs counter [RFC1907] is 19 4. Discovery 24 5. Definitions 25 6. MD5 Authentication Protocol 33 6.1 Mechanisms 33 6.1.1. Digest Authentication Protocol 33 6.2 Elements of the Digest Authentication Protocol 34 6.2.1. SNMPv3 Users 34 6.2.2. EngineID 34 6.2.3. SNMPv3 Messages Using this Authentication Protocol 34 6.2.4 Input and Output of the MD5 Authentication Module 35 6.2.4.1 Input and Output when generating an SNMPv3 Message 35 6.2.4.2 Input and Output when receiving an SNMPv3 Message 35 6.3 Elements of Procedure 36 6.3.1 Processing an Outgoing Message 36 6.3.2 Processing an Incoming Message 36 6.4 Definitions 38 7. DES Privacy Protocol 46 7.1 Mechanisms 46 7.1.1. Symmetric Encryption Protocol 46 7.1.1.1 DES key and Initialization Vector. 47 7.1.1.2 Data Encryption. 47 7.1.1.3 Data Decryption 48 7.2 Elements of the DES Privacy Protocol 48 7.2.1. SNMPv3 Users 48 7.2.2. EngineID 48 7.2.3. SNMPv3 Messages Using this Privacy Protocol 49 7.2.4 Input and Output of the DES Privacy Module 49 7.2.4.1 Input and Output when generating an SNMPv3 Message 49 7.2.4.2 Input and Output when receiving an SNMPv3 Message 49 7.3 Elements of Procedure. 50 7.3.1 Processing an Outgoing Message 50 7.3.2 Processing an Incoming Message 51 7.4 Definitions 53 8. Editor's Addresses 59 9. Acknowledgements 59 A.1. Engine Installation Parameters 65 A.2. Password to Key Algorithm 67 A.3. Password to Key Sample 68 Blumenthal/Wijnen Expires November 1997 [Page 69]