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-00.txt < prev    next >
Text File  |  1997-07-15  |  144KB  |  4,015 lines

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