home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1997 December / Internet_Info_CD-ROM_Walnut_Creek_December_1997.iso / drafts / draft_ietf_q_t / draft-ietf-snmpv3-usm-02.txt < prev    next >
Text File  |  1997-10-01  |  202KB  |  4,720 lines

  1.  
  2.           User-based Security Model (USM) for version 3 of the
  3.                Simple Network Management Protocol (SNMPv3)
  4.  
  5.                            30 September 1997                              4
  6.  
  7.  
  8.                             U. Blumenthal
  9.                        IBM T. J. Watson Research
  10.                            uri@watson.ibm.com
  11.  
  12.                               B. Wijnen
  13.                        IBM T. J. Watson Research
  14.                           wijnen@vnet.ibm.com
  15.  
  16.                      <draft-ietf-snmpv3-usm-02.txt>                       |
  17.  
  18.  
  19.                           Status of this Memo
  20.  
  21. This document is an Internet-Draft.  Internet-Drafts are working
  22. documents of the Internet Engineering Task Force (IETF), its areas,
  23. and its working groups.  Note that other groups may also distribute
  24. working documents as Internet-Drafts.
  25.  
  26. Internet-Drafts are draft documents valid for a maximum of six months
  27. and may be updated, replaced, or obsoleted by other documents at any
  28. time.  It is inappropriate to use Internet- Drafts as reference
  29. material or to cite them other than as ``work in progress.''
  30.  
  31. To learn the current status of any Internet-Draft, please check the
  32. ``1id-abstracts.txt'' listing contained in the Internet- Drafts Shadow
  33. Directories on ds.internic.net (US East Coast), nic.nordu.net (Europe),
  34. ftp.isi.edu (US West Coast), or munnari.oz.au (Pacific Rim).
  35.  
  36.  
  37.                           Abstract
  38.  
  39. This document describes the User-based Security Model (USM) for SNMP
  40. version 3 for use in the SNMP architecture [SNMP-ARCH].  It defines
  41. the Elements of Procedure for providing SNMP message level security.
  42. This document also includes a MIB for remotely monitoring/managing
  43. the configuration parameters for this Security Model.
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56. Blumenthal/Wijnen           Expires March 1998                 [Page  1]
  57.  
  58. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  59.  
  60.  
  61. 0.  Issues and Change Log
  62.  
  63.     When we go to RFC status, we will remove all the text of section 0.   4
  64.  
  65. 0.1.  Resolved Issues
  66.       - Is it OK to use MD5 for KeyChange Algorithm ??
  67.         We changed the TC so that we use the hash-function that           |
  68.         the user's authentication protocol (usmUserAuthProtocol)          |
  69.         is based on instead of fixing it to MD5                           |
  70.       - Improve acknowledgements and sync it up with other documents
  71.         Resolved by Russ.
  72.       - Should the USM define checking such that a received Response
  73.         messages used the same or better securityLevel than the Request
  74.         message that this is a response to.
  75.         In section 3.1 step 9, we return a completed outgoing message
  76.         to the calling module (Message Processing). We believe it is
  77.         the Message Processing Subsystem that should cache information
  78.         about outgoing messages regarding msgID and such so that a
  79.         possible Response Message can be mapped to an outstanding
  80.         request. At the same time that piece of code can then ensure
  81.         that the same securityModel and the same (or better??)
  82.         securityLevel has been used for the Response Message. So in
  83.         step 9 we do not save any cachedSecurityData for outgoing
  84.         messages.
  85.         Resolution. Statements have been added to state that this is
  86.         the responsibility of the calling Message Processing Model.
  87.         The v3MP has been changed to indeed do the check.
  88.       - At an authoritative SNMP engine we must be able to determine
  89.         if the msgAuthoritativeEngineID value used for Requests is the
  90.         local snmpEngineID. However, to do so we'd have to peek into
  91.         either the message or into the PDU. That is not clean.
  92.         Resolution. The USM must pass the securityEngineID that was
  93.         used for security purposes (i.e., the value extracted from        |
  94.         the msgAuthoritativeEngineID) so that the MP can check it
  95.         when it determines that it is a Request. The MP document has
  96.         been updated to make the check.
  97.       - An authenticated incoming message at a non-authoritative SNMP
  98.         engine always allowed the notion snmpEngineTime to be updated
  99.         (as long as it was not older than what we had). This allowed
  100.         intruders to slow down our notion of time dramatically.
  101.         Resolution. Check the value not only to be greater than
  102.         latestReceivedEngineTime but also against out notion of
  103.         time to ensure it is not older than 150 seconds. This will
  104.         have a side-effect in that if an authoritative engine ever
  105.         gets more than 150 seconds behind, then the authoritative end
  106.         MUST do explicit time synchronization.
  107.       - Should we use Integers or OIDs for identifying protocols
  108.         Resolution. Consensus is to use OID.
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115. Blumenthal/Wijnen           Expires March 1998                 [Page  2]
  116.  
  117. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  118.  
  119.  
  120. 0.2.  Change Log
  121.  
  122.    [version 3.4] September 30 version:                                    4
  123.      - these changes are marked with a revision-code "4" in right margin  4
  124.      - editorial changes based on mail exchanges between Bert/Uri         4
  125.      - Quick spell check.                                                 4
  126.      - SMICng compile the USM MIB to verify correct syntax.               4
  127.      - paginate                                                           4
  128.      - post as I-D:    <draft-ietf-snmpv3-usm-02.txt>                     4
  129.                                                                           4
  130.    [version 3.3] Internal version exchanged between editors:              3
  131.      - these changes are marked with a revision-code "3" in right margin  3
  132.      - Added section 2.6 to explain algorithm for generating localized    3
  133.        key and added the word 'localized' at various places.              3
  134.      - Added appendix A.1.2 to show example code for SHA localized key    3
  135.      - Changed text at the end of section 11.2 to state that passwords    3
  136.        and non-localized keys SHOULD NOT be stored on managed devices.    3
  137.      - changed usmSecurityParameters so that Boots/Time values are now    3
  138.        represented as INTEGERS.                                           3
  139.                                                                           3
  140.    [version 3.2] September 29 version:                                    |
  141.      - these changes are marked with a revision-code "|" in right margin  |
  142.      - fix ASN.1 definition of securityParameters                         |
  143.      - specify that wrongValue must be returned if a SET tries to set     |
  144.        an unknown or unsupported Authentication or Privacy protocol       |
  145.      - add summary of USM internal ASIs now that they were removed from   |
  146.        the architecture document. This is section 1.6.                    |
  147.      - add text to section 1 to explain usage of SHOULD, MUST and such.   |
  148.      - tried to be more consistent in use of the terms Protocol,          |
  149.        Mechanism and Algorithm.                                           |
  150.      - defined that keys for MD5 and DES MUST be 16 octets long and for   |
  151.        SHA they MUST be 20 octets long                                    |
  152.      - described that key must be extended to 64 octets before applying   |
  153.        HMAC-MD5 or HMAC-SHA algorithms.                                   |
  154.      - Fixed writeup on key use. We no longer insert/append key but       |
  155.        instead prepend it to the message before calculating the digest.   |
  156.      - tried to be more consistent and always use the term octet(s)       |
  157.        instead of byte(s).                                                |
  158.      - placed a comma after each i.e.                                     |
  159.      - Adapt Appendix samples to match rest of document(s).               |
  160.      - SMICng compile the USM MIB to verify correct syntax.               |
  161.      - Quick spell check.                                                 |
  162.                                                                           |
  163.    [version 3.1] September 25 version:                                    |
  164.      - these changes are marked with a revision-code "|" in right margin  |
  165.      - msgAuthoritativeEngineTime is an Integer32, not an Unsigned32      |
  166.      - msgUserName can be up to 32 octets long                            |
  167.      - changing authentication algorithm from MD5 to HMAC-MD5-96 and      |
  168.        HMAC-SHA-96 [RFC2104]                                              |
  169.      - Delete un-referenced references                                    |
  170.      - roll back time synchronization procedure                           |
  171.  
  172.  
  173.  
  174. Blumenthal/Wijnen           Expires March 1998                 [Page  3]
  175.  
  176. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  177.  
  178.  
  179.      - address comments from mailing list                                 |
  180.      - added section 7 to describe HMAC-SHA-96 and renumbered sections    |
  181.        8-11 as a result.                                                  |
  182.  
  183.    [version 2.2]
  184.      - formatting
  185.      - pagination
  186.  
  187.    [version 2.1] - August 1 version
  188.      - Changed max size for usmUserName from 16 to 32.
  189.        For SnmpAdminString 16 is rather short.
  190.      - incorporate comments by Uri.
  191.      - Update References
  192.      - Update acknowledgement section
  193.      - remove expectResponse parameter. It was a bad idea
  194.      - renamed snmpEngineID parameter to securityEngineID to
  195.        reduce confusion with other uses of term snmpEngineID
  196.      - added an OUT parameter securityEngineID to processIncomingMsg
  197.        primitive, so that MP can check if correct snmpEngineID was
  198.        used for Request messages.
  199.      - added some more considerations about redirected Traps.
  200.      - state that MP is responsible for matching a Response or Report
  201.        to an outstanding Request and discard it if none found.
  202.      - Discussion about msgID and request-id changed into an example,
  203.        because it is SNMPv3 MP specific and the MP MUST handle it.
  204.      - Spell check
  205.      - SMICng MIB check
  206.      - Paginate
  207.      - Post to I-D repository and SNMPv3 mailing list as:
  208.        <draft-ietf-snmpv3-usm-01.txt>
  209.  
  210.    [version 2.0] - July 28 version
  211.      - Address comments by Juergen
  212.        - fix typos and editorial changes
  213.      - Other changes
  214.        - adapt to new (synchronous) abstract service primitives
  215.        - adapt to new field names in the messages
  216.        - adapt to new parameter names for abstract data type
  217.      - Address Dave Perkins comments
  218.        - modify definition of usmSecurityParameters
  219.      - Address Dave Levi's issue on checking msgAuthoritativeEngineID
  220.        properly to local snmpEngineID for incoming Request Messages
  221.      - Address Uri issue about slow-down of non-authoritative
  222.        engine's notion of time at remote SNMP engine.
  223.      - Address Uri issue about redirection of (authenticated) Traps.
  224.        Describe it is not a problem because they come from the
  225.        authoritative SNMP engine.
  226.      - Address comments by Arnoud Zwemmer about the fact that only
  227.        Report PDUs can slow down timeliness notion
  228.  
  229.    [version 1.8]
  230.  
  231.  
  232.  
  233. Blumenthal/Wijnen           Expires March 1998                 [Page  4]
  234.  
  235. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  236.  
  237.  
  238.      - Add reference to RFC2119 about use of SHOULD and MUST
  239.      - paginate and generate table of contents
  240.      - posted as I-D <draft-ietf-snmpv3-usm-00.txt> on 15 July 1997
  241.  
  242.    [version 1.7]
  243.      - Changed the KeyChange description so it allows for other
  244.        hash algorithms instead of MD5. If in the future the MD5 gets
  245.        replaced by another Authentication -- algorithm, then it seems
  246.        we also need to use that new algorithm to -- calculate the
  247.        digest during KeyChange.
  248.      - Updated the password to key code fragment to cater for the
  249.        variable length of the snmpEngineID.
  250.      - Added issue on cacheing of data on outgoing messages and one
  251.        on required review of timeliness handling.
  252.  
  253.    [version 1.4 - version 1.6]
  254.      - Editorial changes because of internal review by authors
  255.      - Adapt to latest list of Primitive names and parameters
  256.      - Change USEC to USM
  257.      - Changes based on comments from Jeff Case.
  258.      - Checked MIB with SMICng
  259.  
  260.    [version 1.3]
  261.      - Too many changes have taken place, so marking it was skipped
  262.        The most important changes are listed here.
  263.        However, changes that just split text on different lines
  264.        and changes like different capitalization of words/terms
  265.        has not been listed. Also changes to fit new terms and such
  266.        have not been listed.
  267.      - Split/Join some lines to ensure we stay within 72 columns
  268.        as required by RFC guidelines.
  269.      - Addressed Dave Perkins comments:
  270.        1) Section 1.3, last paragraph's, timeliness was left off. -done
  271.        2) Section 1.5.1, the operations need to be made general, since
  272.           additional one may be added later.  - done
  273.        3) Section 1.5.2, the field "request-id" is used throughout
  274.           this section when it should be field "msgID"  - done
  275.        4) The document must allow the value of engineID in the
  276.           security to be a zero length string. There are several
  277.           places that are affected by this change. An actual value is
  278.           never needed, since secrets are never the same on different
  279.           agents (see your paper).  - done
  280.        5) Last sentence of description for object usmUserCloneFrom is
  281.           not correct, since the object has a OID data type - done
  282.      - Removed groupName from usmUserTable.
  283.        Now done in Access Control as agreed at 2nd interim
  284.      - Stats counters back in this document as agreed at 2nd interim
  285.      - Use AutonomousType for usmUserPrivProtocol and
  286.        usmUserAuthProtocol. Also use OBJECT-IDENTITY for the
  287.        protocol OIDs (John Flick).
  288.      - Changed "SNMPv3 engine" to "SNMP engine" at various places
  289.  
  290.  
  291.  
  292. Blumenthal/Wijnen           Expires March 1998                 [Page  5]
  293.  
  294. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  295.  
  296.  
  297.      - added appendix with sample encoding of securityParameters
  298.      - cleanup elements of procedure to use consistent terms
  299.      - fix up some problems in elements of procedure
  300.      - Do not use IMPLIED on usmUserTable as agreed at 2nd interim.
  301.        For one thing, SNMPv1 cannot handle it.
  302.      - cleanup section 2.3 and 3.3 step 7b based on comments by
  303.        Dave Levi.
  304.  
  305.    [version 1.2]
  306.      - changed (simplified) time sync in section 3 item 7.
  307.      - added usmUserMiId
  308.      - cleaned up text
  309.      - defined IV "salt" generation
  310.      - removed Statistics counters (now in MPC) and Report PDU
  311.        generation (now in MPC)
  312.      - Removed auth and DES MIBs which are now merged into
  313.        User-based Security MIB
  314.      - specified where cachedSecurityData needs to be discarded
  315.      - added abstract service interface definitions
  316.      - removed section on error reporting (is MPC responsibility)
  317.      - removed auth/priv protocol definitions, they are in ARCH now
  318.      - removed MIB definitions for snmpEngineID, Time, Boots. They
  319.        are in ARCH now.
  320.  
  321.    [version 1.1]
  322.      - removed <securityCookie>.
  323.      - added <securityIdentity>, <securityCachedData>.
  324.      - added abstract function interface description of
  325.        inter-module communications.
  326.      - modified IV generation process to accommodate messages produced
  327.        faster than one-per-second (still open).
  328.      - always update the clock regardless of whether incoming message
  329.        was Report or not (if the message was properly authenticated
  330.        and its time-stamp is ahead of our notion of their clock).
  331.  
  332.    [version 1.0]
  333.      - first version posted to the SNMPv3 editor's mailing list.
  334.      - based on v2adv slides, v2adv items and issues list and on
  335.        RFC1910 and SNMPv2u and SNMPv2* documents.
  336.      - various iterations were done by the authors via private email.
  337.  
  338.  
  339.  
  340.  
  341.  
  342.  
  343.  
  344.  
  345.  
  346.  
  347.  
  348.  
  349.  
  350.  
  351. Blumenthal/Wijnen           Expires March 1998                 [Page  6]
  352.  
  353. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  354.  
  355.  
  356. 1.  Introduction
  357.  
  358.    The Architecture for describing Internet Management Frameworks
  359.    [SNMP-ARCH] describes that an SNMP engine is composed of:
  360.  
  361.      1) a Dispatcher
  362.      2) a Message Processing Subsystem,
  363.      3) a Security Subsystem, and
  364.      4) an Access Control Subsystem.
  365.  
  366.    Applications make use of the services of these subsystems.
  367.  
  368.    It is important to understand the SNMP architecture and the
  369.    terminology of the architecture to understand where the Security
  370.    Model described in this document fits into the architecture and
  371.    interacts with other subsystems within the architecture.  The
  372.    reader is expected to have read and understood the description of
  373.    the SNMP architecture, as defined in [SNMP-ARCH].
  374.  
  375.    This memo [SNMP-USM] describes the User-based Security Model as it
  376.    is used within the SNMP Architecture.  The main idea is that we use
  377.    the traditional concept of a user (identified by a userName) with
  378.    which to associate security information.
  379.  
  380.    This memo describes the use of HMAC-MD5-96 and HMAC-SHA-96 as the      |
  381.    authentication protocols and the use of CBC-DES as the privacy         |
  382.    protocol. The User-based Security Model however allows for other       |
  383.    such protocols to be used instead of or concurrent with these          |
  384.    protocols. Therefore, the description of HMAC-MD5-96, HMAC-SHA-96      |
  385.    and CBC-DES are in separate sections to reflect their self-contained   |
  386.    nature and to indicate that they can be replaced or supplemented in    |
  387.    the future.                                                            |
  388.  
  389.    The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",    |
  390.    "SHOULD", "SHOULD NOT", "RECOMMENDED",  "MAY", and "OPTIONAL" in this  |
  391.    document are to be interpreted as described in [RFC2119].              |
  392.  
  393. 1.1.  Threats
  394.  
  395.    Several of the classical threats to network protocols are
  396.    applicable to the network management problem and therefore would
  397.    be applicable to any SNMP Security Model.  Other threats are not
  398.    applicable to the network management problem.  This section
  399.    discusses principal threats, secondary threats, and threats which
  400.    are of lesser importance.
  401.  
  402.    The principal threats against which this SNMP Security Model
  403.    should provide protection are:
  404.  
  405.    - Modification of Information
  406.      The modification threat is the danger that some unauthorized
  407.  
  408.  
  409.  
  410. Blumenthal/Wijnen           Expires March 1998                 [Page  7]
  411.  
  412. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  413.  
  414.  
  415.      entity may alter in-transit SNMP messages generated on behalf
  416.      of an authorized user in such a way as to effect unauthorized
  417.      management operations, including falsifying the value of an
  418.      object.
  419.  
  420.    - Masquerade
  421.      The masquerade threat is the danger that management operations
  422.      not authorized for some user may be attempted by assuming the
  423.      identity of another user that has the appropriate authorizations.
  424.  
  425.    Two secondary threats are also identified.  The Security Model
  426.    defined in this memo provides limited protection against:
  427.  
  428.    - Disclosure
  429.      The disclosure threat is the danger of eavesdropping on the
  430.      exchanges between managed agents and a management station.
  431.      Protecting against this threat may be required as a matter of
  432.      local policy.
  433.  
  434.    - Message Stream Modification
  435.      The SNMP protocol is typically based upon a connection-less
  436.      transport service which may operate over any sub-network service.
  437.      The re-ordering, delay or replay of messages can and does occur
  438.      through the natural operation of many such sub-network services.
  439.      The message stream modification threat is the danger that
  440.      messages may be maliciously re-ordered, delayed or replayed to
  441.      an extent which is greater than can occur through the natural
  442.      operation of a sub-network service, in order to effect
  443.      unauthorized management operations.
  444.  
  445.    There are at least two threats that an SNMP Security Model need
  446.    not protect against.  The security protocols defined in this memo
  447.    do not provide protection against:
  448.  
  449.    - Denial of Service
  450.      This SNMP Security Model does not attempt to address the broad
  451.      range of attacks by which service on behalf of authorized users
  452.      is denied.  Indeed, such denial-of-service attacks are in many
  453.      cases indistinguishable from the type of network failures with
  454.      which any viable network management protocol must cope as a
  455.      matter of course.
  456.    - Traffic Analysis
  457.      This SNMP Security Model does not attempt to address traffic
  458.      analysis attacks.  Indeed, many traffic patterns are predictable
  459.      - devices may be managed on a regular basis by a relatively small
  460.      number of management applications - and therefore there is no
  461.      significant advantage afforded by protecting against traffic
  462.      analysis.
  463.  
  464. 1.2.  Goals and Constraints
  465.  
  466.  
  467.  
  468.  
  469. Blumenthal/Wijnen           Expires March 1998                 [Page  8]
  470.  
  471. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  472.  
  473.  
  474.    Based on the foregoing account of threats in the SNMP network
  475.    management environment, the goals of this SNMP Security Model
  476.    are as follows.
  477.  
  478.    1) Provide for verification that each received SNMP message has
  479.       not been modified during its transmission through the network.
  480.  
  481.    2) Provide for verification of the identity of the user on whose
  482.       behalf a received SNMP message claims to have been generated.
  483.  
  484.    3) Provide for detection of received SNMP messages, which request
  485.       or contain management information, whose time of generation was
  486.       not recent.
  487.  
  488.    4) Provide, when necessary, that the contents of each received
  489.       SNMP message are protected from disclosure.
  490.  
  491.    In addition to the principal goal of supporting secure network
  492.    management, the design of this SNMP Security Model is also
  493.    influenced by the following constraints:
  494.  
  495.    1) When the requirements of effective management in times of
  496.       network stress are inconsistent with those of security, the
  497.       design should prefer the former.
  498.  
  499.    2) Neither the security protocol nor its underlying security
  500.       mechanisms should depend upon the ready availability of other
  501.       network services (e.g., Network Time Protocol (NTP) or key
  502.       management protocols).
  503.  
  504.    3) A security mechanism should entail no changes to the basic
  505.       SNMP network management philosophy.
  506.  
  507. 1.3.  Security Services
  508.  
  509.    The security services necessary to support the goals of this SNMP
  510.    Security Model are as follows:
  511.  
  512.    - Data Integrity
  513.      is the provision of the property that data has not been altered
  514.      or destroyed in an unauthorized manner, nor have data sequences
  515.      been altered to an extent greater than can occur non-maliciously.
  516.  
  517.    - Data Origin Authentication
  518.      is the provision of the property that the claimed identity of
  519.      the user on whose behalf received data was originated is
  520.      corroborated.
  521.  
  522.    - Data Confidentiality
  523.      is the provision of the property that information is not made
  524.      available or disclosed to unauthorized individuals, entities,
  525.  
  526.  
  527.  
  528. Blumenthal/Wijnen           Expires March 1998                 [Page  9]
  529.  
  530. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  531.  
  532.  
  533.      or processes.
  534.  
  535.    - Message timeliness and limited replay protection
  536.      is the provision of the property that a message whose generation
  537.      time is outside of a specified time window is not accepted.
  538.      Note that message reordering is not dealt with and can occur in
  539.      normal conditions too.
  540.  
  541.    For the protocols specified in this memo, it is not possible to
  542.    assure the specific originator of a received SNMP message; rather,
  543.    it is the user on whose behalf the message was originated that is
  544.    authenticated.
  545.  
  546.    For these protocols, it not possible to obtain data integrity
  547.    without data origin authentication, nor is it possible to obtain
  548.    data origin authentication without data integrity.  Further,
  549.    there is no provision for data confidentiality without both data
  550.    integrity and data origin authentication.
  551.  
  552.    The security protocols used in this memo are considered acceptably
  553.    secure at the time of writing.  However, the procedures allow for
  554.    new authentication and privacy methods to be specified at a future
  555.    time if the need arises.
  556.  
  557. 1.4.  Module Organization
  558.  
  559.    The security protocols defined in this memo are split in three
  560.    different modules and each has its specific responsibilities such
  561.    that together they realize the goals and security services
  562.    described above:
  563.  
  564.    - The authentication module MUST provide for:
  565.  
  566.      - Data Integrity,
  567.  
  568.      - Data Origin Authentication
  569.  
  570.    - The timeliness module MUST provide for:
  571.  
  572.      - Protection against message delay or replay (to an extent
  573.        greater than can occur through normal operation)
  574.  
  575.    - The privacy module MUST provide for
  576.  
  577.      - Protection against disclosure of the message payload.
  578.  
  579.    The timeliness module is fixed for the User-based Security Model
  580.    while there is provision for multiple authentication and/or
  581.    privacy modules, each of which implements a specific authentication
  582.    or privacy protocol respectively.
  583.  
  584.  
  585.  
  586.  
  587. Blumenthal/Wijnen           Expires March 1998                 [Page 10]
  588.  
  589. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  590.  
  591.  
  592. 1.4.1.  Timeliness Module
  593.  
  594.    Section 3 (Elements of Procedure) uses the timeliness values in an
  595.    SNMP message to do timeliness checking.  The timeliness check is
  596.    only performed if authentication is applied to the message.  Since
  597.    the complete message is checked for integrity, we can assume that
  598.    the timeliness values in a message that passes the authentication
  599.    module are trustworthy.
  600.  
  601. 1.4.2.  Authentication Protocol
  602.  
  603.    Section 6 describes the HMAC-MD5-96 authentication protocol which      |
  604.    is the first authentication protocol that MUST be supported with       |
  605.    the User-based Security Model.                                         |
  606.    Section 7 describes the HMAC-SHA-96 authentication protocol which      |
  607.    is another authentication protocol that SHOULD be supported with       |
  608.    the User-based Security Model.                                         |
  609.    In the future additional or replacement authentication protocols may   |
  610.    be defined as new needs arise.                                         |
  611.  
  612.    The User-based Security Model prescribes that, if authentication
  613.    is used, then the complete message is checked for integrity in
  614.    the authentication module.
  615.  
  616.    For a message to be authenticated, it needs to pass authentication
  617.    check by the authentication module and the timeliness check which
  618.    is a fixed part of this User-based Security model.
  619.  
  620. 1.4.3.  Privacy Protocol
  621.  
  622.    Section 8 describes the CBC-DES Symmetric Encryption Protocol          |
  623.    which is the first privacy protocol to be used with the
  624.    User-based Security Model.  In the future additional or
  625.    replacement privacy protocols may be defined as new needs arise.
  626.  
  627.    The User-based Security Model prescribes that the scopedPDU
  628.    is protected from disclosure when a message is sent with privacy.
  629.  
  630.    The User-based Security Model also prescribes that a message
  631.    needs to be authenticated if privacy is in use.
  632.  
  633. 1.5.  Protection against Message Replay, Delay and Redirection
  634.  
  635. 1.5.1.  Authoritative SNMP engine
  636.  
  637.    In order to protect against message replay, delay and redirection,
  638.    one of the SNMP engines involved in each communication is
  639.    designated to be the authoritative SNMP engine.  When an SNMP
  640.    message contains a payload which expects a response (for example
  641.    a Get, GetNext, GetBulk, Set or Inform PDU), then the receiver of
  642.    such messages is authoritative.  When an SNMP message contains a
  643.  
  644.  
  645.  
  646. Blumenthal/Wijnen           Expires March 1998                 [Page 11]
  647.  
  648. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  649.  
  650.  
  651.    payload which does not expect a response (for example an
  652.    SNMPv2-Trap, Response or Report PDU), then the sender of such a
  653.    message is authoritative.
  654.  
  655. 1.5.2.  Mechanisms
  656.  
  657.    The following mechanisms are used:
  658.  
  659.    1) To protect against the threat of message delay or replay (to an
  660.       extent greater than can occur through normal operation), a set
  661.       of timeliness indicators (for the authoritative SNMP engine) are
  662.       included in each message generated.  An SNMP engine evaluates
  663.       the timeliness indicators to determine if a received message is
  664.       recent.  An SNMP engine may evaluate the timeliness indicators
  665.       to ensure that a received message is at least as recent as the
  666.       last message it received from the same source.
  667.       A non-authoritative SNMP engine uses received authentic messages
  668.       to advance its notion of the timeliness indicators at the remote
  669.       authoritative source.
  670.  
  671.       An SNMP engine MUST also use a mechanism to match incoming
  672.       Responses to outstanding Requests and it MUST drop any Responses
  673.       that do not match an outstanding request. For example, a msgID
  674.       can be inserted in every message to cater for this functionality.
  675.  
  676.       These mechanisms provide for the detection of authenticated
  677.       messages whose time of generation was not recent.
  678.  
  679.       This protection against the threat of message delay or replay
  680.       does not imply nor provide any protection against unauthorized
  681.       deletion or suppression of messages.  Also, an SNMP engine may
  682.       not be able to detect message reordering if all the messages
  683.       involved are sent within the Time Window interval.  Other
  684.       mechanisms defined independently of the security protocol can
  685.       also be used to detect the re-ordering replay, deletion, or
  686.       suppression of messages containing Set operations (e.g., the
  687.       MIB variable snmpSetSerialNo [RFC1907]).
  688.  
  689.    2) Verification that a message sent to/from one authoritative SNMP
  690.       engine cannot be replayed to/as-if-from another authoritative
  691.       SNMP engine.
  692.  
  693.       Included in each message is an identifier unique to the
  694.       authoritative SNMP engine associated with the sender or intended
  695.       recipient of the message.
  696.  
  697.       A Report, Response or Trap message sent by an authoritative SNMP
  698.       engine to one non-authoritative SNMP engine can potentially be
  699.       replayed to another non-authoritative SNMP engine. The latter
  700.       non-authoritative SNMP engine might (if it knows about the same
  701.       userName with the same secrets at the authoritative SNMP engine)
  702.  
  703.  
  704.  
  705. Blumenthal/Wijnen           Expires March 1998                 [Page 12]
  706.  
  707. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  708.  
  709.  
  710.       as a result update its notion of timeliness indicators of the
  711.       authoritative SNMP engine, but that is not considered a threat.
  712.       In this case, A Report or Response message will be discarded by
  713.       the Message Processing Model, because there should not be an
  714.       outstanding Request message. A Trap will possibly be accepted.
  715.       Again, that is not considered a threat, because the communication
  716.       was authenticated and timely. It is as if the authoritative SNMP
  717.       engine was configured to start sending Traps to the second SNMP
  718.       engine, which theoretically can happen without the knowledge of
  719.       the second SNMP engine anyway. Anyway, the second SNMP engine may
  720.       not expect to receive this Trap, but is allowed to see the
  721.       management information contained in it.
  722.  
  723.    3) Detection of messages which were not recently generated.
  724.  
  725.       A set of time indicators are included in the message, indicating
  726.       the time of generation.  Messages without recent time indicators
  727.       are not considered authentic.  In addition, an SNMP engine MUST
  728.       drop any Responses that do not match an outstanding request. This
  729.       however is the responsibility of the Message Processing Model.
  730.  
  731.    This memo allows the same user to be defined on multiple SNMP
  732.    engines.  Each SNMP engine maintains a value, snmpEngineID,
  733.    which uniquely identifies the SNMP engine.  This value is included
  734.    in each message sent to/from the SNMP engine that is authoritative
  735.    (see section 1.5.1).  On receipt of a message, an authoritative
  736.    SNMP engine checks the value to ensure that it is the intended
  737.    recipient, and a non-authoritative SNMP engine uses the value to
  738.    ensure that the message is processed using the correct state
  739.    information.
  740.  
  741.    Each SNMP engine maintains two values, snmpEngineBoots and
  742.    snmpEngineTime, which taken together provide an indication of
  743.    time at that SNMP engine.  Both of these values are included in
  744.    an authenticated message sent to/received from that SNMP engine.
  745.    On receipt, the values are checked to ensure that the indicated
  746.    timeliness value is within a Time Window of the current time.
  747.    The Time Window represents an administrative upper bound on
  748.    acceptable delivery delay for protocol messages.
  749.  
  750.    For an SNMP engine to generate a message which an authoritative
  751.    SNMP engine will accept as authentic, and to verify that a message
  752.    received from that authoritative SNMP engine is authentic, such an
  753.    SNMP engine must first achieve timeliness synchronization with the
  754.    authoritative SNMP engine. See section 2.3.
  755.  
  756. 1.6.  Abstract Service Interfaces.                                        |
  757.                                                                           |
  758.    Abstract service interfaces have been defined to describe the          |
  759.    conceptual interfaces between the various subsystems within an SNMP    |
  760.    entity. Similarly a set of abstract service interfaces have been       |
  761.  
  762.  
  763.  
  764. Blumenthal/Wijnen           Expires March 1998                 [Page 13]
  765.  
  766. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  767.  
  768.  
  769.    defined within the User-based Security Model (USM) to describe the     |
  770.    conceptual interfaces between the generic USM services and the         |
  771.    self-contained authentication and privacy services.                    |
  772.                                                                           |
  773.    These abstract service interfaces are defined by a set of primitives   |
  774.    that define the services provided and the abstract data elements that  |
  775.    must be passed when the services are invoked. This section lists the   4
  776.    primitives that have been defined for the User-based Security Model.   4
  777.                                                                           |
  778. 1.6.1.  User-based Security Model Primitives for Authentication           |
  779.                                                                           |
  780.    The User-based Security Model provides the following internal          |
  781.    primitives to pass data back and forth between the Security Model      |
  782.    itself and the authentication service:                                 |
  783.                                                                           |
  784.    statusInformation =                                                    |
  785.      authenticateOutgoingMsg(                                             |
  786.      IN   authKey                   -- secret key for authentication      |
  787.      IN   wholeMsg                  -- unauthenticated complete message   |
  788.      OUT  authenticatedWholeMsg     -- complete authenticated message     |
  789.           )                                                               |
  790.                                                                           |
  791.    statusInformation =                                                    |
  792.      authenticateIncomingMsg(                                             |
  793.      IN   authKey                   -- secret key for authentication      |
  794.      IN   authParameters            -- as received on the wire            |
  795.      IN   wholeMsg                  -- as received on the wire            |
  796.      OUT  authenticatedWholeMsg     -- complete authenticated message     |
  797.           )                                                               |
  798.                                                                           |
  799. 1.6.2.  User-based Security Model Primitives for Privacy                  |
  800.                                                                           |
  801.    The User-based Security Model provides the following internal          |
  802.    primitives to pass data back and forth between the Security Model      |
  803.    itself and the privacy service:                                        |
  804.                                                                           |
  805.    statusInformation =                                                    |
  806.      encryptData(                                                         |
  807.      IN    encryptKey               -- secret key for encryption          |
  808.      IN    dataToEncrypt            -- data to encrypt (scopedPDU)        |
  809.      OUT   encryptedData            -- encrypted data (encryptedPDU)      |
  810.      OUT   privParameters           -- filled in by service provider      |
  811.            )                                                              |
  812.                                                                           |
  813.    statusInformation =                                                    |
  814.      decryptData(                                                         |
  815.      IN    decryptKey               -- secret key for decrypting          |
  816.      IN    privParameters           -- as received on the wire            |
  817.      IN    encryptedData            -- encrypted data (encryptedPDU)      |
  818.      OUT   decryptedData            -- decrypted data (scopedPDU)         |
  819.            )                                                              |
  820.  
  821.  
  822.  
  823. Blumenthal/Wijnen           Expires March 1998                 [Page 14]
  824.  
  825. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  826.  
  827.  
  828. 2.  Elements of the Model
  829.  
  830.    This section contains definitions required to realize the security
  831.    model defined by this memo.
  832.  
  833. 2.1.  User-based Security Model Users
  834.  
  835.    Management operations using this Security Model make use of a
  836.    defined set of user identities.  For any user on whose behalf
  837.    management operations are authorized at a particular SNMP engine,
  838.    that SNMP engine must have knowledge of that user.  An SNMP engine
  839.    that wishes to communicate with another SNMP engine must also have
  840.    knowledge of a user known to that engine, including knowledge of
  841.    the applicable attributes of that user.
  842.  
  843.    A user and its attributes are defined as follows:
  844.  
  845.    userName
  846.      A string representing the name of the user.
  847.  
  848.    securityName
  849.      A human-readable string representing the user in a format that
  850.      is Security Model independent.
  851.  
  852.    authProtocol
  853.      An indication of whether messages sent on behalf of this user can
  854.      be authenticated, and if so, the type of authentication protocol
  855.      which is used.  Two such protocols are defined in this memo:         |
  856.        - the HMAC-MD5-96 authentication protocol.                         |
  857.        - the HMAC-SHA-96 authentication protocol.                         |
  858.  
  859.    authKey
  860.      If messages sent on behalf of this user can be authenticated,
  861.      the (private) authentication key for use with the authentication
  862.      protocol.  Note that a user's authentication key will normally
  863.      be different at different authoritative SNMP engines. The authKey    |
  864.      is not accessible via SNMP. The length requirements of the authKey   |
  865.      are defined by the authProtocol in use.                              |
  866.  
  867.    authKeyChange and authOwnKeyChange
  868.      The only way to remotely update the authentication key.  Does
  869.      that in a secure manner, so that the update can be completed
  870.      without the need to employ privacy protection.
  871.  
  872.    privProtocol
  873.      An indication of whether messages sent on behalf of this user
  874.      can be protected from disclosure, and if so, the type of privacy
  875.      protocol which is used.  One such protocol is defined in this
  876.      memo: the CBC-DES Symmetric Encryption Protocol.                     |
  877.  
  878.    privKey
  879.  
  880.  
  881.  
  882. Blumenthal/Wijnen           Expires March 1998                 [Page 15]
  883.  
  884. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  885.  
  886.  
  887.      If messages sent on behalf of this user can be en/decrypted,
  888.      the (private) privacy key for use with the privacy protocol.
  889.      Note that a user's privacy key will normally be different at
  890.      different authoritative SNMP engines. The privKey is not
  891.      accessible via SNMP. The length requirements of the privKey are      |
  892.      defined by the privProtocol in use.                                  |
  893.  
  894.    privKeyChange and privOwnKeyChange
  895.      The only way to remotely update the encryption key. Does that
  896.      in a secure manner, so that the update can be completed without
  897.      the need to employ privacy protection.
  898.  
  899.  
  900. 2.2.  Replay Protection
  901.  
  902.    Each SNMP engine maintains three objects:
  903.  
  904.    - snmpEngineID, which (at least within an administrative domain)
  905.      uniquely and unambiguously identifies an SNMP engine.
  906.  
  907.    - snmpEngineBoots, which is a count of the number of times the
  908.      SNMP engine has re-booted/re-initialized since snmpEngineID
  909.      was last configured; and,
  910.  
  911.    - snmpEngineTime, which is the number of seconds since the
  912.      snmpEngineBoots counter was last incremented.
  913.  
  914.    Each SNMP engine is always authoritative with respect to these
  915.    objects in its own SNMP entity.  It is the responsibility of a
  916.    non-authoritative SNMP engine to synchronize with the
  917.    authoritative SNMP engine, as appropriate.
  918.  
  919.    An authoritative SNMP engine is required to maintain the values of
  920.    its snmpEngineID and snmpEngineBoots in non-volatile storage.
  921.  
  922. 2.2.1.  msgAuthoritativeEngineID
  923.  
  924.    The msgAuthoritativeEngineID value contained in an authenticated
  925.    message is used to defeat attacks in which messages from one SNMP
  926.    engine to another SNMP engine are replayed to a different SNMP
  927.    engine. It represents the snmpEngineID at the authoritative SNMP
  928.    engine involved in the exchange of the message.
  929.  
  930.    When an authoritative SNMP engine is first installed, it sets its
  931.    local value of snmpEngineID according to a enterprise-specific
  932.    algorithm (see the definition of the Textual Convention for
  933.    SnmpEngineID in the SNMP Architecture document [SNMP-ARCH]).
  934.  
  935. 2.2.2.  msgAuthoritativeEngineBoots and msgAuthoritativeEngineTime
  936.  
  937.    The msgAuthoritativeEngineBoots and msgAuthoritativeEngineTime
  938.  
  939.  
  940.  
  941. Blumenthal/Wijnen           Expires March 1998                 [Page 16]
  942.  
  943. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  944.  
  945.  
  946.    values contained in an authenticated message are used to defeat
  947.    attacks in which messages are replayed when they are no longer
  948.    valid.  They represent the snmpEngineBoots and snmpEngineTime
  949.    values at the authoritative SNMP engine involved in the exchange
  950.    of the message.
  951.  
  952.    Through use of snmpEngineBoots and snmpEngineTime, there is no
  953.    requirement for an SNMP engine to have a non-volatile clock which
  954.    ticks (i.e., increases with the passage of time) even when the
  955.    SNMP engine is powered off.  Rather, each time an SNMP engine
  956.    re-boots, it retrieves, increments, and then stores snmpEngineBoots
  957.    in non-volatile storage, and resets snmpEngineTime to zero.
  958.  
  959.    When an SNMP engine is first installed, it sets its local values
  960.    of snmpEngineBoots and snmpEngineTime to zero.  If snmpEngineTime
  961.    ever reaches its maximum value (2147483647), then snmpEngineBoots
  962.    is incremented as if the SNMP engine has re-booted and
  963.    snmpEngineTime is reset to zero and starts incrementing again.
  964.  
  965.    Each time an authoritative SNMP engine re-boots, any SNMP engines
  966.    holding that authoritative SNMP engine's values of snmpEngineBoots
  967.    and snmpEngineTime need to re-synchronize prior to sending
  968.    correctly authenticated messages to that authoritative SNMP engine
  969.    (see Section 2.3 for (re-)synchronization procedures).  Note,
  970.    however, that the procedures do provide for a notification to be
  971.    accepted as authentic by a receiving SNMP engine, when sent by an
  972.    authoritative SNMP engine which has re-booted since the receiving
  973.    SNMP engine last (re-)synchronized.
  974.  
  975.    If an authoritative SNMP engine is ever unable to determine its
  976.    latest snmpEngineBoots value, then it must set its snmpEngineBoots
  977.    value to 2147483647.                                                   3
  978.                                                                           3
  979.    Whenever the local value of snmpEngineBoots has the value 2147483647   3
  980.    it latches at that value and an authenticated message always causes    3
  981.    an notInTimeWindow authentication failure.                             3
  982.  
  983.    In order to reset an SNMP engine whose snmpEngineBoots value has
  984.    reached the value 2147483647, manual intervention is required.         3
  985.    The engine must be physically visited and re-configured, either
  986.    with a new snmpEngineID value, or with new secret values for the
  987.    authentication and privacy protocols of all users known to that
  988.    SNMP engine. Note that even if an SNMP engine re-boots once a second   3
  989.    that it would still take approximately 68 years before the max value   3
  990.    of 2147483647 would be reached.                                        3
  991.  
  992. 2.2.3.  Time Window
  993.  
  994.    The Time Window is a value that specifies the window of time in
  995.    which a message generated on behalf of any user is valid.  This
  996.    memo specifies that the same value of the Time Window, 150 seconds,
  997.  
  998.  
  999.  
  1000. Blumenthal/Wijnen           Expires March 1998                 [Page 17]
  1001.  
  1002. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  1003.  
  1004.  
  1005.    is used for all users.
  1006.  
  1007. 2.3.  Time Synchronization
  1008.  
  1009.    Time synchronization, required by a non-authoritative SNMP engine
  1010.    in order to proceed with authentic communications, has occurred
  1011.    when the non-authoritative SNMP engine has obtained a local notion
  1012.    of the authoritative SNMP engine's values of snmpEngineBoots and
  1013.    snmpEngineTime from the authoritative SNMP engine.  These values
  1014.    must be (and remain) within the authoritative SNMP engine's Time
  1015.    Window.  So the local notion of the authoritative SNMP engine's
  1016.    values must be kept loosely synchronized with the values stored
  1017.    at the authoritative SNMP engine.  In addition to keeping a local
  1018.    copy of snmpEngineBoots and snmpEngineTime from the authoritative
  1019.    SNMP engine, a non-authoritative SNMP engine must also keep one
  1020.    local variable, latestReceivedEngineTime.  This value records the
  1021.    highest value of snmpEngineTime that was received by the
  1022.    non-authoritative SNMP engine from the authoritative SNMP engine
  1023.    and is used to eliminate the possibility of replaying messages
  1024.    that would prevent the non-authoritative SNMP engine's notion of
  1025.    the snmpEngineTime from advancing.
  1026.  
  1027.    A non-authoritative SNMP engine must keep local notions of these
  1028.    values for each authoritative SNMP engine with which it wishes to
  1029.    communicate.  Since each authoritative SNMP engine is uniquely
  1030.    and unambiguously identified by its value of snmpEngineID, the
  1031.    non-authoritative SNMP engine may use this value as a key in
  1032.    order to cache its local notions of these values.
  1033.  
  1034.    Time synchronization occurs as part of the procedures of receiving
  1035.    an SNMP message (Section 3.2, step 7b). As such, no explicit time      |
  1036.    synchronization procedure is required by a non-authoritative SNMP      |
  1037.    engine.  Note, that whenever the local value of snmpEngineID is        |
  1038.    changed (e.g., through discovery) or when secure communications        |
  1039.    are first established with an authoritative SNMP engine, the local     |
  1040.    values of snmpEngineBoots and latestReceivedEngineTime should be       |
  1041.    set to zero.  This will cause the time synchronization to occur        |
  1042.    when the next authentic message is received.                           |
  1043.  
  1044.    Note, that whenever the local value of snmpEngineID is changed
  1045.    (e.g., through discovery) or when secure communications are first
  1046.    established with an authoritative SNMP engine, the local values of
  1047.    snmpEngineBoots and latestReceivedEngineTime should be set to zero.
  1048.    This will cause the time synchronization to occur when the next
  1049.    authentic message is received.
  1050.  
  1051.  
  1052.  
  1053.  
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059. Blumenthal/Wijnen           Expires March 1998                 [Page 18]
  1060.  
  1061. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  1062.  
  1063.  
  1064. 2.4.  SNMP Messages Using this Security Model
  1065.  
  1066.    The syntax of an SNMP message using this Security Model adheres
  1067.    to the message format defined in the version-specific Message
  1068.    Processing Model document (for example [SNMP-MP]).
  1069.  
  1070.    The field msgSecurityParameters in SNMPv3 messages has a data type
  1071.    of OCTET STRING.  Its value is the BER serialization of the
  1072.    following ASN.1 sequence:
  1073.  
  1074.    USMSecurityParametersSyntax DEFINITIONS IMPLICIT TAGS ::= BEGIN        |
  1075.                                                                           4
  1076.       UsmSecurityParameters ::=
  1077.           SEQUENCE {
  1078.            -- global User-based security parameters
  1079.               msgAuthoritativeEngineID     OCTET STRING,                  |
  1080.               msgAuthoritativeEngineBoots  INTEGER (0..2147483647),       3
  1081.               msgAuthoritativeEngineTime   INTEGER (0..2147483647),       3
  1082.               msgUserName                  OCTET STRING (SIZE(1..32)),    |
  1083.            -- authentication protocol specific parameters
  1084.               msgAuthenticationParameters  OCTET STRING,
  1085.            -- privacy protocol specific parameters
  1086.               msgPrivacyParameters         OCTET STRING                   |
  1087.           }
  1088.    END
  1089.  
  1090.    The fields of this sequence are:
  1091.  
  1092.    - The msgAuthoritativeEngineID specifies the snmpEngineID of the
  1093.      authoritative SNMP engine involved in the exchange of the message.
  1094.  
  1095.    - The msgAuthoritativeEngineBoots specifies the snmpEngineBoots
  1096.      value at the authoritative SNMP engine involved in the exchange
  1097.      of the message.
  1098.  
  1099.    - The msgAuthoritativeEngineTime specifies the snmpEngineTime value
  1100.      at the authoritative SNMP engine involved in the exchange of the
  1101.      message.
  1102.  
  1103.    - The msgUserName specifies the user (principal) on whose behalf
  1104.      the message is being exchanged.
  1105.  
  1106.    - The msgAuthenticationParameters are defined by the authentication
  1107.      protocol in use for the message, as defined by the
  1108.      usmUserAuthProtocol column in the user's entry in the usmUserTable.
  1109.  
  1110.    - The msgPrivacyParameters are defined by the privacy protocol in
  1111.      use for the message, as defined by the usmUserPrivProtocol column
  1112.      in the user's entry in the usmUserTable).
  1113.  
  1114.    See appendix A.4 for an example of the BER encoding of field
  1115.  
  1116.  
  1117.  
  1118. Blumenthal/Wijnen           Expires March 1998                 [Page 19]
  1119.  
  1120. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  1121.  
  1122.  
  1123.    msgSecurityParameters.
  1124.  
  1125. 2.5.  Services provided by the User-based Security Model
  1126.  
  1127.    This section describes the services provided by the User-based
  1128.    Security Model with their inputs and outputs.
  1129.  
  1130.    The services are described as primitives of an abstract service
  1131.    interface and the inputs and outputs are described as abstract data
  1132.    elements as they are passed in these abstract service primitives.
  1133.  
  1134.  
  1135. 2.5.1.  Services for Generating an Outgoing SNMP Message
  1136.  
  1137.    When the Message Processing (MP) Subsystem invokes the User-based
  1138.    Security module to secure an outgoing SNMP message, it must use
  1139.    the appropriate service as provided by the Security module.  These
  1140.    two services are provided:
  1141.  
  1142.    1) A service to generate a Request message. The abstract service
  1143.       primitive is:
  1144.  
  1145.       statusInformation =            -- success or errorIndication
  1146.         generateRequestMsg(
  1147.         IN   messageProcessingModel  -- typically, SNMP version
  1148.         IN   globalData              -- message header, admin data
  1149.         IN   maxMessageSize          -- of the sending SNMP entity
  1150.         IN   securityModel           -- for the outgoing message
  1151.         IN   securityEngineID        -- authoritative SNMP entity
  1152.         IN   securityName            -- on behalf of this principal
  1153.         IN   securityLevel           -- Level of Security requested
  1154.         IN   scopedPDU               -- message (plaintext) payload
  1155.         OUT  securityParameters      -- filled in by Security Module
  1156.         OUT  wholeMsg                -- complete generated message
  1157.         OUT  wholeMsgLength          -- length of generated message
  1158.              )
  1159.  
  1160.    2) A service to generate a Response message. The abstract service
  1161.       primitive is:
  1162.  
  1163.       statusInformation =            -- success or errorIndication
  1164.         generateResponseMsg(
  1165.         IN   messageProcessingModel  -- typically, SNMP version
  1166.         IN   globalData              -- message header, admin data
  1167.         IN   maxMessageSize          -- of the sending SNMP entity
  1168.         IN   securityModel           -- for the outgoing message
  1169.         IN   securityEngineID        -- authoritative SNMP entity
  1170.         IN   securityName            -- on behalf of this principal
  1171.         IN   securityLevel           -- Level of Security requested
  1172.         IN   scopedPDU               -- message (plaintext) payload
  1173.         IN   securityStateReference  -- reference to security state
  1174.  
  1175.  
  1176.  
  1177. Blumenthal/Wijnen           Expires March 1998                 [Page 20]
  1178.  
  1179. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  1180.  
  1181.  
  1182.                                      -- information from original
  1183.                                      -- request
  1184.         OUT  securityParameters      -- filled in by Security Module
  1185.         OUT  wholeMsg                -- complete generated message
  1186.         OUT  wholeMsgLength          -- length of generated message
  1187.              )
  1188.  
  1189.    The abstract data elements passed as parameters in the abstract
  1190.    service primitives are as follows:
  1191.  
  1192.     statusInformation
  1193.       An indication of whether the encoding and securing of the message
  1194.       was successful.  If not it is an indication of the problem.
  1195.     messageProcessingModel
  1196.       The SNMP version number for the message to be generated.
  1197.       This data is not used by the User-based Security module.
  1198.     globalData
  1199.       The message header (i.e., its administrative information). This     |
  1200.       data is not used by the User-based Security module.
  1201.     maxMessageSize
  1202.       The maximum message size as included in the message.
  1203.       This data is not used by the User-based Security module.
  1204.     securityParameters
  1205.       These are the security parameters. They will be filled in
  1206.       by the User-based Security module.
  1207.     securityModel
  1208.       The securityModel in use. Should be User-based Security Model.
  1209.       This data is not used by the User-based Security module.
  1210.     securityName
  1211.       Together with the snmpEngineID it identifies a row in the
  1212.       usmUserTable that is to be used for securing the message.
  1213.       The securityName has a format that is independent of the
  1214.       Security Model. In case of a response this parameter is
  1215.       ignored and the value from the cash is used.
  1216.     securityLevel
  1217.       The Level of Security from which the User-based Security
  1218.       module determines if the message needs to be protected from
  1219.       disclosure and if the message needs to be authenticated.
  1220.       In case of a response this parameter is ignored and the value
  1221.       from the cash is used.
  1222.     securityEngineID
  1223.       The snmpEngineID of the authoritative SNMP engine to which a
  1224.       Request message is to be sent. In case of a response it is
  1225.       implied to be the processing SNMP engine's snmpEngineID and
  1226.       so if it is specified, then it is ignored.
  1227.     scopedPDU
  1228.       The message payload.  The data is opaque as far as the
  1229.       User-based Security Model is concerned.
  1230.     securityStateReference
  1231.       A handle/reference to cachedSecurityData to be used when
  1232.       securing an outgoing Response message.  This is the exact same
  1233.  
  1234.  
  1235.  
  1236. Blumenthal/Wijnen           Expires March 1998                 [Page 21]
  1237.  
  1238. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  1239.  
  1240.  
  1241.       handle/reference as it was generated by the User-based Security
  1242.       module when processing the incoming Request message to which
  1243.       this is the Response message.
  1244.     wholeMsg
  1245.       The fully encoded and secured message ready for sending on
  1246.       the wire.
  1247.     wholeMsgLength
  1248.       The length of the encoded and secured message (wholeMsg).
  1249.  
  1250.    Upon completion of the process, the User-based Security module
  1251.    returns statusInformation. If the process was successful, the
  1252.    completed message with privacy and authentication applied if such
  1253.    was requested by the specified securityLevel. If the process was
  1254.    not successful, then an errorIndication is returned.
  1255.  
  1256. 2.5.2.  Services for Processing an Incoming SNMP Message
  1257.  
  1258.    When the Message Processing (MP) Subsystem invokes the User-based
  1259.    Security module to verify proper security of an incoming message,
  1260.    it must use the service provided for an incoming message. The
  1261.    abstract service primitive is:
  1262.  
  1263.    statusInformation =             -- errorIndication or success
  1264.                                    -- error counter OID/value if error
  1265.      processIncomingMsg(
  1266.      IN   messageProcessingModel   -- typically, SNMP version
  1267.      IN   maxMessageSize           -- of the sending SNMP entity
  1268.      IN   securityParameters       -- for the received message
  1269.      IN   securityModel            -- for the received message
  1270.      IN   securityLevel            -- Level of Security
  1271.      IN   wholeMsg                 -- as received on the wire
  1272.      IN   wholeMsgLength           -- length as received on the wire
  1273.      OUT  securityEngineID         -- authoritative SNMP entity
  1274.      OUT  securityName             -- identification of the principal
  1275.      OUT  scopedPDU,               -- message (plaintext) payload
  1276.      OUT  maxSizeResponseScopedPDU -- maximum size of the Response PDU
  1277.      OUT  securityStateReference   -- reference to security state
  1278.           )                        -- information, needed for response
  1279.  
  1280.    The abstract data elements passed as parameters in the abstract
  1281.    service primitives are as follows:
  1282.  
  1283.     statusInformation
  1284.       An indication of whether the process was successful or not.
  1285.       If not, then the statusInformation includes the OID and the
  1286.       value of the error counter that was incremented.
  1287.     messageProcessingModel
  1288.       The SNMP version number as received in the message.
  1289.       This data is not used by the User-based Security module.
  1290.     maxMessageSize
  1291.       The maximum message size as included in the message.
  1292.  
  1293.  
  1294.  
  1295. Blumenthal/Wijnen           Expires March 1998                 [Page 22]
  1296.  
  1297. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  1298.  
  1299.  
  1300.       The User-based Security module uses this value to calculate the
  1301.       maxSizeResponseScopedPDU.
  1302.     securityParameters
  1303.       These are the security parameters as received in the message.
  1304.     securityModel
  1305.       The securityModel in use.
  1306.       Should be the User-based Security Model.
  1307.       This data is not used by the User-based Security module.
  1308.     securityLevel
  1309.       The Level of Security from which the User-based Security
  1310.       module determines if the message needs to be protected from
  1311.       disclosure and if the message needs to be authenticated.
  1312.     wholeMsg
  1313.       The whole message as it was received.
  1314.     wholeMsgLength
  1315.       The length of the message as it was received (wholeMsg).
  1316.     securityEngineID
  1317.       The snmpEngineID that was extracted from the field
  1318.       msgAuthoritativeEngineID and that was used to lookup the secrets
  1319.       in the usmUserTable.
  1320.     securityName
  1321.       The security name representing the user on whose behalf the
  1322.       message was received.  The securityName has a format that is
  1323.       independent of the Security Model.
  1324.     scopedPDU
  1325.       The message payload.  The data is opaque as far as the
  1326.       User-based Security Model is concerned.
  1327.     maxSizeResponseScopedPDU
  1328.       The maximum size of a scopedPDU to be included in a possible
  1329.       Response message.  The User-base Security module calculates
  1330.       this size based on the mms (as received in the message) and
  1331.       the space required for the message header (including the
  1332.       securityParameters) for such a Response message.
  1333.     securityStateReference
  1334.       A handle/reference to cachedSecurityData to be used when
  1335.       securing an outgoing Response message.  When the Message
  1336.       Processing Subsystem calls the User-based Security module to
  1337.       generate a response to this incoming message it must pass this
  1338.       handle/reference.
  1339.  
  1340.    Upon completion of the process, the User-based Security module
  1341.    returns statusInformation and, if the process was successful,
  1342.    the additional data elements for further processing of the message.
  1343.    If the process was not successful, then an errorIndication,
  1344.    possibly with a OID and value pair of an error counter that was
  1345.    incremented.
  1346.  
  1347. 2.6.  Key Localization Algorithm.                                         3
  1348.                                                                           3
  1349.    A localized key is a secret key shared between a user U and one        3
  1350.    authoritative SNMP engine E.  Even though a user may have only one     3
  1351.  
  1352.  
  1353.  
  1354. Blumenthal/Wijnen           Expires March 1998                 [Page 23]
  1355.  
  1356. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  1357.  
  1358.  
  1359.    password and therefore one key for the whole network, the actual       3
  1360.    secrets shared between the user and each authoritative SNMP engine     3
  1361.    will be different. This is achieved by key localization                3
  1362.    [Localized-key].                                                       3
  1363.                                                                           3
  1364.    First, if a user uses a password, then the user's password is          3
  1365.    converted into a key Ku using one of the two algorithms described      4
  1366.    in Appendices A.2.1 and A.2.2.                                         3
  1367.                                                                           3
  1368.    To convert key Ku into a localized key Kul of user U at the            4
  1369.    authoritative SNMP engine E, one appends the snmpEngineID of the       3
  1370.    authoritative SNMP engine to the key Ku and then appends the key Ku    4
  1371.    to the result, thus enveloping the snmpEngineID within the two         3
  1372.    copies of user's key Ku. Then one runs a secure hash function          4
  1373.    (which one depends on the authentication protocol defined for this     3
  1374.    user U at authoritative SNMP engine E; this document defines two       3
  1375.    authentication protocols with their associated algorithms based on     3
  1376.    MD5 and SHA). The output of the hash-function is the localized key     3
  1377.    Kul for user U at the authoritative SNMP engine E.                     4
  1378.                                                                           3
  1379.  
  1380.  
  1381.  
  1382.  
  1383.  
  1384.  
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390.  
  1391.  
  1392.  
  1393.  
  1394.  
  1395.  
  1396.  
  1397.  
  1398.  
  1399.  
  1400.  
  1401.  
  1402.  
  1403.  
  1404.  
  1405.  
  1406.  
  1407.  
  1408.  
  1409.  
  1410.  
  1411.  
  1412.  
  1413. Blumenthal/Wijnen           Expires March 1998                 [Page 24]
  1414.  
  1415. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  1416.  
  1417.  
  1418. 3.  Elements of Procedure
  1419.  
  1420.    This section describes the security related procedures followed by
  1421.    an SNMP engine when processing SNMP messages according to the
  1422.    User-based Security Model.
  1423.  
  1424. 3.1.  Generating an Outgoing SNMP Message
  1425.  
  1426.    This section describes the procedure followed by an SNMP engine
  1427.    whenever it generates a message containing a management operation
  1428.    (like a request, a response, a notification, or a report) on
  1429.    behalf of a user, with a particular securityLevel.
  1430.  
  1431.    1)  a) If any securityStateReference is passed (Response message),
  1432.           then information concerning the user is extracted from the
  1433.           cachedSecurityData.  The securityEngineID and the
  1434.           securityLevel are extracted from the cachedSecurityData.
  1435.           The cachedSecurityData can now be discarded.
  1436.  
  1437.           Otherwise,
  1438.  
  1439.        b) based on the securityName, information concerning the
  1440.           user at the destination snmpEngineID, specified by the
  1441.           securityEngineID, is extracted from the Local Configuration
  1442.           Datastore (LCD, usmUserTable). If information about the user
  1443.           is absent from the LCD, then an error indication
  1444.           (unknownSecurityName) is returned to the calling module.
  1445.  
  1446.    2)  If the securityLevel specifies that the message is to be
  1447.        protected from disclosure, but the user does not support both
  1448.        an authentication and a privacy protocol then the message
  1449.        cannot be sent.  An error indication (unsupportedSecurityLevel)
  1450.        is returned to the calling module.
  1451.  
  1452.    3)  If the securityLevel specifies that the message is to be
  1453.        authenticated, but the user does not support an authentication
  1454.        protocol, then the message cannot be sent. An error indication
  1455.        (unsupportedSecurityLevel) is returned to the calling module.
  1456.  
  1457.    4)  a) If the securityLevel specifies that the message is to be
  1458.           protected from disclosure, then the octet sequence
  1459.           representing the serialized scopedPDU is encrypted according
  1460.           to the user's privacy protocol. To do so a call is made to
  1461.           the privacy module that implements the user's privacy
  1462.           protocol according to the abstract primitive:
  1463.  
  1464.           statusInformation =       -- success or failure
  1465.             encryptData(
  1466.             IN    encryptKey        -- user's localized privKey           3
  1467.             IN    dataToEncrypt     -- serialized scopedPDU
  1468.             OUT   encryptedData     -- serialized encryptedPDU
  1469.  
  1470.  
  1471.  
  1472. Blumenthal/Wijnen           Expires March 1998                 [Page 25]
  1473.  
  1474. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  1475.  
  1476.  
  1477.             OUT   privParameters    -- serialized privacy parameters
  1478.                   )
  1479.  
  1480.           statusInformation
  1481.             indicates if the encryption process was successful or not.
  1482.           encryptKey
  1483.             the user's localized private privKey is the secret key that   3
  1484.             can be used by the encryption algorithm.                      3
  1485.           dataToEncrypt
  1486.             the serialized scopedPDU is the data that to be encrypted.
  1487.           encryptedData
  1488.             the encryptedPDU represents the encrypted scopedPDU,
  1489.             encoded as an OCTET STRING.
  1490.           privParameters
  1491.             the privacy parameters, encoded as an OCTET STRING.
  1492.  
  1493.           If the privacy module returns failure, then the message
  1494.           cannot be sent and an error indication (encryptionError)        4
  1495.           is returned to the calling module.
  1496.  
  1497.           If the privacy module returns success, then the returned
  1498.           privParameters are put into the msgPrivacyParameters field of
  1499.           the securityParameters and the encryptedPDU serves as the
  1500.           payload of the message being prepared.
  1501.  
  1502.           Otherwise,
  1503.  
  1504.        b) If the securityLevel specifies that the message is not to be
  1505.           protected from disclosure, then the NULL string is encoded
  1506.           as an OCTET STRING and put into the msgPrivacyParameters
  1507.           field of the securityParameters and the plaintext scopedPDU
  1508.           serves as the payload of the message being prepared.
  1509.  
  1510.    5)  The snmpEngineID is encoded as an OCTET STRING into the
  1511.        msgAuthoritativeEngineID field of the securityParameters.
  1512.        Note that an empty (zero length) snmpEngineID is OK for a
  1513.        Request message, because that will cause the remote
  1514.        (authoritative) SNMP engine to return a Report PDU with the
  1515.        proper snmpEngineID included in the privParameters of that
  1516.        returned Report PDU.
  1517.  
  1518.    6)  a) If the securityLevel specifies that the message is to be
  1519.           authenticated, then the current values of snmpEngineBoots
  1520.           and snmpEngineTime corresponding to the snmpEngineID from
  1521.           the LCD are used.
  1522.  
  1523.           Otherwise,
  1524.  
  1525.        b) If this is a Response message, then the current value of
  1526.           snmpEngineBoots and snmpEngineTime corresponding to the
  1527.           local snmpEngineID from the LCD are used.
  1528.  
  1529.  
  1530.  
  1531. Blumenthal/Wijnen           Expires March 1998                 [Page 26]
  1532.  
  1533. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  1534.  
  1535.  
  1536.  
  1537.           Otherwise,
  1538.  
  1539.        c) If this is a Request message, then a zero value is used
  1540.           for both snmpEngineBoots and snmpEngineTime. This zero
  1541.           value gets used if snmpEngineID is empty.
  1542.  
  1543.        The values are encoded as Unsigned32 and Integer32 respectively    |
  1544.        into the msgAuthoritativeEngineBoots and                           |
  1545.        msgAuthoritativeEngineTime fields of the securityParameters.       |
  1546.  
  1547.    7)  The userName is encoded as an OCTET STRING into the msgUserName
  1548.        field of the securityParameters.
  1549.  
  1550.    8)  a) If the securityLevel specifies that the message is to be
  1551.           authenticated, the message is authenticated according to the
  1552.           user's authentication protocol. To do so a call is made to
  1553.           the authentication module that implements the user's
  1554.           authentication protocol according to the abstract service
  1555.           primitive:
  1556.  
  1557.           statusInformation =
  1558.             authenticateOutgoingMsg(
  1559.             IN  authKey               -- the user's localized authKey     3
  1560.             IN  wholeMsg              -- unauthenticated message
  1561.             OUT authenticatedWholeMsg -- authenticated complete message
  1562.                 )
  1563.  
  1564.           statusInformation
  1565.             indicates if authentication was successful or not.
  1566.           authKey
  1567.             the user's localized private authKey is the secret key that   3
  1568.             can be used by the authentication algorithm.                  3
  1569.           wholeMsg
  1570.             the complete serialized message to be authenticated.
  1571.           authenticatedWholeMsg
  1572.             the same as the input given to the authenticateOutgoingMsg
  1573.             service, but with msgAuthenticationParameters properly
  1574.             filled in.
  1575.  
  1576.           If the authentication module returns failure, then the
  1577.           message cannot be sent and an error indication
  1578.           (authenticationFailure) is returned to the calling module.
  1579.  
  1580.           If the authentication module returns success, then the
  1581.           msgAuthenticationParameters field is put into the
  1582.           securityParameters and the authenticatedWholeMsg represents
  1583.           the serialization of the authenticated message being
  1584.           prepared.
  1585.  
  1586.           Otherwise,
  1587.  
  1588.  
  1589.  
  1590. Blumenthal/Wijnen           Expires March 1998                 [Page 27]
  1591.  
  1592. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  1593.  
  1594.  
  1595.  
  1596.        b) If the securityLevel specifies that the message is not to
  1597.           be authenticated then the NULL string is encoded as an
  1598.           OCTET STRING into the msgAuthenticationParameters field of
  1599.           the securityParameters.  The wholeMsg is now serialized and
  1600.           then represents the unauthenticated message being prepared.
  1601.  
  1602.    9)  The completed message with its length is returned to the
  1603.        calling module with the statusInformation set to success.
  1604.  
  1605. 3.2.  Processing an Incoming SNMP Message
  1606.  
  1607.    This section describes the procedure followed by an SNMP engine
  1608.    whenever it receives a message containing a management operation
  1609.    on behalf of a user, with a particular securityLevel.
  1610.  
  1611.    To simplify the elements of procedure, the release of state
  1612.    information is not always explicitly specified. As a general rule,
  1613.    if state information is available when a message gets discarded,
  1614.    the state information should also be released.
  1615.    Also, when an error indication with an OID and value for an
  1616.    incremented counter is returned, then the available information
  1617.    (like securityStateReference) must be passed back to the caller
  1618.    so it can generate a Report PDU.
  1619.  
  1620.    1)  If the received securityParameters is not the serialization
  1621.        (according to the conventions of [RFC1906]) of an OCTET STRING
  1622.        formatted according to the UsmSecurityParameters defined in
  1623.        section 2.4, then the snmpInASNParseErrs counter [RFC1907] is
  1624.        incremented, and an error indication (parseError) is returned
  1625.        to the calling module.
  1626.        Note that we return without the OID and value of the incremented
  1627.        counter, because in this case there is not enough information
  1628.        to generate a Report PDU.
  1629.  
  1630.    2)  The values of the security parameter fields are extracted from
  1631.        the securityParameters. The securityEngineID to be returned to
  1632.        the caller is the value of the msgAuthoritativeEngineID field.
  1633.        The cachedSecurityData is prepared and a securityStateReference
  1634.        is prepared to reference this data. Values to be cached are:
  1635.  
  1636.            msgUserName
  1637.            securityEngineID
  1638.            securityLevel
  1639.  
  1640.    3)  If the value of the msgAuthoritativeEngineID field in the
  1641.        securityParameters is unknown then:
  1642.  
  1643.        a) a non-authoritative SNMP engine that performs discovery may
  1644.           optionally create a new entry in its Local Configuration
  1645.           Datastore (LCD) and continue processing;
  1646.  
  1647.  
  1648.  
  1649. Blumenthal/Wijnen           Expires March 1998                 [Page 28]
  1650.  
  1651. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  1652.  
  1653.  
  1654.  
  1655.           or
  1656.  
  1657.        b) the usmStatsUnknownEngineIDs counter is incremented, and
  1658.           an error indication (unknownEngineID) together with the
  1659.           OID and value of the incremented counter is returned to
  1660.           the calling module.
  1661.  
  1662.    4)  Information about the value of the msgUserName and
  1663.        msgAuthoritativeEngineID fields is extracted from the Local
  1664.        Configuration Datastore (LCD, usmUserTable).  If no information
  1665.        is available for the user, then the usmStatsUnknownUserNames
  1666.        counter is incremented and an error indication
  1667.        (unknownSecurityName) together with the OID and value of the
  1668.        incremented counter is returned to the calling module.
  1669.  
  1670.    5)  If the information about the user indicates that it does not
  1671.        support the securityLevel requested by the caller, then the
  1672.        usmStatsUnsupportedSecLevels counter is incremented and an
  1673.        error indication (unsupportedSecurityLevel) together with the
  1674.        OID and value of the incremented counter is returned to the
  1675.        calling module.
  1676.  
  1677.    6)  If the securityLevel specifies that the message is to be
  1678.        authenticated, then the message is authenticated according to
  1679.        the user's authentication protocol. To do so a call is made
  1680.        to the authentication module that implements the user's
  1681.        authentication protocol according to the abstract service
  1682.        primitive:
  1683.  
  1684.        statusInformation =          -- success or failure
  1685.          authenticateIncomingMsg(
  1686.          IN   authKey               -- the user's localized authKey       3
  1687.          IN   authParameters        -- as received on the wire
  1688.          IN   wholeMsg              -- as received on the wire
  1689.          OUT  authenticatedWholeMsg -- checked for authentication
  1690.                  )
  1691.  
  1692.        statusInformation
  1693.          indicates if authentication was successful or not.
  1694.        authKey
  1695.          the user's localized private authKey is the secret key that      3
  1696.          can be used by the authentication algorithm.                     3
  1697.        wholeMsg
  1698.          the complete serialized message to be authenticated.
  1699.        authenticatedWholeMsg
  1700.          the same as the input given to the authenticateIncomingMsg
  1701.          service, but after authentication has been checked.
  1702.  
  1703.        If the authentication module returns failure, then the message
  1704.        cannot be trusted, so the usmStatsWrongDigests counter is
  1705.  
  1706.  
  1707.  
  1708. Blumenthal/Wijnen           Expires March 1998                 [Page 29]
  1709.  
  1710. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  1711.  
  1712.  
  1713.        incremented and an error indication (authenticationFailure)
  1714.        together with the OID and value of the incremented counter is
  1715.        returned to the calling module.
  1716.  
  1717.        If the authentication module returns success, then the message
  1718.        is authentic and can be trusted so processing continues.
  1719.  
  1720.    7)  If the securityLevel indicates an authenticated message, then
  1721.        the local values of snmpEngineBoots and snmpEngineTime
  1722.        corresponding to the value of the msgAuthoritativeEngineID
  1723.        field are extracted from the Local Configuration Datastore.
  1724.  
  1725.        a) If the extracted value of msgAuthoritativeEngineID is the
  1726.           same as the value of snmpEngineID of the processing SNMP
  1727.           engine (meaning this is the authoritative SNMP engine),
  1728.           then if any of the following conditions is true, then the
  1729.           message is considered to be outside of the Time Window:
  1730.  
  1731.            - the local value of snmpEngineBoots is 2147483647;            3
  1732.  
  1733.            - the value of the msgAuthoritativeEngineBoots field differs
  1734.              from the local value of snmpEngineBoots; or,
  1735.  
  1736.            - the value of the msgAuthoritativeEngineTime field differs
  1737.              from the local notion of snmpEngineTime by more than
  1738.              +/- 150 seconds.
  1739.  
  1740.           If the message is considered to be outside of the Time Window
  1741.           then the usmStatsNotInTimeWindows counter is incremented and
  1742.           an error indication (notInTimeWindow) together with the OID
  1743.           and value of the incremented counter is returned to the
  1744.           calling module.
  1745.  
  1746.        b) If the extracted value of msgAuthoritativeEngineID is not the
  1747.           same as the value snmpEngineID of the processing SNMP engine
  1748.           (meaning this is not the authoritative SNMP engine), then:
  1749.  
  1750.           1) if at least one of the following conditions is true:
  1751.  
  1752.              - the extracted value of the msgAuthoritativeEngineBoots
  1753.                field is greater than the local notion of the value of
  1754.                snmpEngineBoots; or,
  1755.  
  1756.              - the extracted value of the msgAuthoritativeEngineBoots
  1757.                field is equal to the local notion of the value of
  1758.                snmpEngineBoots, the extracted value of
  1759.                msgAuthoritativeEngineTime field is greater than the
  1760.                value of latestReceivedEngineTime,                         |
  1761.                                                                           |
  1762.              then the LCD entry corresponding to the extracted value
  1763.              of the msgAuthoritativeEngineID field is updated, by
  1764.  
  1765.  
  1766.  
  1767. Blumenthal/Wijnen           Expires March 1998                 [Page 30]
  1768.  
  1769. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  1770.  
  1771.  
  1772.              setting:
  1773.  
  1774.                 - the local notion of the value of snmpEngineBoots to
  1775.                   the value of the msgAuthoritativeEngineBoots field,
  1776.                 - the local notion of the value of snmpEngineTime to
  1777.                   the value of the msgAuthoritativeEngineTime field,
  1778.                   and
  1779.                 - the latestReceivedEngineTime to the value of the
  1780.                   value of the msgAuthoritativeEngineTime field.
  1781.  
  1782.           2) if any of the following conditions is true, then the
  1783.              message is considered to be outside of the Time Window:
  1784.  
  1785.              - the local notion of the value of snmpEngineBoots is
  1786.                2147483647;                                                3
  1787.  
  1788.              - the value of the msgAuthoritativeEngineBoots field is
  1789.                less than the local notion of the value of
  1790.                snmpEngineBoots; or,
  1791.  
  1792.              - the value of the msgAuthoritativeEngineBoots field is
  1793.                equal to the local notion of the value of
  1794.                snmpEngineBoots and the value of the
  1795.                msgAuthoritativeEngineTime field is more than 150
  1796.                seconds less than the local notion of of the value of
  1797.                snmpEngineTime.
  1798.  
  1799.              If the message is considered to be outside of the Time
  1800.              Window then an error indication (notInTimeWindow) is
  1801.              returned to the calling module;
  1802.  
  1803.              Note that this means that a too old (possibly replayed)
  1804.              message has been detected and is deemed unauthentic.
  1805.  
  1806.              Note that this procedure allows for the value of
  1807.              msgAuthoritativeEngineBoots in the message to be greater
  1808.              than the local notion of the value of snmpEngineBoots to
  1809.              allow for received messages to be accepted as authentic
  1810.              when received from an authoritative SNMP engine that has
  1811.              re-booted since the receiving SNMP engine last
  1812.              (re-)synchronized.
  1813.  
  1814.              Note that this procedure does not allow for automatic
  1815.              time synchronization if the non-authoritative SNMP engine
  1816.              has a real out-of-sync situation whereby the authoritative
  1817.              SNMP engine is more than 150 seconds behind the
  1818.              non-authoritative SNMP engine.
  1819.  
  1820.    8)  a) If the securityLevel indicates that the message was protected
  1821.           from disclosure, then the OCTET STRING representing the
  1822.           encryptedPDU is decrypted according to the user's privacy
  1823.  
  1824.  
  1825.  
  1826. Blumenthal/Wijnen           Expires March 1998                 [Page 31]
  1827.  
  1828. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  1829.  
  1830.  
  1831.           protocol to obtain an unencrypted serialized scopedPDU value.
  1832.           To do so a call is made to the privacy module that implements
  1833.           the user's privacy protocol according to the abstract
  1834.           primitive:
  1835.  
  1836.           statusInformation =       -- success or failure
  1837.             decryptData(
  1838.             IN    decryptKey        -- the user's localized privKey       3
  1839.             IN    privParameters    -- as received on the wire
  1840.             IN    encryptedData     -- encryptedPDU as received
  1841.             OUT   decryptedData     -- serialized decrypted scopedPDU
  1842.                   )
  1843.  
  1844.           statusInformation
  1845.             indicates if the decryption process was successful or not.
  1846.           decryptKey
  1847.             the user's localized private privKey is the secret key that   3
  1848.             can be used by the decryption algorithm.                      3
  1849.           privParameters
  1850.             the msgPrivacyParameters, encoded as an OCTET STRING.
  1851.           encryptedData
  1852.             the encryptedPDU represents the encrypted scopedPDU,
  1853.             encoded as an OCTET STRING.
  1854.           decryptedData
  1855.             the serialized scopedPDU if decryption is successful.
  1856.  
  1857.           If the privacy module returns failure, then the message can
  1858.           not be processed, so the usmStatsDecryptionErrors counter
  1859.           is incremented and an error indication (decryptionError)        4
  1860.           together with the OID and value of the incremented counter
  1861.           is returned to the calling module.
  1862.  
  1863.           If the privacy module returns success, then the decrypted
  1864.           scopedPDU is the message payload to be returned to the
  1865.           calling module.
  1866.  
  1867.           Otherwise,
  1868.  
  1869.        b) The scopedPDU component is assumed to be in plain text
  1870.           and is the message payload to be returned to the calling
  1871.           module.
  1872.  
  1873.    9)  The maxSizeResponseScopedPDU is calculated.  This is the
  1874.        maximum size allowed for a scopedPDU for a possible Response
  1875.        message.  Provision is made for a message header that allows
  1876.        the same securityLevel as the received Request.
  1877.  
  1878.    10) The securityName for the user is retrieved from the
  1879.        usmUserTable.
  1880.  
  1881.    11) The security data is cached as cachedSecurityData, so that a
  1882.  
  1883.  
  1884.  
  1885. Blumenthal/Wijnen           Expires March 1998                 [Page 32]
  1886.  
  1887. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  1888.  
  1889.  
  1890.        possible response to this message can and will use the same
  1891.        authentication and privacy secrets, the same securityLevel and
  1892.        the same value for msgAuthoritativeEngineID.  Information to be
  1893.        saved/cached is as follows:
  1894.  
  1895.           msgUserName,
  1896.           usmUserAuthProtocol, usmUserAuthKey
  1897.           usmUserPrivProtocol, usmUserPrivKey
  1898.           securityEngineID, securityLevel
  1899.  
  1900.    12) The statusInformation is set to success and a return is made to
  1901.        the calling module passing back the OUT parameters as specified
  1902.        in the processIncomingMsg primitive.
  1903.  
  1904.  
  1905.  
  1906.  
  1907.  
  1908.  
  1909.  
  1910.  
  1911.  
  1912.  
  1913.  
  1914.  
  1915.  
  1916.  
  1917.  
  1918.  
  1919.  
  1920.  
  1921.  
  1922.  
  1923.  
  1924.  
  1925.  
  1926.  
  1927.  
  1928.  
  1929.  
  1930.  
  1931.  
  1932.  
  1933.  
  1934.  
  1935.  
  1936.  
  1937.  
  1938.  
  1939.  
  1940.  
  1941.  
  1942.  
  1943.  
  1944. Blumenthal/Wijnen           Expires March 1998                 [Page 33]
  1945.  
  1946. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  1947.  
  1948.  
  1949. 4.  Discovery
  1950.  
  1951.    The User-based Security Model requires that a discovery process
  1952.    obtains sufficient information about other SNMP engines in order
  1953.    to communicate with them.  Discovery requires an non-authoritative
  1954.    SNMP engine to learn the authoritative SNMP engine's snmpEngineID
  1955.    value before communication may proceed.  This may be accomplished by
  1956.    generating a Request message with a securityLevel of noAuthNoPriv,
  1957.    a msgUserName of "initial", a msgAuthoritativeEngineID value of zero
  1958.    length, and the varBindList left empty.
  1959.    The response to this message will be a Report message containing
  1960.    the snmpEngineID of the authoritative SNMP engine as the value of
  1961.    the msgAuthoritativeEngineID field within the msgSecurityParameters
  1962.    field.  It contains a Report PDU with the usmStatsUnknownEngineIDs
  1963.    counter in the varBindList.
  1964.  
  1965.    If authenticated communication is required, then the discovery
  1966.    process should also establish time synchronization with the
  1967.    authoritative SNMP engine.  This may be accomplished by sending an
  1968.    authenticated Request message with the value of
  1969.    msgAuthoritativeEngineID set to the newly learned snmpEngineID and
  1970.    with the values of msgAuthoritativeEngineBoots and
  1971.    msgAuthoritativeEngineTime set to zero.
  1972.    The response to this authenticated message will be a Report message
  1973.    containing the up to date values of the authoritative SNMP engine's
  1974.    snmpEngineBoots and snmpEngineTime as the value of the
  1975.    msgAuthoritativeEngineBoots and msgAuthoritativeEngineTime fields
  1976.    respectively.  It also contains the usmStatsNotInTimeWindows counter
  1977.    in the varBindList of the Report PDU.  The time synchronization then
  1978.    happens automatically as part of the procedures in section 3.2
  1979.    step 7b. See also section 2.3.
  1980.  
  1981.  
  1982.  
  1983.  
  1984.  
  1985.  
  1986.  
  1987.  
  1988.  
  1989.  
  1990.  
  1991.  
  1992.  
  1993.  
  1994.  
  1995.  
  1996.  
  1997.  
  1998.  
  1999.  
  2000.  
  2001.  
  2002.  
  2003. Blumenthal/Wijnen           Expires March 1998                 [Page 34]
  2004.  
  2005. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  2006.  
  2007.  
  2008. 5.  Definitions
  2009.  
  2010. SNMP-USER-BASED-SM-MIB DEFINITIONS ::= BEGIN
  2011.  
  2012. IMPORTS
  2013.     MODULE-IDENTITY, OBJECT-TYPE,
  2014.     OBJECT-IDENTITY,
  2015.     snmpModules, Counter32                FROM SNMPv2-SMI
  2016.     TEXTUAL-CONVENTION, TestAndIncr,
  2017.     RowStatus, RowPointer,
  2018.     StorageType, AutonomousType           FROM SNMPv2-TC
  2019.     MODULE-COMPLIANCE, OBJECT-GROUP       FROM SNMPv2-CONF
  2020.     SnmpAdminString, SnmpEngineID,
  2021.     snmpAuthProtocols, snmpPrivProtocols  FROM SNMP-FRAMEWORK-MIB;
  2022.  
  2023. snmpUsmMIB MODULE-IDENTITY
  2024.     LAST-UPDATED "9709290000Z"            -- 29 Sept 1997, midnight       |
  2025.     ORGANIZATION "SNMPv3 Working Group"
  2026.     CONTACT-INFO "WG-email:   snmpv3@tis.com
  2027.                   Subscribe:  majordomo@tis.com
  2028.                               In msg body:  subscribe snmpv3
  2029.  
  2030.                   Chair:      Russ Mundy
  2031.                               Trusted Information Systems
  2032.                   postal:     3060 Washington Rd
  2033.                               Glenwood MD 21738
  2034.                               USA
  2035.                   email:      mundy@tis.com
  2036.                   phone:      +1-301-854-6889
  2037.  
  2038.                   Co-editor   Uri Blumenthal
  2039.                               IBM T. J. Watson Research
  2040.                   postal:     30 Saw Mill River Pkwy,
  2041.                               Hawthorne, NY 10532
  2042.                               USA
  2043.                   email:      uri@watson.ibm.com
  2044.                   phone:      +1-914-784-7964
  2045.  
  2046.                   Co-editor:  Bert Wijnen
  2047.                               IBM T. J. Watson Research
  2048.                   postal:     Schagen 33
  2049.                               3461 GL Linschoten
  2050.                               Netherlands
  2051.                   email:      wijnen@vnet.ibm.com
  2052.                   phone:      +31-348-432-794
  2053.                  "
  2054.  
  2055.     DESCRIPTION  "The management information definitions for the
  2056.                   SNMP User-based Security Model.
  2057.                  "
  2058.     ::= { snmpModules 9 }     -- to be verified with IANA
  2059.  
  2060.  
  2061.  
  2062. Blumenthal/Wijnen           Expires March 1998                 [Page 35]
  2063.  
  2064. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  2065.  
  2066.  
  2067.  
  2068. -- Administrative assignments ****************************************
  2069.  
  2070. usmAdmin          OBJECT IDENTIFIER ::= { snmpUsmMIB 1 }
  2071. usmMIBObjects     OBJECT IDENTIFIER ::= { snmpUsmMIB 2 }
  2072. usmMIBConformance OBJECT IDENTIFIER ::= { snmpUsmMIB 3 }
  2073.  
  2074. -- Identification of Authentication and Privacy Protocols ************
  2075.  
  2076. usmNoAuthProtocol OBJECT-IDENTITY
  2077.     STATUS        current
  2078.     DESCRIPTION  "No Authentication Protocol."
  2079.     ::= { snmpAuthProtocols 1 }
  2080.  
  2081. usmHMACMD5AuthProtocol OBJECT-IDENTITY                                    |
  2082.     STATUS        current                                                 |
  2083.     DESCRIPTION  "The HMAC-MD5-96 Digest Authentication Protocol."        |
  2084.     REFERENCE    "- H. Krawczyk, M. Bellare, R. Canetti HMAC:             |
  2085.                     Keyed-Hashing for Message Authentication,             |
  2086.                     RFC2104, Feb 1997.                                    |
  2087.                   - Rivest, R., Message Digest Algorithm MD5, RFC1321.    |
  2088.                  "                                                        |
  2089.     ::= { snmpAuthProtocols 2 }                                           |
  2090.                                                                           |
  2091. usmHMACSHAAuthProtocol OBJECT-IDENTITY                                    |
  2092.     STATUS        current                                                 |
  2093.     DESCRIPTION  "The HMAC-SHA-96 Digest Authentication Protocol."        |
  2094.     REFERENCE    "- H. Krawczyk, M. Bellare, R. Canetti, HMAC:            |
  2095.                     Keyed-Hashing for Message Authentication,             |
  2096.                     RFC2104, Feb 1997.                                    |
  2097.                   - Secure Hash Algorithm. NIST FIPS 180-1.               |        |
  2098.                  "                                                        |
  2099.     ::= { snmpAuthProtocols 3 }                                           |
  2100.                                                                           |
  2101. usmNoPrivProtocol OBJECT-IDENTITY
  2102.     STATUS        current
  2103.     DESCRIPTION  "No Privacy Protocol."
  2104.     ::= { snmpPrivProtocols 1 }
  2105.  
  2106. usmDESPrivProtocol OBJECT-IDENTITY
  2107.     STATUS        current
  2108.     DESCRIPTION  "The CBC-DES Symmetric Encryption Protocol."
  2109.     REFERENCE    "- Data Encryption Standard, National Institute of
  2110.                     Standards and Technology.  Federal Information
  2111.                     Processing Standard (FIPS) Publication 46-1.
  2112.                     Supersedes FIPS Publication 46,
  2113.                     (January, 1977; reaffirmed January, 1988).
  2114.  
  2115.                   - Data Encryption Algorithm, American National
  2116.                     Standards Institute.  ANSI X3.92-1981,
  2117.                     (December, 1980).
  2118.  
  2119.  
  2120.  
  2121. Blumenthal/Wijnen           Expires March 1998                 [Page 36]
  2122.  
  2123. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  2124.  
  2125.  
  2126.  
  2127.                   - DES Modes of Operation, National Institute of
  2128.                     Standards and Technology.  Federal Information
  2129.                     Processing Standard (FIPS) Publication 81,
  2130.                     (December, 1980).
  2131.  
  2132.                   - Data Encryption Algorithm - Modes of Operation,
  2133.                     American National Standards Institute.
  2134.                     ANSI X3.106-1983, (May 1983).
  2135.                  "
  2136.     ::= { snmpPrivProtocols 2 }
  2137.  
  2138. -- Textual Conventions ***********************************************
  2139.  
  2140. -- Editor's note:
  2141. -- If in the future the MD5 gets replaced by another Authentication
  2142. -- algorithm, then it seems we also need to use that new algorithm to
  2143. -- calculate the digest during KeyChange. So this TC has been defined
  2144. -- to cater for that.
  2145. -- End Editor's note
  2146.  
  2147. KeyChange ::=     TEXTUAL-CONVENTION
  2148.    STATUS         current
  2149.    DESCRIPTION
  2150.          "Every definition of an object with this syntax must identify
  2151.           a protocol, P, a secret key, K, and a hash algorithm, H         |
  2152.           that produces output of L octets.                               |
  2153.                                                                           |
  2154.           The object's value is a manager-generated, partially-random
  2155.           value which, when modified, causes the value of the secret
  2156.           key, K, to be modified via a one-way function.
  2157.  
  2158.           The value of an instance of this object is the concatenation
  2159.           of two components: a 'random' component and a 'delta'
  2160.           component.  The lengths of the random and delta components
  2161.           are given by the corresponding value of the protocol, P;
  2162.           if P requires K to be a fixed length, the length of both the
  2163.           random and delta components is that fixed length; if P
  2164.           allows the length of K to be variable up to a particular
  2165.           maximum length, the length of the random component is that
  2166.           maximum length and the length of the delta component is any
  2167.           length less than or equal to that maximum length.
  2168.           For example, usmHMACMD5AuthProtocol requires K to be a fixed    |
  2169.           length of 16 octets and L - of 16 octets.                       |
  2170.           usmHMACSHAAuthProtocol requires K to be a fixed length of       |
  2171.           20 octets and L - of 20 octets. Other protocols may define      |
  2172.           other sizes, as deemed appropriate.                             |
  2173.  
  2174.           When an instance of this object is modified to have a new
  2175.           value by the management protocol, the agent generates a new
  2176.           value of K as follows:
  2177.  
  2178.  
  2179.  
  2180. Blumenthal/Wijnen           Expires March 1998                 [Page 37]
  2181.  
  2182. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  2183.  
  2184.  
  2185.  
  2186.            - a temporary variable is initialized to the existing value
  2187.              of K;
  2188.            - if the length of the delta component is greater than 16
  2189.              octets, then:                                                |
  2190.               - the random component is appended to the value of the
  2191.                 temporary variable, and the result is input to the
  2192.                 the hash algorithm H to produce a digest value, and
  2193.                 the temporary variable is set to this digest value;
  2194.               - the value of the temporary variable is XOR-ed with
  2195.                 the first (next) L-octets (16 octets in case of MD5)      |
  2196.                 of the delta component to produce the first (next)        |
  2197.                 L-octets (16 octets in case of MD5) of the new value      |
  2198.                 of K.                                                     |
  2199.               - the above two steps are repeated until the unused
  2200.                 portion of the delta component is 16 octets or less,
  2201.            - the random component is appended to the value of the
  2202.              temporary variable, and the result is input to the
  2203.              hash algorithm H to produce a digest value;
  2204.            - this digest value, truncated if necessary to be the same
  2205.              length as the unused portion of the delta component, is
  2206.              XOR-ed with the unused portion of the delta component to
  2207.              produce the (final portion of the) new value of K.
  2208.  
  2209.              for example, using MD5 as the hash algorithm H:
  2210.  
  2211.               iterations = (lenOfDelta - 1)/16; /* integer division */
  2212.               temp = keyOld;
  2213.               for (i = 0; i < iterations; i++) {
  2214.                   temp = MD5 (temp || random);
  2215.                   keyNew[i*16 .. (i*16)+15] =
  2216.                          temp XOR delta[i*16 .. (i*16)+15];
  2217.               }
  2218.               temp = MD5 (temp || random);
  2219.               keyNew[i*16 .. lenOfDelta-1] =
  2220.                      temp XOR delta[i*16 .. lenOfDelta-1];
  2221.  
  2222.           The value of an object with this syntax, whenever it is
  2223.           retrieved by the management protocol, is always the zero
  2224.           length string.
  2225.          "
  2226.     SYNTAX       OCTET STRING
  2227.  
  2228. -- Statistics for the User-based Security Model **********************
  2229.  
  2230. usmStats         OBJECT IDENTIFIER ::= { usmMIBObjects 1 }
  2231.  
  2232. usmStatsUnsupportedSecLevels OBJECT-TYPE
  2233.     SYNTAX       Counter32
  2234.     MAX-ACCESS   read-only
  2235.     STATUS       current
  2236.  
  2237.  
  2238.  
  2239. Blumenthal/Wijnen           Expires March 1998                 [Page 38]
  2240.  
  2241. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  2242.  
  2243.  
  2244.     DESCRIPTION "The total number of packets received by the SNMP
  2245.                  engine which were dropped because they requested a
  2246.                  securityLevel that was unknown to the SNMP engine
  2247.                  or otherwise unavailable.
  2248.                 "
  2249.     ::= { usmStats 1 }
  2250.  
  2251. usmStatsNotInTimeWindows OBJECT-TYPE
  2252.     SYNTAX       Counter32
  2253.     MAX-ACCESS   read-only
  2254.     STATUS       current
  2255.     DESCRIPTION "The total number of packets received by the SNMP
  2256.                  engine which were dropped because they appeared
  2257.                  outside of the authoritative SNMP engine's window.
  2258.                 "
  2259.     ::= { usmStats 2 }
  2260.  
  2261. usmStatsUnknownUserNames OBJECT-TYPE
  2262.     SYNTAX       Counter32
  2263.     MAX-ACCESS   read-only
  2264.     STATUS       current
  2265.     DESCRIPTION "The total number of packets received by the SNMP
  2266.                  engine which were dropped because they referenced a
  2267.                  user that was not known to the SNMP engine.
  2268.                 "
  2269.     ::= { usmStats 3 }
  2270.  
  2271. usmStatsUnknownEngineIDs OBJECT-TYPE
  2272.     SYNTAX       Counter32
  2273.     MAX-ACCESS   read-only
  2274.     STATUS       current
  2275.     DESCRIPTION "The total number of packets received by the SNMP
  2276.                  engine which were dropped because they referenced an
  2277.                  snmpEngineID that was not known to the SNMP engine.
  2278.                 "
  2279.     ::= { usmStats 4 }
  2280.  
  2281. usmStatsWrongDigests OBJECT-TYPE
  2282.     SYNTAX       Counter32
  2283.     MAX-ACCESS   read-only
  2284.     STATUS       current
  2285.     DESCRIPTION "The total number of packets received by the SNMP
  2286.                  engine which were dropped because they didn't
  2287.                  contain the expected digest value.
  2288.                 "
  2289.     ::= { usmStats 5 }
  2290.  
  2291. usmStatsDecryptionErrors OBJECT-TYPE
  2292.     SYNTAX       Counter32
  2293.     MAX-ACCESS   read-only
  2294.     STATUS       current
  2295.  
  2296.  
  2297.  
  2298. Blumenthal/Wijnen           Expires March 1998                 [Page 39]
  2299.  
  2300. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  2301.  
  2302.  
  2303.     DESCRIPTION "The total number of packets received by the SNMP
  2304.                  engine which were dropped because they could not be
  2305.                  decrypted.
  2306.                 "
  2307.     ::= { usmStats 6 }
  2308.  
  2309. -- The usmUser Group ************************************************
  2310.  
  2311. usmUser          OBJECT IDENTIFIER ::= { usmMIBObjects 2 }
  2312.  
  2313. usmUserSpinLock  OBJECT-TYPE
  2314.     SYNTAX       TestAndIncr
  2315.     MAX-ACCESS   read-write
  2316.     STATUS       current
  2317.     DESCRIPTION "An advisory lock used to allow several cooperating
  2318.                  Command Generator Applications to coordinate their
  2319.                  use of facilities to alter secrets in the
  2320.                  usmUserTable.
  2321.                 "
  2322.     ::= { usmUser 1 }
  2323.  
  2324. -- The table of valid users for the User-based Security Model ********
  2325.  
  2326. usmUserTable     OBJECT-TYPE
  2327.     SYNTAX       SEQUENCE OF UsmUserEntry
  2328.     MAX-ACCESS   not-accessible
  2329.     STATUS       current
  2330.     DESCRIPTION "The table of users configured in the SNMP engine's
  2331.                  Local Configuration Datastore (LCD)."
  2332.     ::= { usmUser 2 }
  2333.  
  2334. usmUserEntry     OBJECT-TYPE
  2335.     SYNTAX       UsmUserEntry
  2336.     MAX-ACCESS   not-accessible
  2337.     STATUS       current
  2338.     DESCRIPTION "A user configured in the SNMP engine's Local
  2339.                  Configuration Datastore (LCD) for the User-based
  2340.                  Security Model.
  2341.                 "
  2342.     INDEX       { usmUserEngineID,
  2343.                   usmUserName
  2344.                 }
  2345.     ::= { usmUserTable 1 }
  2346.  
  2347. UsmUserEntry ::= SEQUENCE
  2348.     {
  2349.         usmUserEngineID         SnmpEngineID,
  2350.         usmUserName             SnmpAdminString,
  2351.         usmUserSecurityName     SnmpAdminString,
  2352.         usmUserCloneFrom        RowPointer,
  2353.         usmUserAuthProtocol     AutonomousType,
  2354.  
  2355.  
  2356.  
  2357. Blumenthal/Wijnen           Expires March 1998                 [Page 40]
  2358.  
  2359. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  2360.  
  2361.  
  2362.         usmUserAuthKeyChange    KeyChange,
  2363.         usmUserOwnAuthKeyChange KeyChange,
  2364.         usmUserPrivProtocol     AutonomousType,
  2365.         usmUserPrivKeyChange    KeyChange,
  2366.         usmUserOwnPrivKeyChange KeyChange,
  2367.         usmUserPublic           OCTET STRING,
  2368.         usmUserStorageType      StorageType,
  2369.         usmUserStatus           RowStatus
  2370.     }
  2371.  
  2372. usmUserEngineID  OBJECT-TYPE
  2373.     SYNTAX       SnmpEngineID
  2374.     MAX-ACCESS   not-accessible
  2375.     STATUS       current
  2376.     DESCRIPTION "An SNMP engine's administratively-unique identifier.
  2377.  
  2378.                  In a simple agent, this value is always that agent's
  2379.                  own snmpEngineID value.
  2380.  
  2381.                  The value can also take the value of the snmpEngineID
  2382.                  of a remote SNMP engine with which this user can
  2383.                  communicate.
  2384.                 "
  2385.     ::= { usmUserEntry 1 }
  2386.  
  2387. usmUserName      OBJECT-TYPE
  2388.     SYNTAX       SnmpAdminString (SIZE(1..32))
  2389.     MAX-ACCESS   not-accessible
  2390.     STATUS       current
  2391.     DESCRIPTION "A human readable string representing the name of
  2392.                  the user.
  2393.  
  2394.                  This is the (User-based Security) Model dependent
  2395.                  security ID.
  2396.                 "
  2397.     ::= { usmUserEntry 2 }
  2398.  
  2399. usmUserSecurityName OBJECT-TYPE
  2400.     SYNTAX       SnmpAdminString
  2401.     MAX-ACCESS   read-only
  2402.     STATUS       current
  2403.     DESCRIPTION "A human readable string representing the user in
  2404.                  Security Model independent format.
  2405.  
  2406.                  The default transformation of the User-based Security
  2407.                  Model dependent security ID to the securityName and
  2408.                  vice versa is the identity function so that the
  2409.                  securityName is the same as the userName.
  2410.                 "
  2411.     ::= { usmUserEntry 3 }
  2412.  
  2413.  
  2414.  
  2415.  
  2416. Blumenthal/Wijnen           Expires March 1998                 [Page 41]
  2417.  
  2418. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  2419.  
  2420.  
  2421. usmUserCloneFrom OBJECT-TYPE
  2422.     SYNTAX       RowPointer
  2423.     MAX-ACCESS   read-create
  2424.     STATUS       current
  2425.     DESCRIPTION "A pointer to another conceptual row in this
  2426.                  usmUserTable.  The user in this other conceptual
  2427.                  row is called the clone-from user.
  2428.  
  2429.                  When a new user is created (i.e., a new conceptual
  2430.                  row is instantiated in this table), the privacy and
  2431.                  authentication parameters of the new user are cloned
  2432.                  from its clone-from user.
  2433.  
  2434.                  The first time an instance of this object is set by
  2435.                  a management operation (either at or after its
  2436.                  instantiation), the cloning process is invoked.
  2437.                  Subsequent writes are successful but invoke no
  2438.                  action to be taken by the receiver.
  2439.                  The cloning process fails with an 'inconsistentName'
  2440.                  error if the conceptual row representing the
  2441.                  clone-from user is not in an active state when the
  2442.                  cloning process is invoked.
  2443.  
  2444.                  Cloning also causes the initial values of the secret
  2445.                  authentication key and the secret encryption key of
  2446.                  the new user to be set to the same value as the
  2447.                  corresponding secret of the clone-from user.
  2448.  
  2449.                  When this object is read, the ZeroDotZero OID
  2450.                  is returned.
  2451.                 "
  2452.     ::= { usmUserEntry 4 }
  2453.  
  2454. usmUserAuthProtocol OBJECT-TYPE
  2455.     SYNTAX       AutonomousType
  2456.     MAX-ACCESS   read-create
  2457.     STATUS       current
  2458.     DESCRIPTION "An indication of whether messages sent on behalf of
  2459.                  this user to/from the SNMP engine identified by
  2460.                  usmUserEngineID, can be authenticated, and if so,
  2461.                  the type of authentication protocol which is used.
  2462.  
  2463.                  An instance of this object is created concurrently
  2464.                  with the creation of any other object instance for
  2465.                  the same user (i.e., as part of the processing of
  2466.                  the set operation which creates the first object
  2467.                  instance in the same conceptual row).  Once created,
  2468.                  the value of an instance of this object can not be
  2469.                  changed.
  2470.                                                                           |
  2471.                  If a set operation tries to set a value for an unknown   |
  2472.  
  2473.  
  2474.  
  2475. Blumenthal/Wijnen           Expires March 1998                 [Page 42]
  2476.  
  2477. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  2478.  
  2479.  
  2480.                  or unsupported protocol, then a wrongValue error must    |
  2481.                  be returned.                                             |
  2482.                 "
  2483.     DEFVAL      { usmHMACMD5AuthProtocol }                                |
  2484.     ::= { usmUserEntry 5 }
  2485.  
  2486. usmUserAuthKeyChange OBJECT-TYPE
  2487.     SYNTAX       KeyChange   -- typically (SIZE (0..32))
  2488.     MAX-ACCESS   read-create
  2489.     STATUS       current
  2490.     DESCRIPTION "An object, which when modified, causes the secret
  2491.                  authentication key used for messages sent on behalf
  2492.                  of this user to/from the SNMP engine identified by
  2493.                  usmUserEngineID, to be modified via a one-way
  2494.                  function.
  2495.  
  2496.                  The associated protocol is the usmUserAuthProtocol.
  2497.                  The associated secret key is the user's secret
  2498.                  authentication key (authKey). The associated hash
  2499.                  algorithm is the algorithm used by the user's
  2500.                  usmUserAuthProtocol.
  2501.  
  2502.                  When creating a new user, it is an 'inconsistentName'
  2503.                  error for a Set operation to refer to this object
  2504.                  unless it is previously or concurrently initialized
  2505.                  through a set operation on the corresponding value
  2506.                  of usmUserCloneFrom.
  2507.                 "
  2508.     DEFVAL      { ''H }    -- the empty string
  2509.     ::= { usmUserEntry 6 }
  2510.  
  2511. usmUserOwnAuthKeyChange OBJECT-TYPE
  2512.     SYNTAX       KeyChange  -- typically (SIZE (0..32))
  2513.     MAX-ACCESS   read-create
  2514.     STATUS       current
  2515.     DESCRIPTION "Behaves exactly as usmUserAuthKeyChange, with one
  2516.                  notable difference: in order for the Set operation
  2517.                  to succeed, the usmUserName of the operation
  2518.                  requester must match the usmUserName that
  2519.                  indexes the row which is targeted by this
  2520.                  operation.
  2521.  
  2522.                  The idea here is that access to this column can be
  2523.                  public, since it will only allow a user to change
  2524.                  his own secret authentication key (authKey).
  2525.                 "
  2526.     DEFVAL      { ''H }    -- the empty string
  2527.     ::= { usmUserEntry 7 }
  2528.  
  2529. usmUserPrivProtocol OBJECT-TYPE
  2530.     SYNTAX       AutonomousType
  2531.  
  2532.  
  2533.  
  2534. Blumenthal/Wijnen           Expires March 1998                 [Page 43]
  2535.  
  2536. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  2537.  
  2538.  
  2539.     MAX-ACCESS   read-create
  2540.     STATUS       current
  2541.     DESCRIPTION "An indication of whether messages sent on behalf of
  2542.                  this user to/from the SNMP engine identified by
  2543.                  usmUserEngineID, can be protected from disclosure,
  2544.                  and if so, the type of privacy protocol which is used.
  2545.  
  2546.                  An instance of this object is created concurrently
  2547.                  with the creation of any other object instance for
  2548.                  the same user (i.e., as part of the processing of
  2549.                  the set operation which creates the first object
  2550.                  instance in the same conceptual row).  Once created,
  2551.                  the value of an instance of this object can not be
  2552.                  changed.
  2553.                                                                           |
  2554.                  If a set operation tries to set a value for an unknown   |
  2555.                  or unsupported protocol, then a wrongValue error must    |
  2556.                  be returned.                                             |
  2557.                 "
  2558.     DEFVAL      { usmNoPrivProtocol }
  2559.     ::= { usmUserEntry 8 }
  2560.  
  2561. usmUserPrivKeyChange OBJECT-TYPE
  2562.     SYNTAX       KeyChange  -- typically (SIZE (0..32))
  2563.     MAX-ACCESS   read-create
  2564.     STATUS       current
  2565.     DESCRIPTION "An object, which when modified, causes the secret
  2566.                  encryption key used for messages sent on behalf
  2567.                  of this user to/from the SNMP engine identified by
  2568.                  usmUserEngineID, to be modified via a one-way
  2569.                  function.
  2570.  
  2571.                  The associated protocol is the usmUserPrivProtocol.
  2572.                  The associated secret key is the user's secret
  2573.                  privacy key (privKey). The associated hash
  2574.                  algorithm is the algorithm used by the user's
  2575.                  usmUserAuthProtocol.
  2576.  
  2577.                  When creating a new user, it is an 'inconsistentName'
  2578.                  error for a set operation to refer to this object
  2579.                  unless it is previously or concurrently initialized
  2580.                  through a set operation on the corresponding value
  2581.                  of usmUserCloneFrom.
  2582.                 "
  2583.     DEFVAL      { ''H }    -- the empty string
  2584.     ::= { usmUserEntry 9 }
  2585.  
  2586. usmUserOwnPrivKeyChange OBJECT-TYPE
  2587.     SYNTAX       KeyChange  -- typically (SIZE (0..32))
  2588.     MAX-ACCESS   read-create
  2589.     STATUS       current
  2590.  
  2591.  
  2592.  
  2593. Blumenthal/Wijnen           Expires March 1998                 [Page 44]
  2594.  
  2595. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  2596.  
  2597.  
  2598.     DESCRIPTION "Behaves exactly as usmUserPrivKeyChange, with one
  2599.                  notable difference: in order for the Set operation
  2600.                  to succeed, the usmUserName of the operation
  2601.                  requester must match the usmUserName that indexes
  2602.                  the row which is targeted by this operation.
  2603.  
  2604.                  The idea here is that access to this column can be
  2605.                  public, since it will only allow a user to change
  2606.                  his own secret privacy key (privKey).
  2607.                 "
  2608.     DEFVAL      { ''H }    -- the empty string
  2609.     ::= { usmUserEntry 10 }
  2610.  
  2611. usmUserPublic    OBJECT-TYPE
  2612.     SYNTAX       OCTET STRING (SIZE(0..32))
  2613.     MAX-ACCESS   read-create
  2614.     STATUS       current
  2615.     DESCRIPTION "A publicly-readable value which is written as part
  2616.                  of the procedure for changing a user's secret
  2617.                  authentication and/or privacy key, and later read to
  2618.                  determine whether the change of the secret was
  2619.                  effected.
  2620.                 "
  2621.     DEFVAL      { ''H }  -- the empty string
  2622.     ::= { usmUserEntry 11 }
  2623.  
  2624. usmUserStorageType OBJECT-TYPE
  2625.     SYNTAX       StorageType
  2626.     MAX-ACCESS   read-create
  2627.     STATUS       current
  2628.     DESCRIPTION "The storage type for this conceptual row.
  2629.  
  2630.                  Conceptual rows having the value 'permanent'
  2631.                  must allow write-access at a minimum to:
  2632.  
  2633.                  - usmUserAuthKeyChange, usmUserOwnAuthKeyChange
  2634.                    and usmUserPublic for a user who employs
  2635.                    authentication, and
  2636.                  - usmUserPrivKeyChange, usmUserOwnPrivKeyChange
  2637.                    and usmUserPublic for a user who employs
  2638.                    privacy.
  2639.  
  2640.                  Note that any user who employs authentication or
  2641.                  privacy must allow its secret(s) to be updated and
  2642.                  thus cannot be 'readOnly'.
  2643.                 "
  2644.     DEFVAL      { nonVolatile }
  2645.     ::= { usmUserEntry 12 }
  2646.  
  2647. usmUserStatus    OBJECT-TYPE
  2648.     SYNTAX       RowStatus
  2649.  
  2650.  
  2651.  
  2652. Blumenthal/Wijnen           Expires March 1998                 [Page 45]
  2653.  
  2654. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  2655.  
  2656.  
  2657.     MAX-ACCESS   read-create
  2658.     STATUS       current
  2659.     DESCRIPTION "The status of this conceptual row.
  2660.  
  2661.                  Until instances of all corresponding columns are
  2662.                  appropriately configured, the value of the
  2663.                  corresponding instance of the usmUserStatus column
  2664.                  is 'notReady'.
  2665.  
  2666.                  In particular, a newly created row cannot be made
  2667.                  active until the corresponding usmUserCloneFrom,
  2668.                  usmUserAuthKeyChange, usmUserOwnAuthKeyChange,
  2669.                  usmUserPrivKeyChange and usmUserOwnPrivKeyChange
  2670.                  have all been set.
  2671.  
  2672.                  The  RowStatus TC [RFC1903] requires that this
  2673.                  DESCRIPTION clause states under which circumstances
  2674.                  other objects in this row can be modified:
  2675.  
  2676.                  The value of this object has no effect on whether
  2677.                  other objects in this conceptual row can be modified.
  2678.                 "
  2679.     ::= { usmUserEntry 13 }
  2680.  
  2681. -- Conformance Information *******************************************
  2682.  
  2683. usmMIBCompliances OBJECT IDENTIFIER ::= { usmMIBConformance 1 }
  2684. usmMIBGroups      OBJECT IDENTIFIER ::= { usmMIBConformance 2 }
  2685.  
  2686. -- Compliance statements
  2687.  
  2688. usmMIBCompliance MODULE-COMPLIANCE
  2689.     STATUS       current
  2690.     DESCRIPTION "The compliance statement for SNMP engines which
  2691.                  implement the SNMP-USER-BASED-SM-MIB.
  2692.                 "
  2693.  
  2694.     MODULE       -- this module
  2695.         MANDATORY-GROUPS { usmMIBBasicGroup }
  2696.  
  2697.         OBJECT           usmUserAuthProtocol
  2698.         MIN-ACCESS       read-only
  2699.         DESCRIPTION     "Write access is not required."
  2700.  
  2701.         OBJECT           usmUserPrivProtocol
  2702.         MIN-ACCESS       read-only
  2703.         DESCRIPTION     "Write access is not required."
  2704.  
  2705.     ::= { usmMIBCompliances 1 }
  2706.  
  2707. -- Units of compliance
  2708.  
  2709.  
  2710.  
  2711. Blumenthal/Wijnen           Expires March 1998                 [Page 46]
  2712.  
  2713. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  2714.  
  2715.  
  2716.  
  2717. usmMIBBasicGroup OBJECT-GROUP
  2718.     OBJECTS     {
  2719.                   usmStatsUnsupportedSecLevels,
  2720.                   usmStatsNotInTimeWindows,
  2721.                   usmStatsUnknownUserNames,
  2722.                   usmStatsUnknownEngineIDs,
  2723.                   usmStatsWrongDigests,
  2724.                   usmStatsDecryptionErrors,
  2725.                   usmUserSpinLock,
  2726.                   usmUserSecurityName,
  2727.                   usmUserCloneFrom,
  2728.                   usmUserAuthProtocol,
  2729.                   usmUserAuthKeyChange,
  2730.                   usmUserOwnAuthKeyChange,
  2731.                   usmUserPrivProtocol,
  2732.                   usmUserPrivKeyChange,
  2733.                   usmUserOwnPrivKeyChange,
  2734.                   usmUserPublic,
  2735.                   usmUserStorageType,
  2736.                   usmUserStatus
  2737.                 }
  2738.     STATUS       current
  2739.     DESCRIPTION "A collection of objects providing for configuration
  2740.                  of an SNMP engine which implements the SNMP
  2741.                  User-based Security Model.
  2742.                 "
  2743.     ::= { usmMIBGroups 1 }
  2744.  
  2745. END
  2746.  
  2747.  
  2748.  
  2749.  
  2750.  
  2751.  
  2752.  
  2753.  
  2754.  
  2755.  
  2756.  
  2757.  
  2758.  
  2759.  
  2760.  
  2761.  
  2762.  
  2763.  
  2764.  
  2765.  
  2766.  
  2767.  
  2768.  
  2769.  
  2770. Blumenthal/Wijnen           Expires March 1998                 [Page 47]
  2771.  
  2772. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  2773.  
  2774.  
  2775. 6.  HMAC-MD5-96 Authentication Protocol                                   |
  2776.                                                                           |
  2777.    This section describes the HMAC-MD5-96 authentication protocol.        |
  2778.    This authentication protocol is the first defined for                  |
  2779.    the User-based Security Model. It uses MD5 hash-function which         |
  2780.    is described in [MD5], in HMAC mode described in [RFC2104],            |
  2781.    truncating the output to 96 bits.                                      |
  2782.                                                                           |
  2783.    This protocol is identified by usmHMACMD5AuthProtocol.                 |
  2784.  
  2785.    Over time, other authentication protocols may be defined either
  2786.    as a replacement of this protocol or in addition to this protocol.
  2787.  
  2788. 6.1.  Mechanisms
  2789.  
  2790.    - In support of data integrity, a message digest algorithm is
  2791.      required.  A digest is calculated over an appropriate portion
  2792.      of an SNMP message and included as part of the message sent
  2793.      to the recipient.
  2794.  
  2795.    - In support of data origin authentication and data integrity,         |
  2796.      a secret value is prepended to SNMP message prior to computing the   |
  2797.      digest; the calculated digest is partially inserted into the SNMP    |
  2798.      message prior to transmission, and the prepended value is not        |
  2799.      transmitted.  The secret value is shared by all SNMP engines         |
  2800.      authorized to originate messages on behalf of the appropriate user.  |
  2801.                                                                           3
  2802.                                                                           3
  2803. 6.1.1.  Digest Authentication Mechanism                                   |
  2804.  
  2805.    The Digest Authentication Mechanism defined in this memo provides      |
  2806.    for:
  2807.  
  2808.    - verification of the integrity of a received message, i.e., the       |
  2809.      message received is the message sent.                                |
  2810.  
  2811.      The integrity of the message is protected by computing a digest
  2812.      over an appropriate portion of the message.  The digest is
  2813.      computed by the originator of the message, transmitted with the
  2814.      message, and verified by the recipient of the message.
  2815.  
  2816.    - verification of the user on whose behalf the message was generated.  |
  2817.                                                                           |
  2818.      A secret value known only to SNMP engines authorized to              |
  2819.      generate messages on behalf of a user is used in HMAC mode           |
  2820.      (see [RFC2104]). It also recommends the hash-function output         |
  2821.      used as Message Authentication Code, to be truncated.                |
  2822.  
  2823.    This protocol uses the MD5 [MD5] message digest algorithm.
  2824.    A 128-bit MD5 digest is calculated in a special (HMAC) way over        |
  2825.    the designated portion of an SNMP message and the first 96 bits        |
  2826.  
  2827.  
  2828.  
  2829. Blumenthal/Wijnen           Expires March 1998                 [Page 48]
  2830.  
  2831. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  2832.  
  2833.  
  2834.    o this digest is included as part of the message sent to the           |
  2835.    recipient. The size of the digest carried in a message is 12           |
  2836.    octets. The size of the private authentication key (the secret)        |
  2837.    is 16 octets. For the details see section 6.3.                         |
  2838.  
  2839. 6.2.  Elements of the Digest Authentication Protocol
  2840.  
  2841.    This section contains definitions required to realize the
  2842.    authentication module defined in this section of this memo.            |
  2843.  
  2844. 6.2.1.  Users
  2845.  
  2846.    Authentication using this authentication protocol makes
  2847.    use of a defined set of userNames. For any user on whose behalf a
  2848.    message must be authenticated at a particular SNMP engine, that
  2849.    SNMP engine must have knowledge of that user. An SNMP engine that
  2850.    wishes to communicate with another SNMP engine must also have
  2851.    knowledge of a user known to that engine, including knowledge of
  2852.    the applicable attributes of that user.
  2853.  
  2854.    A user and its attributes are defined as follows:
  2855.  
  2856.    <userName>
  2857.      A string representing the name of the user.
  2858.    <authKey>
  2859.      A user's secret key to be used when calculating a digest.
  2860.      It MUST be 16 octets long for MD5.                                   |
  2861.  
  2862. 6.2.2.  msgAuthoritativeEngineID
  2863.  
  2864.    The msgAuthoritativeEngineID value contained in an authenticated
  2865.    message specifies the authoritative SNMP engine for that particular
  2866.    message (see the definition of SnmpEngineID in the SNMP
  2867.    Architecture document [SNMP-ARCH]).
  2868.  
  2869.    The user's (private) authentication key is normally different at
  2870.    each authoritative SNMP engine and so the snmpEngineID is used
  2871.    to select the proper key for the authentication process.
  2872.  
  2873. 6.2.3.  SNMP Messages Using this Authentication Protocol
  2874.  
  2875.    Messages using this authentication protocol carry a
  2876.    msgAuthenticationParameters field as part of the
  2877.    msgSecurityParameters.  For this protocol, the
  2878.    msgAuthenticationParameters field is the serialized OCTET STRING
  2879.    representing the first 12 octets of the HMAC-MD5-96 output done        |
  2880.    over the wholeMsg.                                                     |
  2881.  
  2882.    The digest is calculated over the wholeMsg so if a message is
  2883.    authenticated, that also means that all the fields in the message
  2884.    are intact and have not been tampered with.
  2885.  
  2886.  
  2887.  
  2888. Blumenthal/Wijnen           Expires March 1998                 [Page 49]
  2889.  
  2890. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  2891.  
  2892.  
  2893.  
  2894. 6.2.4.  Services provided by the HMAC-MD5-96 Authentication Module        |
  2895.                                                                           |
  2896.    This section describes the inputs and outputs that the HMAC-MD5-96     |
  2897.    Authentication module expects and produces when the User-based         |
  2898.    Security module calls the HMAC-MD5-96 Authentication module for        |
  2899.    services.                                                              |
  2900.  
  2901.  
  2902. 6.2.4.1.  Services for Generating an Outgoing SNMP Message
  2903.  
  2904.    The HMAC-MD5-96 authentication protocol assumes that the selection     |
  2905.    of the authKey is done by the caller and that the caller passes
  2906.    the secret key to be used.
  2907.  
  2908.    Upon completion the authentication module returns statusInformation
  2909.    and, if the message digest was correctly calculated, the wholeMsg
  2910.    with the digest inserted at the proper place. The abstract service
  2911.    primitive is:
  2912.  
  2913.    statusInformation =              -- success or failure
  2914.      authenticateOutgoingMsg(
  2915.      IN   authKey                   -- secret key for authentication
  2916.      IN   wholeMsg                  -- unauthenticated complete message
  2917.      OUT  authenticatedWholeMsg     -- complete authenticated message
  2918.           )
  2919.  
  2920.    The abstract data elements are:
  2921.  
  2922.      statusInformation
  2923.        An indication of whether the authentication process was
  2924.        successful.  If not it is an indication of the problem.
  2925.      authKey
  2926.        The secret key to be used by the authentication algorithm.
  2927.        The length of this key MUST be 16 octets.                          |
  2928.      wholeMsg
  2929.        The message to be authenticated.
  2930.      authenticatedWholeMsg
  2931.        The authenticated message (including inserted digest) on output.
  2932.  
  2933.    Note, that authParameters field is filled by the authentication
  2934.    module and this field should be already present in the wholeMsg
  2935.    before the Message Authentication Code (MAC) is generated.
  2936.  
  2937. 6.2.4.2.  Services for Processing an Incoming SNMP Message
  2938.  
  2939.    The HMAC-MD5-96 authentication protocol assumes that the selection     |
  2940.    of the authKey is done by the caller and that the caller passes        |
  2941.    the secret key to be used.                                             |
  2942.  
  2943.    Upon completion the authentication module returns statusInformation
  2944.  
  2945.  
  2946.  
  2947. Blumenthal/Wijnen           Expires March 1998                 [Page 50]
  2948.  
  2949. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  2950.  
  2951.  
  2952.    and, if the message digest was correctly calculated, the wholeMsg
  2953.    as it was processed. The abstract service primitive is:
  2954.  
  2955.    statusInformation =              -- success or failure
  2956.      authenticateIncomingMsg(
  2957.      IN   authKey                   -- secret key for authentication
  2958.      IN   authParameters            -- as received on the wire
  2959.      IN   wholeMsg                  -- as received on the wire
  2960.      OUT  authenticatedWholeMsg     -- complete authenticated message
  2961.        )
  2962.  
  2963.    The abstract data elements are:
  2964.  
  2965.      statusInformation
  2966.        An indication of whether the authentication process was
  2967.        successful.  If not it is an indication of the problem.
  2968.      authKey
  2969.        The secret key to be used by the authentication algorithm.
  2970.        The length of this key MUST be 16 octets.                          |
  2971.      authParameters
  2972.        The authParameters from the incoming message.
  2973.      wholeMsg
  2974.        The message to be authenticated on input and the authenticated
  2975.        message on output.
  2976.      authenticatedWholeMsg
  2977.        The whole message after the authentication check is complete.
  2978.  
  2979.  
  2980.  
  2981.  
  2982.  
  2983.  
  2984.  
  2985.  
  2986.  
  2987.  
  2988.  
  2989.  
  2990.  
  2991.  
  2992.  
  2993.  
  2994.  
  2995.  
  2996.  
  2997.  
  2998.  
  2999.  
  3000.  
  3001.  
  3002.  
  3003.  
  3004.  
  3005.  
  3006. Blumenthal/Wijnen           Expires March 1998                 [Page 51]
  3007.  
  3008. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  3009.  
  3010.  
  3011. 6.3.  Elements of Procedure
  3012.  
  3013.    This section describes the procedures for the HMAC-MD5-96              |
  3014.    authentication protocol.
  3015.  
  3016. 6.3.1.  Processing an Outgoing Message
  3017.  
  3018.    This section describes the procedure followed by an SNMP engine
  3019.    whenever it must authenticate an outgoing message using the
  3020.    usmHMACMD5AuthProtocol.                                                |
  3021.  
  3022.    1)  The msgAuthenticationParameters field is set to the
  3023.        serialization, according to the rules in [RFC1906], of an
  3024.        OCTET STRING containing 96 zero octets.                            |
  3025.                                                                           |
  3026.    2)  From the secret authKey, two keys K1 and K2 are derived:           3
  3027.                                                                           3
  3028.          a) extend the authKey to 64 octets by appending 48 zero          |
  3029.             octets; save it as extendedAuthKey                            |
  3030.          b) obtain IPAD by replicating the octet 0x36 64 times;           |
  3031.          c) obtain K1 by XORing extendedAuthKey with IPAD;                |
  3032.          d) obtain OPAD by replicating the octet 0x5C 64 times;           |
  3033.          e) obtain K2 by XORing extendedAuthKey with OPAD.                |
  3034.                                                                           |
  3035.    4) Prepend K1 to the wholeMsg and calculate MD5 digest over it         |
  3036.       according to [MD5].                                                 |
  3037.                                                                           |
  3038.    5) Prepend K2 to the result of the step 4 and calculate MD5 digest     |
  3039.       over it according to [MD5]. Take the first 12 octets of the final   |
  3040.       digest - this is Message Authentication Code (MAC).                 |
  3041.                                                                           |
  3042.    6) Replace the msgAuthenticationParameters field with MAC obtained     |
  3043.       in the step 5.                                                      |
  3044.                                                                           |
  3045.    7) The authenticatedWholeMsg is then returned to the caller            |
  3046.       together with statusInformation indicating success.                 |
  3047.                                                                           |
  3048. 6.3.2.  Processing an Incoming Message
  3049.  
  3050.    This section describes the procedure followed by an SNMP engine
  3051.    whenever it must authenticate an incoming message using the
  3052.    usmHMACMD5AuthProtocol.                                                |
  3053.                                                                           |
  3054.    1)  If the digest received in the msgAuthenticationParameters field    |
  3055.        is not 12 octets long, then an failure and an errorIndication      |
  3056.        (authenticationError) is returned to the calling module.           |
  3057.                                                                           |
  3058.    2)  The MAC received in the msgAuthenticationParameters field          |
  3059.        is saved.                                                          |
  3060.                                                                           |
  3061.    3)  The digest in the msgAuthenticationParameters field is replaced    |
  3062.  
  3063.  
  3064.  
  3065. Blumenthal/Wijnen           Expires March 1998                 [Page 52]
  3066.  
  3067. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  3068.  
  3069.  
  3070.        by the 12 zero octets.                                             |
  3071.                                                                           |
  3072.    4)  From the secret authKey, two keys K1 and K2 are derived:           3
  3073.                                                                           3
  3074.          a) extend the authKey to 64 octets by appending 48 zero          |
  3075.             octets; save it as extendedAuthKey                            |
  3076.          b) obtain IPAD by replicating the octet 0x36 64 times;           |
  3077.          c) obtain K1 by XORing extendedAuthKey with IPAD;                |
  3078.          d) obtain OPAD by replicating the octet 0x5C 64 times;           |
  3079.          e) obtain K2 by XORing extendedAuthKey with OPAD.                |
  3080.                                                                           |
  3081.    5)  The MAC is calculated over the wholeMsg:                           |
  3082.                                                                           |
  3083.          a) prepend K1 to the wholeMsg and calculate the MD5 digest       |
  3084.             over it;                                                      |
  3085.          b) prepend K2 to the result of step 5.a and calculate the        |
  3086.             MD5 digest over it;                                           |
  3087.          c) first 12 octets of the result of step 5.b is the MAC.         |
  3088.                                                                           |
  3089.        The msgAuthenticationParameters field is replaced with the         |
  3090.        MAC value that was saved in step 2.                                |
  3091.                                                                           |
  3092.    6)  Then the newly calculated MAC is compared with the MAC             |
  3093.        saved in step 2. If they do not match, then an failure             |
  3094.        and an errorIndication (authenticationFailure) is returned to      |
  3095.        the calling module.                                                |
  3096.                                                                           |
  3097.    7)  The authenticatedWholeMsg and statusInformation indicating         |
  3098.        success are then returned to the caller.                           |
  3099.                                                                           |
  3100.                                                                           |
  3101.  
  3102.  
  3103.  
  3104.  
  3105.  
  3106.  
  3107.  
  3108.  
  3109.  
  3110.  
  3111.  
  3112.  
  3113.  
  3114.  
  3115.  
  3116.  
  3117.  
  3118.  
  3119.  
  3120.  
  3121.  
  3122.  
  3123.  
  3124. Blumenthal/Wijnen           Expires March 1998                 [Page 53]
  3125.  
  3126. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  3127.  
  3128.  
  3129. 7.  HMAC-SHA-96 Authentication Protocol                                   |
  3130.                                                                           |
  3131.    This section describes the HMAC-SHA-96 authentication protocol.        |
  3132.    This protocol uses the SHA hash-function which is described in         |
  3133.    [SHA-NIST], in HMAC mode described in [RFC2104], truncating            |
  3134.    the output to 96 bits.                                                 |
  3135.                                                                           |
  3136.    This protocol is identified by usmHMACSHAAuthProtocol.                 |
  3137.                                                                           |
  3138.    Over time, other authentication protocols may be defined either        |
  3139.    as a replacement of this protocol or in addition to this protocol.     |
  3140.                                                                           |
  3141. 7.1.  Mechanisms                                                          |
  3142.                                                                           |
  3143.    - In support of data integrity, a message digest algorithm is          |
  3144.      required.  A digest is calculated over an appropriate portion        |
  3145.      of an SNMP message and included as part of the message sent          |
  3146.      to the recipient.                                                    |
  3147.                                                                           |
  3148.    - In support of data origin authentication and data integrity,         |
  3149.      a secret value is prepended to the SNMP message prior to             |
  3150.      computing the digest; the calculated digest is then partially        |
  3151.      inserted into the message prior to transmission. The prepended       |
  3152.      secret is not transmitted.  The secret value is shared by all        |
  3153.      SNMP engines authorized to originate messages on behalf of the       |
  3154.      appropriate user.                                                    |
  3155.                                                                           3
  3156.                                                                           3
  3157. 7.1.1.  Digest Authentication Mechanism                                   |
  3158.                                                                           |
  3159.    The Digest Authentication Mechanism defined in this memo provides      |
  3160.    for:                                                                   |
  3161.                                                                           |
  3162.    - verification of the integrity of a received message, i.e., the       |
  3163.      the message received is the message sent.                            |
  3164.                                                                           |
  3165.      The integrity of the message is protected by computing a digest      |
  3166.      over an appropriate portion of the message.  The digest is           |
  3167.      computed by the originator of the message, transmitted with the      |
  3168.      message, and verified by the recipient of the message.               |
  3169.                                                                           |
  3170.    - verification of the user on whose behalf the message was generated.  |
  3171.                                                                           |
  3172.      A secret value known only to SNMP engines authorized to              |
  3173.      generate messages on behalf of a user is used in HMAC mode           |
  3174.      (see [RFC2104]). It also recommends the hash-function output         |
  3175.      used as Message Authentication Code, to be truncated.                |
  3176.                                                                           |
  3177.    This mechanism uses the SHA [SHA-NIST] message digest algorithm.       |
  3178.    A 160-bit SHA digest is calculated in a special (HMAC) way over        |
  3179.    the designated portion of an SNMP message and the first 96 bits        |
  3180.  
  3181.  
  3182.  
  3183. Blumenthal/Wijnen           Expires March 1998                 [Page 54]
  3184.  
  3185. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  3186.  
  3187.  
  3188.    of this digest is included as part of the message sent to the          |
  3189.    recipient. The size of the digest carried in a message is 12           |
  3190.    octets. The size of the private authentication key (the secret)        |
  3191.    is 20 octets. For the details see section 7.3.                         |
  3192.                                                                           |
  3193. 7.2.  Elements of the HMAC-SHA-96 Authentication Protocol                 |
  3194.                                                                           |
  3195.    This section contains definitions required to realize the              |
  3196.    authentication module defined in this section of this memo.            |
  3197.                                                                           |
  3198. 7.2.1.  Users                                                             |
  3199.                                                                           |
  3200.    Authentication using this authentication protocol makes use            |
  3201.    of a defined set of userNames.  For any user on whose behalf a         |
  3202.    message must be authenticated at a particular SNMP engine, that        |
  3203.    SNMP engine must have knowledge of that user.  An SNMP engine that     |
  3204.    wishes to communicate with another SNMP engine must also have          |
  3205.    knowledge of a user known to that engine, including knowledge of       |
  3206.    the applicable attributes of that user.                                |
  3207.                                                                           |
  3208.    A user and its attributes are defined as follows:                      |
  3209.                                                                           |
  3210.    <userName>                                                             |
  3211.      A string representing the name of the user.                          |
  3212.    <authKey>                                                              |
  3213.      A user's secret key to be used when calculating a digest.            |
  3214.      It MUST be 20 octets long for SHA.                                   |
  3215.                                                                           |
  3216. 7.2.2.  msgAuthoritativeEngineID                                          |
  3217.                                                                           |
  3218.    The msgAuthoritativeEngineID value contained in an authenticated       |
  3219.    message specifies the authoritative SNMP engine for that particular    |
  3220.    message (see the definition of SnmpEngineID in the SNMP                |
  3221.    Architecture document [SNMP-ARCH]).                                    |
  3222.                                                                           |
  3223.    The user's (private) authentication key is normally different at       |
  3224.    each authoritative SNMP engine and so the snmpEngineID is used         |
  3225.    to select the proper key for the authentication process.               |
  3226.                                                                           |
  3227. 7.2.3.  SNMP Messages Using this Authentication Protocol                  |
  3228.                                                                           |
  3229.    Messages using this authentication protocol carry a                    |
  3230.    msgAuthenticationParameters field as part of the                       |
  3231.    msgSecurityParameters. For this protocol, the                          |
  3232.    msgAuthenticationParameters field is the serialized                    |
  3233.    OCTET STRING representing the first 12 octets of HMAC-SHA-96           |
  3234.    output done over the wholeMsg.                                         |
  3235.                                                                           |
  3236.    The digest is calculated over the wholeMsg so if a message is          |
  3237.    authenticated, that also means that all the fields in the              |
  3238.    message are intact and have not been tampered with.                    |
  3239.  
  3240.  
  3241.  
  3242. Blumenthal/Wijnen           Expires March 1998                 [Page 55]
  3243.  
  3244. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  3245.  
  3246.  
  3247.                                                                           |
  3248. 7.2.4.  Services provided by the HMAC-SHA-96 Authentication Module        |
  3249.                                                                           |
  3250.    This section describes the inputs and outputs that the HMAC-SHA-96     |
  3251.    Authentication module expects and produces when the User-based         |
  3252.    Security module calls the HMAC-SHA-96 Authentication module            |
  3253.    for services.                                                          |
  3254.                                                                           |
  3255.                                                                           |
  3256. 7.2.4.1.  Services for Generating an Outgoing SNMP Message                |
  3257.                                                                           |
  3258.    HMAC-SHA-96 authentication protocol assumes that the selection         |
  3259.    of the authKey is done by the caller and that the caller passes        |
  3260.    the secret key to be used.                                             |
  3261.                                                                           |
  3262.    Upon completion the authentication module returns statusInformation    |
  3263.    and, if the message digest was correctly calculated, the wholeMsg      |
  3264.    with the digest inserted at the proper place. The abstract service     |
  3265.    primitive is:                                                          |
  3266.                                                                           |
  3267.    statusInformation =              -- success or failure                 |
  3268.      authenticateOutgoingMsg(                                             |
  3269.      IN   authKey                   -- secret key for authentication      |
  3270.      IN   wholeMsg                  -- unauthenticated complete message   |
  3271.      OUT  authenticatedWholeMsg     -- complete authenticated message     |
  3272.           )                                                               |
  3273.                                                                           |
  3274.    The abstract data elements are:                                        |
  3275.                                                                           |
  3276.      statusInformation                                                    |
  3277.        An indication of whether the authentication process was            |
  3278.        successful.  If not it is an indication of the problem.            |
  3279.      authKey                                                              |
  3280.        The secret key to be used by the authentication algorithm.         |
  3281.        The length of this key MUST be 20 octets.                          |
  3282.      wholeMsg                                                             |
  3283.        The message to be authenticated.                                   |
  3284.      authenticatedWholeMsg                                                |
  3285.        The authenticated message (including inserted digest) on output.   |
  3286.                                                                           |
  3287.    Note, that authParameters field is filled by the authentication        |
  3288.    module and this field should be already present in the wholeMsg        |
  3289.    before the Message Authentication Code (MAC) is generated.             |
  3290.                                                                           |
  3291. 7.2.4.2.  Services for Processing an Incoming SNMP Message                |
  3292.                                                                           |
  3293.    HMAC-SHA-96 authentication protocol assumes that the selection         |
  3294.    of the authKey is done by the caller and that the caller passes        |
  3295.    the secret key to be used.                                             |
  3296.                                                                           |
  3297.    Upon completion the authentication module returns statusInformation    |
  3298.  
  3299.  
  3300.  
  3301. Blumenthal/Wijnen           Expires March 1998                 [Page 56]
  3302.  
  3303. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  3304.  
  3305.  
  3306.    and, if the message digest was correctly calculated, the wholeMsg      |
  3307.    as it was processed. The abstract service primitive is:                |
  3308.                                                                           |
  3309.    statusInformation =              -- success or failure                 |
  3310.      authenticateIncomingMsg(                                             |
  3311.      IN   authKey                   -- secret key for authentication      |
  3312.      IN   authParameters            -- as received on the wire            |
  3313.      IN   wholeMsg                  -- as received on the wire            |
  3314.      OUT  authenticatedWholeMsg     -- complete authenticated message     |
  3315.        )                                                                  |
  3316.                                                                           |
  3317.    The abstract data elements are:                                        |
  3318.                                                                           |
  3319.      statusInformation                                                    |
  3320.        An indication of whether the authentication process was            |
  3321.        successful.  If not it is an indication of the problem.            |
  3322.      authKey                                                              |
  3323.        The secret key to be used by the authentication algorithm.         |
  3324.        The length of this key MUST be 20 octets.                          |
  3325.      authParameters                                                       |
  3326.        The authParameters from the incoming message.                      |
  3327.      wholeMsg                                                             |
  3328.        The message to be authenticated on input and the authenticated     |
  3329.        message on output.                                                 |
  3330.      authenticatedWholeMsg                                                |
  3331.        The whole message after the authentication check is complete.      |
  3332.  
  3333.  
  3334.  
  3335.  
  3336.  
  3337.  
  3338.  
  3339.  
  3340.  
  3341.  
  3342.  
  3343.  
  3344.  
  3345.  
  3346.  
  3347.  
  3348.  
  3349.  
  3350.  
  3351.  
  3352.  
  3353.  
  3354.  
  3355.  
  3356.  
  3357.  
  3358.  
  3359.  
  3360. Blumenthal/Wijnen           Expires March 1998                 [Page 57]
  3361.  
  3362. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  3363.  
  3364.  
  3365. 7.3.  Elements of Procedure                                               |
  3366.                                                                           |
  3367.    This section describes the procedures for the HMAC-SHA-96              |
  3368.    authentication protocol.                                               |
  3369.                                                                           |
  3370. 7.3.1.  Processing an Outgoing Message                                    |
  3371.                                                                           |
  3372.    This section describes the procedure followed by an SNMP engine        |
  3373.    whenever it must authenticate an outgoing message using the            |
  3374.    usmHMACSHAAuthProtocol.                                                |
  3375.                                                                           |
  3376.    1)  The msgAuthenticationParameters field is set to the                |
  3377.        serialization, according to the rules in [RFC1906], of an          |
  3378.        OCTET STRING containing 12 zero octets.                            |
  3379.                                                                           |
  3380.    2)  From the secret authKey, two keys K1 and K2 are derived:           3
  3381.                                                                           3
  3382.          a) extend the authKey to 64 octets by appending 44 zero          |
  3383.             octets; save it as extendedAuthKey                            |
  3384.          b) obtain IPAD by replicating the octet 0x36 64 times;           |
  3385.          c) obtain K1 by XORing extendedAuthKey with IPAD;                |
  3386.          d) obtain OPAD by replicating the octet 0x5C 64 times;           |
  3387.          e) obtain K2 by XORing extendedAuthKey with OPAD.                |
  3388.                                                                           |
  3389.    4) Prepend K1 to the wholeMsg and calculate the SHA digest over it     |
  3390.       according to [SHA-NIST].                                            |
  3391.                                                                           |
  3392.    5) Prepend K2 to the result of the step 4 and calculate SHA digest     |
  3393.       over it according to [SHA-NIST]. Take the first 12 octets of the    |
  3394.       final digest - this is Message Authentication Code (MAC).           |
  3395.                                                                           |
  3396.    6) Replace the msgAuthenticationParameters field with MAC obtained     |
  3397.       in the step 5.                                                      |
  3398.                                                                           |
  3399.    7) The authenticatedWholeMsg is then returned to the caller            |
  3400.       together with statusInformation indicating success.                 |
  3401.                                                                           |
  3402. 7.3.2.  Processing an Incoming Message                                    |
  3403.                                                                           |
  3404.    This section describes the procedure followed by an SNMP engine        |
  3405.    whenever it must authenticate an incoming message using the            |
  3406.    usmHMACSHAAuthProtocol.                                                |
  3407.                                                                           |
  3408.    1)  If the digest received in the msgAuthenticationParameters field    |
  3409.        is not 12 octets long, then an failure and an errorIndication      |
  3410.        (authenticationError) is returned to the calling module.           |
  3411.                                                                           |
  3412.    2)  The MAC received in the msgAuthenticationParameters field          |
  3413.        is saved.                                                          |
  3414.                                                                           |
  3415.    3)  The digest in the msgAuthenticationParameters field is             |
  3416.  
  3417.  
  3418.  
  3419. Blumenthal/Wijnen           Expires March 1998                 [Page 58]
  3420.  
  3421. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  3422.  
  3423.  
  3424.        replaced by the 12 zero octets.                                    |
  3425.                                                                           |
  3426.    4)  From the secret authKey, two keys K1 and K2 are derived:           3
  3427.                                                                           3
  3428.          a) extend the authKey to 64 octets by appending 44 zero          |
  3429.             octets; save it as extendedAuthKey                            |
  3430.          b) obtain IPAD by replicating the octet 0x36 64 times;           |
  3431.          c) obtain K1 by XORing extendedAuthKey with IPAD;                |
  3432.          d) obtain OPAD by replicating the octet 0x5C 64 times;           |
  3433.          e) obtain K2 by XORing extendedAuthKey with OPAD.                |
  3434.                                                                           |
  3435.    5)  The MAC is calculated over the wholeMsg:                           |
  3436.                                                                           |
  3437.          a) prepend K1 to the wholeMsg and calculate the SHA digest       |
  3438.             over it;                                                      |
  3439.          b) prepend K2 to the result of step 5.a and calculate the        |
  3440.             SHA digest over it;                                           |
  3441.          c) first 12 octets of the result of step 5.b is the MAC.         |
  3442.                                                                           |
  3443.        The msgAuthenticationParameters field is replaced with the         |
  3444.        MAC value that was saved in step 2.                                |
  3445.                                                                           |
  3446.    6)  The the newly calculated MAC is compared with the MAC saved in     |
  3447.        step 2. If they do not match, then a failure and an                |
  3448.        errorIndication (authenticationFailure) are returned to the        |
  3449.        calling module.                                                    |
  3450.                                                                           |
  3451.    7)  The authenticatedWholeMsg and statusInformation indicating         |
  3452.        success are then returned to the caller.                           |
  3453.                                                                           |
  3454.                                                                           |
  3455.  
  3456.  
  3457.  
  3458.  
  3459.  
  3460.  
  3461.  
  3462.  
  3463.  
  3464.  
  3465.  
  3466.  
  3467.  
  3468.  
  3469.  
  3470.  
  3471.  
  3472.  
  3473.  
  3474.  
  3475.  
  3476.  
  3477.  
  3478. Blumenthal/Wijnen           Expires March 1998                 [Page 59]
  3479.  
  3480. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  3481.  
  3482.  
  3483. 8.  CBC-DES Symmetric Encryption Protocol                                 |
  3484.                                                                           |
  3485.    This section describes the CBC-DES Symmetric Encryption Protocol.      |
  3486.    This protocol is the first privacy protocol defined for the
  3487.    User-based Security Model.
  3488.  
  3489.    This protocol is identified by usmDESPrivProtocol.
  3490.  
  3491.    Over time, other privacy protocols may be defined either
  3492.    as a replacement of this protocol or in addition to this protocol.
  3493.  
  3494.  
  3495. 8.1.  Mechanisms                                                          |
  3496.  
  3497.    - In support of data confidentiality, an encryption algorithm is
  3498.      required.  An appropriate portion of the message is encrypted
  3499.      prior to being transmitted. The User-based Security Model
  3500.      specifies that the scopedPDU is the portion of the message
  3501.      that needs to be encrypted.
  3502.  
  3503.    - A secret value in combination with a timeliness value is used
  3504.      to create the en/decryption key and the initialization vector.
  3505.      The secret value is shared by all SNMP engines authorized to
  3506.      originate messages on behalf of the appropriate user.
  3507.                                                                           3
  3508.                                                                           3
  3509. 8.1.1.  Symmetric Encryption Protocol                                     |
  3510.  
  3511.    The Symmetric Encryption Protocol defined in this memo provides
  3512.    support for data confidentiality.  The designated portion of an
  3513.    SNMP message is encrypted and included as part of the message
  3514.    sent to the recipient.
  3515.  
  3516.    Two organizations have published specifications defining the DES:
  3517.    the National Institute of Standards and Technology (NIST)
  3518.    [DES-NIST] and the American National Standards Institute
  3519.    [DES-ANSI].  There is a companion Modes of Operation specification
  3520.    for each definition ([DESO-NIST] and [DESO-ANSI], respectively).
  3521.  
  3522.    The NIST has published three additional documents that implementers
  3523.    may find useful.
  3524.  
  3525.    - There is a document with guidelines for implementing and using
  3526.      the DES, including functional specifications for the DES and
  3527.      its modes of operation [DESG-NIST].
  3528.  
  3529.    - There is a specification of a validation test suite for the DES
  3530.      [DEST-NIST].  The suite is designed to test all aspects of the
  3531.      DES and is useful for pinpointing specific problems.
  3532.  
  3533.    - There is a specification of a maintenance test for the DES
  3534.  
  3535.  
  3536.  
  3537. Blumenthal/Wijnen           Expires March 1998                 [Page 60]
  3538.  
  3539. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  3540.  
  3541.  
  3542.      [DESM-NIST].  The test utilizes a minimal amount of data and
  3543.      processing to test all components of the DES.  It provides a
  3544.      simple yes-or-no indication of correct operation and is useful
  3545.      to run as part of an initialization step, e.g., when a computer
  3546.      re-boots.
  3547.  
  3548. 8.1.1.1.  DES key and Initialization Vector.                              |
  3549.  
  3550.    The first 8 octets of the 16-octet secret (private privacy key) are    |
  3551.    used as a DES key.  Since DES uses only 56 bits, the Least
  3552.    Significant Bit in each octet is disregarded.                          |
  3553.  
  3554.    The Initialization Vector for encryption is obtained using the
  3555.    following procedure.
  3556.  
  3557.    The last 8 octets of the 16-octet secret (private privacy key)         |
  3558.    are used as pre-IV.
  3559.  
  3560.    In order to ensure that the IV for two different packets encrypted
  3561.    by the same key, are not the same (i.e., the IV does not repeat) we    |
  3562.    need to "salt" the pre-IV with something unique per packet.
  3563.    An 8-octet string is used as the "salt".  The concatenation            |
  3564.    of the generating SNMP engine's 32-bit snmpEngineBoots and a local
  3565.    32-bit integer, that the encryption engine maintains, is input to
  3566.    the "salt".  The 32-bit integer is initialized to an arbitrary
  3567.    value at boot time.
  3568.    The 32-bit snmpEngineBoots is converted to the first 4 octets          |
  3569.    (Most Significant Byte first) of our "salt".  The 32-bit integer
  3570.    is then converted to the last 4 octet (Most Significant Byte first)    |
  3571.    of our "salt".  The resulting "salt" is then XOR-ed with the
  3572.    pre-IV. The 8-octet "salt" is then put into the privParameters
  3573.    field encoded as an OCTET STRING.  The "salt" integer is then
  3574.    modified.  We recommend that it be incremented by one and wrap
  3575.    when it reaches the maximum value.
  3576.  
  3577.    How exactly the value of the "salt" (and thus of the IV) varies,
  3578.    is an implementation issue, as long as the measures are taken to
  3579.    avoid producing a duplicate IV.
  3580.  
  3581.    The "salt" must be placed in the privParameters field to enable the
  3582.    receiving entity to compute the correct IV and to decrypt the
  3583.    message.
  3584.  
  3585. 8.1.1.2.  Data Encryption.                                                |
  3586.  
  3587.    The data to be encrypted is treated as sequence of octets. Its
  3588.    length should be an integral multiple of 8 - and if it is not, the
  3589.    data is padded at the end as necessary.  The actual pad value
  3590.    is irrelevant.
  3591.  
  3592.    The data is encrypted in Cipher Block Chaining mode.
  3593.  
  3594.  
  3595.  
  3596. Blumenthal/Wijnen           Expires March 1998                 [Page 61]
  3597.  
  3598. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  3599.  
  3600.  
  3601.    The plaintext is divided into 64-bit blocks.
  3602.  
  3603.    The plaintext for each block is XOR-ed with the ciphertext
  3604.    of the previous block, the result is encrypted and the output
  3605.    of the encryption is the ciphertext for the block.
  3606.    This procedure is repeated until there are no more plaintext
  3607.    blocks.
  3608.  
  3609.    For the very first block, the Initialization Vector is used
  3610.    instead of the ciphertext of the previous block.
  3611.  
  3612. 8.1.1.3.  Data Decryption                                                 |
  3613.  
  3614.    Before decryption, the encrypted data length is verified.
  3615.    If the length of the OCTET STRING to be decrypted is not an
  3616.    integral multiple of 8 octets, the decryption process is halted
  3617.    and an appropriate exception noted.  When decrypting, the padding
  3618.    is ignored.
  3619.  
  3620.    The first ciphertext block is decrypted, the decryption output is
  3621.    XOR-ed with the Initialization Vector, and the result is the first
  3622.    plaintext block.
  3623.  
  3624.    For each subsequent block, the ciphertext block is decrypted,
  3625.    the decryption output is XOR-ed with the previous ciphertext
  3626.    block and the result is the plaintext block.
  3627.  
  3628. 8.2.  Elements of the DES Privacy Protocol                                |
  3629.  
  3630.    This section contains definitions required to realize the privacy
  3631.    module defined by this memo.
  3632.  
  3633. 8.2.1.  Users                                                             |
  3634.  
  3635.    Data en/decryption using this Symmetric Encryption Protocol makes
  3636.    use of a defined set of userNames.  For any user on whose behalf
  3637.    a message must be en/decrypted at a particular SNMP engine, that
  3638.    SNMP engine must have knowledge of that user.  An SNMP engine that
  3639.    wishes to communicate with another SNMP engine must also have
  3640.    knowledge of a user known to that SNMP engine, including knowledge
  3641.    of the applicable attributes of that user.
  3642.  
  3643.    A user and its attributes are defined as follows:
  3644.  
  3645.    <userName>
  3646.      An octet string representing the name of the user.
  3647.    <privKey>
  3648.      A user's secret key to be used as input for the DES key and IV.
  3649.      The length of this key MUST be 16 octets.                            |
  3650.  
  3651. 8.2.2.  msgAuthoritativeEngineID                                          |
  3652.  
  3653.  
  3654.  
  3655. Blumenthal/Wijnen           Expires March 1998                 [Page 62]
  3656.  
  3657. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  3658.  
  3659.  
  3660.  
  3661.    The msgAuthoritativeEngineID value contained in an authenticated
  3662.    message specifies the authoritative SNMP engine for that particular
  3663.    message (see the definition of SnmpEngineID in the SNMP
  3664.    Architecture document [SNMP-ARCH]).
  3665.  
  3666.    The user's (private) privacy key is normally different at each
  3667.    authoritative SNMP engine and so the snmpEngineID is used to select
  3668.    the proper key for the en/decryption process.
  3669.  
  3670. 8.2.3.  SNMP Messages Using this Privacy Protocol                         |
  3671.  
  3672.    Messages using this privacy protocol carry a msgPrivacyParameters
  3673.    field as part of the msgSecurityParameters. For this protocol, the
  3674.    msgPrivacyParameters field is the serialized OCTET STRING
  3675.    representing the "salt" that was used to create the IV.
  3676.  
  3677. 8.2.4.  Services provided by the DES Privacy Module                       |
  3678.  
  3679.    This section describes the inputs and outputs that the DES Privacy
  3680.    module expects and produces when the User-based Security module
  3681.    invokes the DES Privacy module for services.
  3682.  
  3683. 8.2.4.1.  Services for Encrypting Outgoing Data                           |
  3684.  
  3685.    This DES privacy protocol assumes that the selection of the
  3686.    privKey is done by the caller and that the caller passes
  3687.    the secret key to be used.
  3688.  
  3689.    Upon completion the privacy module returns statusInformation
  3690.    and, if the encryption process was successful, the encryptedPDU
  3691.    and the msgPrivacyParameters encoded as an OCTET STRING.
  3692.    The abstract service primitive is:
  3693.  
  3694.    statusInformation =              -- success of failure
  3695.      encryptData(
  3696.      IN    encryptKey               -- secret key for encryption
  3697.      IN    dataToEncrypt            -- data to encrypt (scopedPDU)
  3698.      OUT   encryptedData            -- encrypted data (encryptedPDU)
  3699.      OUT   privParameters           -- filled in by service provider
  3700.            )
  3701.  
  3702.    The abstract data elements are:
  3703.  
  3704.      statusInformation
  3705.        An indication of the success or failure of the encryption
  3706.        process.  In case of failure, it is an indication of the error.
  3707.      encryptKey
  3708.        The secret key to be used by the encryption algorithm.
  3709.        The length of this key MUST be 16 octets.                          |
  3710.      dataToEncrypt
  3711.  
  3712.  
  3713.  
  3714. Blumenthal/Wijnen           Expires March 1998                 [Page 63]
  3715.  
  3716. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  3717.  
  3718.  
  3719.        The data that must be encrypted.
  3720.      encryptedData
  3721.        The encrypted data upon successful completion.
  3722.      privParameters
  3723.        The privParameters encoded as an OCTET STRING.
  3724.  
  3725. 8.2.4.2.  Services for Decrypting Incoming Data                           |
  3726.  
  3727.    This DES privacy protocol assumes that the selection of the
  3728.    privKey is done by the caller and that the caller passes
  3729.    the secret key to be used.
  3730.  
  3731.    Upon completion the privacy module returns statusInformation
  3732.    and, if the decryption process was successful, the scopedPDU
  3733.    in plain text. The abstract service primitive is:
  3734.  
  3735.    statusInformation =
  3736.      decryptData(
  3737.      IN    decryptKey               -- secret key for decryption
  3738.      IN    privParameters           -- as received on the wire
  3739.      IN    encryptedData            -- encrypted data (encryptedPDU)
  3740.      OUT   decryptedData            -- decrypted data (scopedPDU)
  3741.            )
  3742.  
  3743.    The abstract data elements are:
  3744.  
  3745.      statusInformation
  3746.        An indication whether the data was successfully decrypted
  3747.        and if not an indication of the error.
  3748.      decryptKey
  3749.        The secret key to be used by the decryption algorithm.
  3750.        The length of this key MUST be 16 octets.                          |
  3751.      privParameters
  3752.        The "salt" to be used to calculate the IV.
  3753.      encryptedData
  3754.        The data to be decrypted.
  3755.      decryptedData
  3756.        The decrypted data.
  3757.  
  3758.  
  3759.  
  3760.  
  3761.  
  3762.  
  3763.  
  3764.  
  3765.  
  3766.  
  3767.  
  3768.  
  3769.  
  3770.  
  3771.  
  3772.  
  3773. Blumenthal/Wijnen           Expires March 1998                 [Page 64]
  3774.  
  3775. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  3776.  
  3777.  
  3778. 8.3.  Elements of Procedure.                                              |
  3779.  
  3780.    This section describes the procedures for the DES privacy protocol.
  3781.  
  3782. 8.3.1.  Processing an Outgoing Message                                    |
  3783.  
  3784.    This section describes the procedure followed by an SNMP engine
  3785.    whenever it must encrypt part of an outgoing message using the
  3786.    usmDESPrivProtocol.
  3787.  
  3788.    1)  The secret cryptKey is used to construct the DES encryption key,   3
  3789.        the "salt" and the DES pre-IV (as described in section 8.1.1.1).   3
  3790.  
  3791.    2)  The privParameters field is set to the serialization according
  3792.        to the rules in [RFC1906] of an OCTET STRING representing the
  3793.        the "salt" string.
  3794.  
  3795.    3)  The scopedPDU is encrypted (as described in section 8.1.1.2)       |
  3796.        and the encrypted data is serialized according to the rules
  3797.        in [RFC1906] as an OCTET STRING.
  3798.  
  3799.    4)  The serialized OCTET STRING representing the encrypted
  3800.        scopedPDU together with the privParameters and statusInformation
  3801.        indicating success is returned to the calling module.
  3802.  
  3803. 8.3.2.  Processing an Incoming Message                                    |
  3804.  
  3805.    This section describes the procedure followed by an SNMP engine
  3806.    whenever it must decrypt part of an incoming message using the
  3807.    usmDESPrivProtocol.
  3808.  
  3809.    1)  If the privParameters field is not an 8-octet OCTET STRING,        |
  3810.        then an error indication (decryptionError) is returned to
  3811.        the calling module.
  3812.  
  3813.    2)  The "salt" is extracted from the privParameters field.
  3814.  
  3815.    3)  The secret cryptKey and the "salt" are then used to construct the  3
  3816.        DES decryption key and pre-IV (as described in section 8.1.1.1).   3
  3817.  
  3818.    4)  The encryptedPDU is then decrypted (as described in
  3819.        section 8.1.1.3).                                                  |
  3820.  
  3821.    5)  If the encryptedPDU cannot be decrypted, then an error
  3822.        indication (decryptionError) is returned to the calling module.
  3823.  
  3824.    6)  The decrypted scopedPDU and statusInformation indicating
  3825.        success are returned to the calling module.
  3826.  
  3827.  
  3828.  
  3829.  
  3830.  
  3831.  
  3832. Blumenthal/Wijnen           Expires March 1998                 [Page 65]
  3833.  
  3834. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  3835.  
  3836.  
  3837. 9.  Editors' Addresses                                                    |
  3838.  
  3839.    Co-editor   Uri Blumenthal
  3840.                IBM T. J. Watson Research
  3841.    postal:     30 Saw Mill River Pkwy,
  3842.                Hawthorne, NY 10532
  3843.                USA
  3844.    email:      uri@watson.ibm.com
  3845.    phone:      +1-914-784-7064
  3846.  
  3847.    Co-editor:  Bert Wijnen
  3848.                IBM T. J. Watson Research
  3849.    postal:     Schagen 33
  3850.                3461 GL Linschoten
  3851.                Netherlands
  3852.    email:      wijnen@vnet.ibm.com
  3853.    phone:      +31-348-432-794
  3854.  
  3855. 10.  Acknowledgements
  3856.  
  3857. This document is the result of the efforts of the SNMPv3 Working Group.
  3858. Some special thanks are in order to the following SNMPv3 WG members:
  3859.  
  3860.     Dave Battle (SNMP Research, Inc.)
  3861.     Uri Blumenthal (IBM T.J. Watson Research Center)
  3862.     Jeff Case (SNMP Research, Inc.)
  3863.     John Curran (BBN)
  3864.     T. Max Devlin (Hi-TECH Connections)
  3865.     John Flick (Hewlett Packard)
  3866.     David Harrington (Cabletron Systems Inc.)
  3867.     N.C. Hien (IBM T.J. Watson Research Center)
  3868.     Dave Levi (SNMP Research, Inc.)
  3869.     Louis A Mamakos (UUNET Technologies Inc.)
  3870.     Paul Meyer (Secure Computing Corporation)
  3871.     Keith McCloghrie (Cisco Systems)
  3872.     Russ Mundy (Trusted Information Systems, Inc.)
  3873.     Bob Natale (ACE*COMM Corporation)
  3874.     Mike O'Dell (UUNET Technologies Inc.)
  3875.     Dave Perkins (DeskTalk)
  3876.     Peter Polkinghorne (Brunel University)
  3877.     Randy Presuhn (BMC Software, Inc.)
  3878.     David Reid (SNMP Research, Inc.)
  3879.     Shawn Routhier (Epilogue)
  3880.     Juergen Schoenwaelder (TU Braunschweig)
  3881.     Bob Stewart (Cisco Systems)
  3882.     Bert Wijnen (IBM T.J. Watson Research Center)
  3883.  
  3884. The document is based on recommendations of the IETF Security and
  3885. Administrative Framework Evolution for SNMP Advisory Team.
  3886. Members of that Advisory Team were:
  3887.  
  3888.  
  3889.  
  3890.  
  3891. Blumenthal/Wijnen           Expires March 1998                 [Page 66]
  3892.  
  3893. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  3894.  
  3895.  
  3896.     David Harrington (Cabletron Systems Inc.)
  3897.     Jeff Johnson (Cisco Systems)
  3898.     David Levi (SNMP Research Inc.)
  3899.     John Linn (Openvision)
  3900.     Russ Mundy (Trusted Information Systems) chair
  3901.     Shawn Routhier (Epilogue)
  3902.     Glenn Waters (Nortel)
  3903.     Bert Wijnen (IBM T. J. Watson Research Center)
  3904.  
  3905. As recommended by the Advisory Team and the SNMPv3 Working Group
  3906. Charter, the design incorporates as much as practical from previous
  3907. RFCs and drafts. As a result, special thanks are due to the authors
  3908. of previous designs known as SNMPv2u and SNMPv2*:
  3909.  
  3910.     Jeff Case (SNMP Research, Inc.)
  3911.     David Harrington (Cabletron Systems Inc.)
  3912.     David Levi (SNMP Research, Inc.)
  3913.     Keith McCloghrie (Cisco Systems)
  3914.     Brian O'Keefe (Hewlett Packard)
  3915.     Marshall T. Rose (Dover Beach Consulting)
  3916.     Jon Saperia (BGS Systems Inc.)
  3917.     Steve Waldbusser (International Network Services)
  3918.     Glenn W. Waters (Bell-Northern Research Ltd.)
  3919.  
  3920.  
  3921.  
  3922.  
  3923.  
  3924.  
  3925.  
  3926.  
  3927.  
  3928.  
  3929.  
  3930.  
  3931.  
  3932.  
  3933.  
  3934.  
  3935.  
  3936.  
  3937.  
  3938.  
  3939.  
  3940.  
  3941.  
  3942.  
  3943.  
  3944.  
  3945.  
  3946.  
  3947.  
  3948.  
  3949.  
  3950. Blumenthal/Wijnen           Expires March 1998                 [Page 67]
  3951.  
  3952. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  3953.  
  3954.  
  3955. 11.  Security Considerations                                              |
  3956.  
  3957. 11.1.  Recommended Practices                                              |
  3958.  
  3959.    This section describes practices that contribute to the secure,
  3960.    effective operation of the mechanisms defined in this memo.
  3961.  
  3962.    - An SNMP engine must discard SNMP Response messages that do not
  3963.      correspond to any currently outstanding Request message. It is
  3964.      the responsibility of the Message Processing module to take care
  3965.      of this. For example it can use a msgID for that.
  3966.  
  3967.      An SNMP Command Generator Application must discard any Response
  3968.      PDU for which there is no currently outstanding Request PDU;
  3969.      for example for SNMPv2 [RFC1905] PDUs, the request-id component
  3970.      in the PDU can be used to correlate Responses to outstanding
  3971.      Requests.
  3972.  
  3973.      Although it would be typical for an SNMP engine and an SNMP
  3974.      Command Generator Application to do this as a matter of course,
  3975.      when using these security protocols it is significant due to
  3976.      the possibility of message duplication (malicious or otherwise).
  3977.  
  3978.    - If an SNMP engine uses a msgID for correlating Response messages
  3979.      to outstanding Request messages, then it MUST use different
  3980.      msgIDs in all such Request messages that it sends out during a
  3981.      Time Window (150 seconds) period.
  3982.  
  3983.      A Command Generator or Notification Originator Application MUST
  3984.      use different request-ids in all Request PDUs that it sends out
  3985.      during a TimeWindow (150 seconds) period.
  3986.  
  3987.      This must be done to protect against the possibility of message
  3988.      duplication (malicious or otherwise).
  3989.  
  3990.      For example, starting operations with a msgID and/or request-id
  3991.      value of zero is not a good idea.  Initializing them with an
  3992.      unpredictable number (so they do not start out the same after
  3993.      each reboot) and then incrementing by one would be acceptable.
  3994.  
  3995.    - An SNMP engine should perform time synchronization using
  3996.      authenticated messages in order to protect against the
  3997.      possibility of message duplication (malicious or otherwise).
  3998.  
  3999.    - When sending state altering messages to a managed authoritative
  4000.      SNMP engine, a Command Generator Application should delay sending
  4001.      successive messages to that managed SNMP engine until a positive
  4002.      acknowledgement is received for the previous message or until
  4003.      the previous message expires.
  4004.  
  4005.      No message ordering is imposed by the SNMP. Messages may be
  4006.  
  4007.  
  4008.  
  4009. Blumenthal/Wijnen           Expires March 1998                 [Page 68]
  4010.  
  4011. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  4012.  
  4013.  
  4014.      received in any order relative to their time of generation and
  4015.      each will be processed in the ordered received.  Note that when
  4016.      an authenticated message is sent to a managed SNMP engine, it
  4017.      will be valid for a period of time of approximately 150 seconds
  4018.      under normal circumstances, and is subject to replay during this
  4019.      period.  Indeed, an SNMP engine and SNMP Command Generator
  4020.      Applications must cope with the loss and re-ordering of messages
  4021.      resulting from anomalies in the network as a matter of course.
  4022.  
  4023.      However, a managed object, snmpSetSerialNo [RFC1907], is
  4024.      specifically defined for use with SNMP Set operations in order
  4025.      to provide a mechanism to ensure that the processing of SNMP
  4026.      messages occurs in a specific order.
  4027.  
  4028.    - The frequency with which the secrets of a User-based Security
  4029.      Model user should be changed is indirectly related to the
  4030.      frequency of their use.
  4031.  
  4032.      Protecting the secrets from disclosure is critical to the overall
  4033.      security of the protocols.  Frequent use of a secret provides a
  4034.      continued source of data that may be useful to a cryptanalyst in
  4035.      exploiting known or perceived weaknesses in an algorithm.
  4036.      Frequent changes to the secret avoid this vulnerability.
  4037.  
  4038.      Changing a secret after each use is generally regarded as the
  4039.      most secure practice, but a significant amount of overhead may
  4040.      be associated with that approach.
  4041.  
  4042.      Note, too, in a local environment the threat of disclosure may be
  4043.      less significant, and as such the changing of secrets may be less
  4044.      frequent.  However, when public data networks are used as the
  4045.      communication paths, more caution is prudent.
  4046.  
  4047. 11.2  Defining Users                                                      |
  4048.  
  4049.    The mechanisms defined in this document employ the notion of users
  4050.    on whose behalf messages are sent.  How "users" are defined is
  4051.    subject to the security policy of the network administration.
  4052.    For example, users could be individuals (e.g., "joe" or "jane"),
  4053.    or a particular role (e.g., "operator" or "administrator"), or a
  4054.    combination (e.g., "joe-operator", "jane-operator" or "joe-admin").
  4055.    Furthermore, a user may be a logical entity, such as an SNMP
  4056.    Application or a set of SNMP Applications, acting on behalf of an
  4057.    individual or role, or set of individuals, or set of roles,
  4058.    including combinations.
  4059.  
  4060.    Appendix A describes an algorithm for mapping a user "password" to
  4061.    a 16 octet value for use as either a user's authentication key or
  4062.    privacy key (or both).  Note however, that using the same password
  4063.    (and therefore the same key) for both authentication and privacy
  4064.    is very poor security practice and should be strongly discouraged.
  4065.  
  4066.  
  4067.  
  4068. Blumenthal/Wijnen           Expires March 1998                 [Page 69]
  4069.  
  4070. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  4071.  
  4072.  
  4073.    Passwords are often generated, remembered, and input by a human.
  4074.    Human-generated passwords may be less than the 16 octets required
  4075.    by the authentication and privacy protocols, and brute force
  4076.    attacks can be quite easy on a relatively short ASCII character
  4077.    set.  Therefore, the algorithm is Appendix A performs a
  4078.    transformation on the password.  If the Appendix A algorithm is
  4079.    used, SNMP implementations (and SNMP configuration applications)
  4080.    must ensure that passwords are at least 8 characters in length.
  4081.  
  4082.    Because the Appendix A algorithm uses such passwords (nearly)
  4083.    directly, it is very important that they not be easily guessed.
  4084.    It is suggested that they be composed of mixed-case alphanumeric
  4085.    and punctuation characters that don't form words or phrases that
  4086.    might be found in a dictionary.  Longer passwords improve the
  4087.    security of the system.  Users may wish to input multiword
  4088.    phrases to make their password string longer while ensuring that
  4089.    it is memorable.
  4090.  
  4091.    Since it is infeasible for human users to maintain different
  4092.    passwords for every SNMP engine, but security requirements
  4093.    strongly discourage having the same key for more than one SNMP
  4094.    engine, the User-based Security Model employs a compromise
  4095.    proposed in [Localized-key].  It derives the user keys for the
  4096.    SNMP engines from user's password in such a way that it is
  4097.    practically impossible to either determine the user's password,
  4098.    or user's key for another SNMP engine from any combination of
  4099.    user's keys on SNMP engines.
  4100.  
  4101.    Note however, that if user's password is disclosed, then key
  4102.    localization will not help and network security may be compromised     3
  4103.    in this case. Therefore a user's password or non-localized key         3
  4104.    MUST NOT be stored on a managed device/node. Instead the               4
  4105.    localized key SHALL be stored (if at all) , so that, in case a         4
  4106.    device does get compromised, no other managed or managing devices      4
  4107.    get compromised.                                                       3
  4108.  
  4109. 11.3.  Conformance                                                        |
  4110.  
  4111.    To be termed a "Secure SNMP implementation" based on the
  4112.    User-based Security Model, an SNMP implementation MUST:
  4113.  
  4114.    - implement one or more Authentication Protocol(s). The HMAC-MD5-96    |
  4115.      and HMAC-SHA-96 Authentication Protocols defined in this memo are    |
  4116.      examples of such protocols.                                          |
  4117.  
  4118.    - to the maximum extent possible, prohibit access to the secret(s)     |
  4119.      of each user about which it maintains information in a Local         |
  4120.      Configuration Datastore (LCD) under all circumstances except as      |
  4121.      required to generate and/or validate SNMP messages with respect      |
  4122.      to that user.                                                        |
  4123.  
  4124.  
  4125.  
  4126.  
  4127. Blumenthal/Wijnen           Expires March 1998                 [Page 70]
  4128.  
  4129. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  4130.  
  4131.  
  4132.    - implement the key-localization mechanism.
  4133.  
  4134.    - implement the SNMP-USER-BASED-SM-MIB.                                |
  4135.  
  4136.    In addition, an authoritative SNMP engine SHOULD provide initial       |
  4137.    configuration in accordance with Appendix A.1.                         |
  4138.  
  4139.    Implementation of a Privacy Protocol (the DES Symmetric Encryption
  4140.    Protocol defined in this memo is one such protocol) is optional.
  4141.  
  4142. 12.  References                                                           |
  4143.  
  4144. [RFC1903] The SNMPv2 Working Group, Case, J., McCloghrie, K., Rose, M.,   |
  4145.     and S. Waldbusser, "Textual Conventions for Version 2 of the Simple   |
  4146.     Network Management Protocol (SNMPv2)", RFC 1903, January 1996.        |
  4147.                                                                           |
  4148. [RFC1905] The SNMPv2 Working Group, Case, J., McCloghrie, K.,
  4149.      Rose, M., and S., Waldbusser, "Protocol Operations for
  4150.      Version 2 of the Simple Network Management Protocol (SNMPv2)",
  4151.      RFC 1905, January 1996.
  4152.  
  4153. [RFC1906] The SNMPv2 Working Group, Case, J., McCloghrie, K.,
  4154.      Rose, M., and S. Waldbusser, "Transport Mappings for
  4155.      Version 2 of the Simple Network Management Protocol (SNMPv2)",
  4156.      RFC 1906, January 1996.
  4157.  
  4158. [RFC1907] The SNMPv2 Working Group, Case, J., McCloghrie, K.,
  4159.      Rose, M., and S. Waldbusser, "Management Information Base for
  4160.      Version 2 of the Simple Network Management Protocol (SNMPv2)",
  4161.      RFC 1907 January 1996.
  4162.  
  4163. [RFC2104] Network Working Group, H. Krawczyk, M. Bellare, R. Canetti,     |
  4164.      "HMAC: Keyed-Hashing for Message Authentication", RFC 2104,          |
  4165.      February 1997.                                                       |
  4166.  
  4167. [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate             4
  4168.      Requirement Levels", RFC 2119, BCP 14, March 1997.                   4
  4169.  
  4170. [SNMP-ARCH] The SNMPv3 Working Group, Harrington, D., Wijnen, B.,         3
  4171.      Presuhn, R., "An Architecture for describing SNMP Management         3
  4172.      Frameworks", draft-ietf-snmpv3-next-gen-arch-05.txt,                 3
  4173.      September 1997.                                                      3
  4174.  
  4175. [SNMP-USM] The SNMPv3 Working Group, Blumenthal, U., Wijnen, B.,
  4176.      "The User-Based Security Model for Version 3 of the Simple
  4177.      Network Management Protocol (SNMPv3)",
  4178.      draft-ietf-snmpv3-usm-02.txt, September 1997.                        |
  4179.  
  4180. [Localized-Key] U. Blumenthal, N. C. Hien, B. Wijnen
  4181.      "Key Derivation for Network Management Applications"
  4182.      IEEE Network Magazine, April/May issue, 1997.
  4183.  
  4184.  
  4185.  
  4186. Blumenthal/Wijnen           Expires March 1998                 [Page 71]
  4187.  
  4188. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  4189.  
  4190.  
  4191.  
  4192. [MD5] Rivest, R.,  "Message Digest Algorithm MD5",
  4193.      RFC 1321, April 1992.
  4194.  
  4195. [DES-NIST] Data Encryption Standard, National Institute of Standards
  4196.      and Technology.  Federal Information Processing Standard (FIPS)
  4197.      Publication 46-1.  Supersedes FIPS Publication 46, (January, 1977;
  4198.      reaffirmed January, 1988).
  4199.  
  4200. [DES-ANSI] Data Encryption Algorithm, American National Standards
  4201.      Institute.  ANSI X3.92-1981, (December, 1980).
  4202.  
  4203. [DESO-NIST] DES Modes of Operation, National Institute of Standards and
  4204.      Technology.  Federal Information Processing Standard (FIPS)
  4205.      Publication 81, (December, 1980).
  4206.  
  4207. [DESO-ANSI] Data Encryption Algorithm - Modes of Operation, American
  4208.      National Standards Institute.  ANSI X3.106-1983, (May 1983).
  4209.  
  4210. [DESG-NIST] Guidelines for Implementing and Using the NBS Data
  4211.      Encryption Standard, National Institute of Standards and
  4212.      Technology.  Federal Information Processing Standard (FIPS)
  4213.      Publication 74, (April, 1981).
  4214.  
  4215. [DEST-NIST] Validating the Correctness of Hardware Implementations of
  4216.      the NBS Data Encryption Standard, National Institute of Standards
  4217.      and Technology.  Special Publication 500-20.
  4218.  
  4219. [DESM-NIST] Maintenance Testing for the Data Encryption Standard,
  4220.      National Institute of Standards and Technology.
  4221.      Special Publication 500-61, (August, 1980).
  4222.  
  4223. [SHA-NIST] Secure Hash Algorithm. NIST FIPS 180-1, (April, 1995)          4
  4224.      http://csrc.nist.gov/fips/fip180-1.txt (ASCII)                       4
  4225.      http://csrc.nist.gov/fips/fip180-1.ps  (Postscript)                  4
  4226.  
  4227.  
  4228.  
  4229.  
  4230.  
  4231.  
  4232.  
  4233.  
  4234.  
  4235.  
  4236.  
  4237.  
  4238.  
  4239.  
  4240.  
  4241.  
  4242.  
  4243.  
  4244.  
  4245. Blumenthal/Wijnen           Expires March 1998                 [Page 72]
  4246.  
  4247. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  4248.  
  4249.  
  4250. APPENDIX A - Installation
  4251.  
  4252. A.1.  SNMP engine Installation Parameters
  4253.  
  4254. During installation, an authoritative SNMP engine SHOULD (in the
  4255. meaning as defined in [RFC2119]) be configured with several initial
  4256. parameters.  These include:
  4257.  
  4258. 1) A security posture
  4259.  
  4260.    The choice of security posture determines if initial configuration
  4261.    is implemented and if so how.  One of three possible choices
  4262.    is selected:
  4263.  
  4264.          minimum-secure,
  4265.          semi-secure,
  4266.          very-secure (i.e., no-initial-configuration)
  4267.  
  4268.    In the case of a very-secure posture, there is no initial
  4269.    configuration, and so the following steps are irrelevant.
  4270.  
  4271. 2) one or more secrets
  4272.  
  4273.    These are the authentication/privacy secrets for the first user
  4274.    to be configured.
  4275.  
  4276.    One way to accomplish this is to have the installer enter a
  4277.    "password" for each required secret. The password is then
  4278.    algorithmically converted into the required secret by:
  4279.  
  4280.    - forming a string of length 1,048,576 octets by repeating the
  4281.      value of the password as often as necessary, truncating
  4282.      accordingly, and using the resulting string as the input to
  4283.      the MD5 algorithm [MD5].  The resulting digest, termed
  4284.      "digest1", is used in the next step.
  4285.  
  4286.    - a second string is formed by concatenating digest1, the SNMP
  4287.      engine's snmpEngineID value, and digest1.
  4288.      This string is used as input to the MD5 algorithm [MD5].
  4289.  
  4290.      The resulting digest is the required secret (see Appendix A.2).
  4291.  
  4292.  
  4293.  
  4294.  
  4295.  
  4296.  
  4297.  
  4298.  
  4299.  
  4300.  
  4301.  
  4302.  
  4303.  
  4304. Blumenthal/Wijnen           Expires March 1998                 [Page 73]
  4305.  
  4306. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  4307.  
  4308.  
  4309.    With these configured parameters, the SNMP engine instantiates
  4310.    the following usmUserEntry in the usmUserTable:
  4311.  
  4312.                            no privacy support     privacy support
  4313.                            ------------------     ---------------
  4314.    usmUserEngineID         localEngineID          localEngineID
  4315.    usmUserName             "initial"              "initial"
  4316.    usmUserSecurityName     "initial"              "initial"
  4317.    usmUserCloneFrom        ZeroDotZero            ZeroDotZero
  4318.    usmUserAuthProtocol     usmHMACMD5AuthProtocol usmHMACMD5AuthProtocol  |
  4319.    usmUserAuthKeyChange    ""                     ""
  4320.    usmUserOwnAuthKeyChange ""                     ""
  4321.    usmUserPrivProtocol     none                   usmDESPrivProtocol
  4322.    usmUserPrivKeyChange    ""                     ""
  4323.    usmUserOwnPrivKeyChange ""                     ""
  4324.    usmUserPublic           ""                     ""
  4325.    usmUserStorageType      anyValidStorageType    anyValidStorageType
  4326.    usmUserStatus           active                 active
  4327.  
  4328.  
  4329. A.2.  Password to Key Algorithm
  4330.  
  4331.    A sample code fragment (section A.2.1) demonstrates the password to    3
  4332.    key algorithm which can be used when mapping a password to an          3
  4333.    authentication or privacy key using MD5. The reference source code     4
  4334.    of MD5 is available in [RFC1321].                                      4
  4335.                                                                           3
  4336.    Another sample code fragment (section A.2.2) demonstrates the          3
  4337.    password to key algorithm which can be used when mapping a password    3
  4338.    to an authentication or privacy key using SHA (documented in           4
  4339.    SHA-NIST).                                                             4
  4340.  
  4341.    An example of the results of a correct implementation is provided
  4342.    (section A.3) which an implementer can use to check if his             3
  4343.    implementation produces the same result.
  4344.  
  4345.  
  4346.  
  4347.  
  4348.  
  4349.  
  4350.  
  4351.  
  4352.  
  4353.  
  4354.  
  4355.  
  4356.  
  4357.  
  4358.  
  4359.  
  4360.  
  4361.  
  4362.  
  4363. Blumenthal/Wijnen           Expires March 1998                 [Page 74]
  4364.  
  4365. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  4366.  
  4367.  
  4368. A.2.1.  Password to Key Sample Code for MD5                               3
  4369.  
  4370. void password_to_key_md5(                                                 3
  4371.    u_char *password,    /* IN */
  4372.    u_int   passwordlen, /* IN */
  4373.    u_char *engineID,    /* IN  - pointer to snmpEngineID  */
  4374.    u_int   engineLength /* IN  - length of snmpEngineID */
  4375.    u_char *key)         /* OUT - pointer to caller 16-octet buffer */
  4376. {
  4377.    MD5_CTX     MD;
  4378.    u_char     *cp, password_buf[64];
  4379.    u_long      password_index = 0;
  4380.    u_long      count = 0, i;
  4381.  
  4382.    MD5Init (&MD);   /* initialize MD5 */
  4383.  
  4384.    /**********************************************/
  4385.    /* Use while loop until we've done 1 Megabyte */
  4386.    /**********************************************/
  4387.    while (count < 1048576) {
  4388.       cp = password_buf;
  4389.       for (i = 0; i < 64; i++) {
  4390.           /*************************************************/
  4391.           /* Take the next octet of the password, wrapping */
  4392.           /* to the beginning of the password as necessary.*/
  4393.           /*************************************************/
  4394.           *cp++ = password[password_index++ % passwordlen];
  4395.       }
  4396.       MD5Update (&MD, password_buf, 64);
  4397.       count += 64;
  4398.    }
  4399.    MD5Final (key, &MD);          /* tell MD5 we're done */
  4400.  
  4401.    /*****************************************************/
  4402.    /* Now localize the key with the engineID and pass   */
  4403.    /* through MD5 to produce final key                  */
  4404.    /* May want to ensure that engineLength <= 32,       */
  4405.    /* otherwise need to use a buffer larger than 64     */
  4406.    /*****************************************************/
  4407.    memcpy(password_buf, key, 16);
  4408.    memcpy(password_buf+16, engineID, engineLength);
  4409.    memcpy(password_buf+engineLength, key, 16);
  4410.  
  4411.    MD5Init(&MD);
  4412.    MD5Update(&MD, password_buf, 32+engineLength);
  4413.    MD5Final(key, &MD);
  4414.  
  4415.    return;
  4416. }
  4417.  
  4418.  
  4419.  
  4420.  
  4421.  
  4422. Blumenthal/Wijnen           Expires March 1998                 [Page 75]
  4423.  
  4424. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  4425.  
  4426.  
  4427. A.2.2.  Password to Key Sample Code for SHA                               3
  4428.                                                                           3
  4429. void password_to_key_sha(                                                 3
  4430.    u_char *password,    /* IN */                                          3
  4431.    u_int   passwordlen, /* IN */                                          3
  4432.    u_char *engineID,    /* IN  - pointer to snmpEngineID  */              3
  4433.    u_int   engineLength /* IN  - length of snmpEngineID */                3
  4434.    u_char *key)         /* OUT - pointer to caller 20-octet buffer */     3
  4435. {                                                                         3
  4436.    SHA_CTX     SH;                                                        4
  4437.    u_char     *cp, password_buf[72];                                      3
  4438.    u_long      password_index = 0;                                        3
  4439.    u_long      count = 0, i;                                              3
  4440.                                                                           3
  4441.    SHAInit (&SH);   /* initialize SHA */                                  4
  4442.                                                                           3
  4443.    /**********************************************/                       3
  4444.    /* Use while loop until we've done 1 Megabyte */                       3
  4445.    /**********************************************/                       3
  4446.    while (count < 1048576) {                                              3
  4447.       cp = password_buf;                                                  3
  4448.       for (i = 0; i < 64; i++) {                                          3
  4449.           /*************************************************/             3
  4450.           /* Take the next octet of the password, wrapping */             3
  4451.           /* to the beginning of the password as necessary.*/             3
  4452.           /*************************************************/             3
  4453.           *cp++ = password[password_index++ % passwordlen];               3
  4454.       }                                                                   3
  4455.       SHAUpdate (&SH, password_buf, 64);                                  4
  4456.       count += 64;                                                        3
  4457.    }                                                                      3
  4458.    SHAFinal (key, &SH);          /* tell SHA we're done */                4
  4459.                                                                           3
  4460.    /*****************************************************/                3
  4461.    /* Now localize the key with the engineID and pass   */                3
  4462.    /* through SHA to produce final key                  */                3
  4463.    /* May want to ensure that engineLength <= 32,       */                3
  4464.    /* otherwise need to use a buffer larger than 72     */                3
  4465.    /*****************************************************/                3
  4466.    memcpy(password_buf, key, 20);                                         3
  4467.    memcpy(password_buf+20, engineID, engineLength);                       3
  4468.    memcpy(password_buf+engineLength, key, 20);                            3
  4469.                                                                           3
  4470.    SHAInit(&SH);                                                          4
  4471.    SHAUpdate(&SH, password_buf, 40+engineLength);                         4
  4472.    SHAFinal(key, &SH);                                                    4
  4473.                                                                           3
  4474.    return;                                                                3
  4475. }                                                                         3
  4476.  
  4477.  
  4478.  
  4479.  
  4480.  
  4481. Blumenthal/Wijnen           Expires March 1998                 [Page 76]
  4482.  
  4483. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  4484.  
  4485.  
  4486. A.3.  Password to Key Sample Results
  4487.  
  4488. A.3.1.  Password to Key Sample Results using MD5                          3
  4489.  
  4490.    The following shows a sample output of the password to key
  4491.    algorithm for a 16-octet key using MD5.                                3
  4492.  
  4493.    With a password of "maplesyrup" the output of the password to key
  4494.    algorithm before the key is localized with the SNMP engine's
  4495.    snmpEngineID is:
  4496.  
  4497.       '9f af 32 83 88 4e 92 83 4e bc 98 47 d8 ed d9 63'H
  4498.  
  4499.    After the intermediate key (shown above) is localized with the
  4500.    snmpEngineID value of:
  4501.  
  4502.       '00 00 00 00 00 00 00 00 00 00 00 02'H
  4503.  
  4504.    the final output of the password to key algorithm is:
  4505.  
  4506.       '52 6f 5e ed 9f cc e2 6f 89 64 c2 93 07 87 d8 2b'H
  4507.  
  4508.  
  4509. A.3.2.  Password to Key Sample Results using SHA                          3
  4510.                                                                           3
  4511.    The following shows a sample output of the password to key             3
  4512.    algorithm for a 20-octet key using SHA.                                4
  4513.                                                                           3
  4514.    With a password of "maplesyrup" the output of the password to key      3
  4515.    algorithm before the key is localized with the SNMP engine's           3
  4516.    snmpEngineID is:                                                       3
  4517.                                                                           3
  4518.       'f1 be a9 ae 66 7f 4f b6 34 1e 51 af 06 80 7e 91 e4 3b 01 ac'H      4
  4519.                                                                           3
  4520.    After the intermediate key (shown above) is localized with the         3
  4521.    snmpEngineID value of:                                                 3
  4522.                                                                           3
  4523.       '00 00 00 00 00 00 00 00 00 00 00 02'H                              3
  4524.                                                                           3
  4525.    the final output of the password to key algorithm is:                  3
  4526.                                                                           3
  4527.       '8a a3 d9 9e 3e 30 56 f2 bf e3 a9 ee f3 45 d5 39 54 91 12 be'H      4
  4528.                                                                           3
  4529.  
  4530.  
  4531.  
  4532.  
  4533.  
  4534.  
  4535.  
  4536.  
  4537.  
  4538.  
  4539.  
  4540. Blumenthal/Wijnen           Expires March 1998                 [Page 77]
  4541.  
  4542. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  4543.  
  4544.  
  4545. A.4.  Sample encoding of msgSecurityParameters
  4546.  
  4547.    The msgSecurityParameters in an SNMP message are represented as
  4548.    an OCTET STRING. This OCTET STRING should be considered opaque
  4549.    outside a specific Security Model.
  4550.  
  4551.    The User-based Security Model defines the contents of the OCTET
  4552.    STRING as a SEQUENCE (see section 2.4).
  4553.  
  4554.    Given these two properties, the following is an example of the
  4555.    msgSecurityParameters for the User-based Security Model, encoded
  4556.    as an OCTET STRING:
  4557.  
  4558.      04 <length>
  4559.      30 <length>
  4560.      04 <length> <msgAuthoritativeEngineID>
  4561.      02 <length> <msgAuthoritativeEngineBoots>
  4562.      02 <length> <msgAuthoritativeEngineTime>
  4563.      04 <length> <msgUserName>
  4564.      04 0c       <HMAC-MD5-96-digest>                                     |
  4565.      04 08       <salt>
  4566.  
  4567.    Here is the example once more, but now with real values (except
  4568.    for the digest in msgAuthenticationParameters and the salt in
  4569.    msgPrivacyParameters, which depend on variable data that we have
  4570.    not defined here):
  4571.  
  4572.      Hex Data                         Description
  4573.      --------------  -----------------------------------------------
  4574.      04 39           OCTET STRING,                  length 57
  4575.      30 37           SEQUENCE,                      length 55
  4576.      04 0c 80000002  msgAuthoritativeEngineID:      IBM                   |
  4577.            01                                       IPv4 address          |
  4578.            09840301                                 9.132.3.1
  4579.      02 01 01        msgAuthoritativeEngineBoots:   1
  4580.      02 02 0101      msgAuthoritativeEngineTime:    257
  4581.      04 04 62657274  msgUserName:                   bert
  4582.      04 0c 01234567  msgAuthenticationParameters:   sample value          |
  4583.            89abcdef
  4584.            fedcba98
  4585.      04 08 01234567  msgPrivacyParameters:          sample value
  4586.            89abcdef
  4587.  
  4588.  
  4589.  
  4590.  
  4591.  
  4592.  
  4593.  
  4594.  
  4595.  
  4596.  
  4597.  
  4598.  
  4599. Blumenthal/Wijnen           Expires March 1998                 [Page 78]
  4600.  
  4601. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  4602.  
  4603.  
  4604. Table of Contents
  4605.  
  4606. 0.  Issues and Change Log                                              2
  4607. 0.1.  Resolved Issues                                                  2
  4608. 0.2.  Change Log                                                       3
  4609. 1.  Introduction                                                       7
  4610. 1.1.  Threats                                                          7
  4611. 1.2.  Goals and Constraints                                            8
  4612. 1.3.  Security Services                                                9
  4613. 1.4.  Module Organization                                             10
  4614. 1.4.1.  Timeliness Module                                             11
  4615. 1.4.2.  Authentication Protocol                                       11
  4616. 1.4.3.  Privacy Protocol                                              11
  4617. 1.5.  Protection against Message Replay, Delay and Redirection        11
  4618. 1.5.1.  Authoritative SNMP engine                                     11
  4619. 1.5.2.  Mechanisms                                                    12
  4620. 1.6.  Abstract Service Interfaces.                                    13
  4621. 1.6.1.  User-based Security Model Primitives for Authentication       14
  4622. 1.6.2.  User-based Security Model Primitives for Privacy              14
  4623. 2.  Elements of the Model                                             15
  4624. 2.1.  User-based Security Model Users                                 15
  4625. 2.2.  Replay Protection                                               16
  4626. 2.2.1.  msgAuthoritativeEngineID                                      16
  4627. 2.2.2.  msgAuthoritativeEngineBoots and msgAuthoritativeEngineTime    16
  4628. 2.2.3.  Time Window                                                   17
  4629. 2.3.  Time Synchronization                                            18
  4630. 2.4.  SNMP Messages Using this Security Model                         19
  4631. 2.5.  Services provided by the User-based Security Model              20
  4632. 2.5.1.  Services for Generating an Outgoing SNMP Message              20
  4633. 2.5.2.  Services for Processing an Incoming SNMP Message              22
  4634. 2.6.  Key Localization Algorithm.                                     23
  4635. 3.  Elements of Procedure                                             25
  4636. 3.1.  Generating an Outgoing SNMP Message                             25
  4637. 3.2.  Processing an Incoming SNMP Message                             28
  4638. 4.  Discovery                                                         34
  4639. 5.  Definitions                                                       35
  4640. 6.  HMAC-MD5-96 Authentication Protocol                               48
  4641. 6.1.  Mechanisms                                                      48
  4642. 6.1.1.  Digest Authentication Mechanism                               48
  4643. 6.2.  Elements of the Digest Authentication Protocol                  49
  4644. 6.2.1.  Users                                                         49
  4645. 6.2.2.  msgAuthoritativeEngineID                                      49
  4646. 6.2.3.  SNMP Messages Using this Authentication Protocol              49
  4647. 6.2.4.  Services provided by the HMAC-MD5-96 Authentication Module    50
  4648. 6.2.4.1.  Services for Generating an Outgoing SNMP Message            50
  4649. 6.2.4.2.  Services for Processing an Incoming SNMP Message            50
  4650. 6.3.  Elements of Procedure                                           52
  4651. 6.3.1.  Processing an Outgoing Message                                52
  4652. 6.3.2.  Processing an Incoming Message                                52
  4653. 7.  HMAC-SHA-96 Authentication Protocol                               54
  4654. 7.1.  Mechanisms                                                      54
  4655. 7.1.1.  Digest Authentication Mechanism                               54
  4656. 7.2.  Elements of the HMAC-SHA-96 Authentication Protocol             55
  4657.  
  4658.  
  4659.  
  4660. Blumenthal/Wijnen           Expires March 1998                 [Page 79]
  4661.  
  4662. Draft     User-based Security Model (USM) for SNMPv3      September 1997
  4663.  
  4664.  
  4665. 7.2.1.  Users                                                         55
  4666. 7.2.2.  msgAuthoritativeEngineID                                      55
  4667. 7.2.3.  SNMP Messages Using this Authentication Protocol              55
  4668. 7.2.4.  Services provided by the HMAC-SHA-96 Authentication Module    56
  4669. 7.2.4.1.  Services for Generating an Outgoing SNMP Message            56
  4670. 7.2.4.2.  Services for Processing an Incoming SNMP Message            56
  4671. 7.3.  Elements of Procedure                                           58
  4672. 7.3.1.  Processing an Outgoing Message                                58
  4673. 7.3.2.  Processing an Incoming Message                                58
  4674. 8.  CBC-DES Symmetric Encryption Protocol                             60
  4675. 8.1.  Mechanisms                                                      60
  4676. 8.1.1.  Symmetric Encryption Protocol                                 60
  4677. 8.1.1.1.  DES key and Initialization Vector.                          61
  4678. 8.1.1.2.  Data Encryption.                                            61
  4679. 8.1.1.3.  Data Decryption                                             62
  4680. 8.2.  Elements of the DES Privacy Protocol                            62
  4681. 8.2.1.  Users                                                         62
  4682. 8.2.2.  msgAuthoritativeEngineID                                      62
  4683. 8.2.3.  SNMP Messages Using this Privacy Protocol                     63
  4684. 8.2.4.  Services provided by the DES Privacy Module                   63
  4685. 8.2.4.1.  Services for Encrypting Outgoing Data                       63
  4686. 8.2.4.2.  Services for Decrypting Incoming Data                       64
  4687. 8.3.  Elements of Procedure.                                          65
  4688. 8.3.1.  Processing an Outgoing Message                                65
  4689. 8.3.2.  Processing an Incoming Message                                65
  4690. 9.  Editors' Addresses                                                66
  4691. A.1.  SNMP engine Installation Parameters                             73
  4692. A.2.  Password to Key Algorithm                                       74
  4693. A.2.1.  Password to Key Sample Code for MD5                           75
  4694. A.2.2.  Password to Key Sample Code for SHA                           76
  4695. A.3.  Password to Key Sample Results                                  77
  4696. A.3.1.  Password to Key Sample Results using MD5                      77
  4697. A.3.2.  Password to Key Sample Results using SHA                      77
  4698. A.4.  Sample encoding of msgSecurityParameters                        78
  4699.  
  4700.  
  4701.  
  4702.  
  4703.  
  4704.  
  4705.  
  4706.  
  4707.  
  4708.  
  4709.  
  4710.  
  4711.  
  4712.  
  4713.  
  4714.  
  4715.  
  4716.  
  4717.  
  4718.  
  4719. Blumenthal/Wijnen           Expires March 1998                 [Page 80]
  4720.