Security Model. It uses MD5 hash-function which is described in
[RFC1321], in HMAC mode described in [RFC2104], truncating the output
to 96 bits.
This protocol is identified by usmHMACMD5AuthProtocol.
Over time, other authentication protocols may be defined either as a
replacement of this protocol or in addition to this protocol.
6.1. Mechanisms
- In support of data integrity, a message digest algorithm is
required. A digest is calculated over an appropriate portion of an
SNMP message and included as part of the message sent to the
recipient.
- In support of data origin authentication and data integrity, a
secret value is prepended to SNMP message prior to computing the
digest; the calculated digest is partially inserted into the SNMP
message prior to transmission, and the prepended value is not
transmitted. The secret value is shared by all SNMP engines
authorized to originate messages on behalf of the appropriate user.
6.1.1. Digest Authentication Mechanism
The Digest Authentication Mechanism defined in this memo provides
for:
- verification of the integrity of a received message, i.e., the
message received is the message sent.
The integrity of the message is protected by computing a digest
over an appropriate portion of the message. The digest is computed
by the originator of the message, transmitted with the message, and
verified by the recipient of the message.
- verification of the user on whose behalf the message was generated.
A secret value known only to SNMP engines authorized to generate
messages on behalf of a user is used in HMAC mode (see [RFC2104]).
It also recommends the hash-function output used as Message
Authentication Code, to be truncated.
This protocol uses the MD5 [RFC1321] message digest algorithm. A
128-bit MD5 digest is calculated in a special (HMAC) way over the
designated portion of an SNMP message and the first 96 bits of this
digest is included as part of the message sent to the recipient. The
size of the digest carried in a message is 12 octets. The size of
the private authentication key (the secret) is 16 octets. For the
details see section 6.3.
6.2. Elements of the Digest Authentication Protocol
This section contains definitions required to realize the
authentication module defined in this section of this memo.
6.2.1. Users
Authentication using this authentication protocol makes use of a
defined set of userNames. For any user on whose behalf a message
must be authenticated at a particular SNMP engine, that SNMP engine
must have knowledge of that user. An SNMP engine that wishes to
communicate with another SNMP engine must also have knowledge of a
user known to that engine, including knowledge of the applicable
attributes of that user.
A user and its attributes are defined as follows:
<userName>
A string representing the name of the user.
<authKey>
A user's secret key to be used when calculating a digest.
It MUST be 16 octets long for MD5.
6.2.2. msgAuthoritativeEngineID
The msgAuthoritativeEngineID value contained in an authenticated
message specifies the authoritative SNMP engine for that particular
message (see the definition of SnmpEngineID in the SNMP Architecture
document [RFC3411]).
The user's (private) authentication key is normally different at each
authoritative SNMP engine and so the snmpEngineID is used to select
the proper key for the authentication process.
6.2.3. SNMP Messages Using this Authentication Protocol
Messages using this authentication protocol carry a
msgAuthenticationParameters field as part of the
msgSecurityParameters. For this protocol, the
msgAuthenticationParameters field is the serialized OCTET STRING
representing the first 12 octets of the HMAC-MD5-96 output done over
the wholeMsg.
The digest is calculated over the wholeMsg so if a message is
authenticated, that also means that all the fields in the message are
intact and have not been tampered with.
6.2.4. Services provided by the HMAC-MD5-96 Authentication Module
This section describes the inputs and outputs that the HMAC-MD5-96
Authentication module expects and produces when the User-based
Security module calls the HMAC-MD5-96 Authentication module for
services.
6.2.4.1. Services for Generating an Outgoing SNMP Message
The HMAC-MD5-96 authentication protocol assumes that the selection of
the authKey is done by the caller and that the caller passes the
secret key to be used.
Upon completion the authentication module returns statusInformation
and, if the message digest was correctly calculated, the wholeMsg
with the digest inserted at the proper place. The abstract service
primitive is:
statusInformation = -- success or failure
authenticateOutgoingMsg(
IN authKey -- secret key for authentication
IN wholeMsg -- unauthenticated complete message
OUT authenticatedWholeMsg -- complete authenticated message
)
The abstract data elements are:
statusInformation
An indication of whether the authentication process was successful.
If not it is an indication of the problem.
authKey
The secret key to be used by the authentication algorithm. The
length of this key MUST be 16 octets.
wholeMsg
The message to be authenticated.
authenticatedWholeMsg
The authenticated message (including inserted digest) on output.
Note, that authParameters field is filled by the authentication
module and this module and this field should be already present in
the wholeMsg before the Message Authentication Code (MAC) is
generated.
6.2.4.2. Services for Processing an Incoming SNMP Message
The HMAC-MD5-96 authentication protocol assumes that the selection of
the authKey is done by the caller and that the caller passes the
secret key to be used.
Upon completion the authentication module returns statusInformation
and, if the message digest was correctly calculated, the wholeMsg as
it was processed. The abstract service primitive is:
statusInformation = -- success or failure
authenticateIncomingMsg(
IN authKey -- secret key for authentication
IN authParameters -- as received on the wire
IN wholeMsg -- as received on the wire
OUT authenticatedWholeMsg -- complete authenticated message
)
The abstract data elements are:
statusInformation
An indication of whether the authentication process was successful.
If not it is an indication of the problem.
authKey
The secret key to be used by the authentication algorithm. The
length of this key MUST be 16 octets.
authParameters
The authParameters from the incoming message.
wholeMsg
The message to be authenticated on input and the authenticated
message on output.
authenticatedWholeMsg
The whole message after the authentication check is complete.
6.3. Elements of Procedure
This section describes the procedures for the HMAC-MD5-96
authentication protocol.
6.3.1. Processing an Outgoing Message
This section describes the procedure followed by an SNMP engine
whenever it must authenticate an outgoing message using the
usmHMACMD5AuthProtocol.
1) The msgAuthenticationParameters field is set to the serialization,
according to the rules in [RFC3417], of an OCTET STRING containing
12 zero octets.
2) From the secret authKey, two keys K1 and K2 are derived:
a) extend the authKey to 64 octets by appending 48 zero octets;
save it as extendedAuthKey
b) obtain IPAD by replicating the octet 0x36 64 times;
c) obtain K1 by XORing extendedAuthKey with IPAD;
d) obtain OPAD by replicating the octet 0x5C 64 times;
e) obtain K2 by XORing extendedAuthKey with OPAD.
3) Prepend K1 to the wholeMsg and calculate MD5 digest over it
according to [RFC1321].
4) Prepend K2 to the result of the step 4 and calculate MD5 digest
over it according to [RFC1321]. Take the first 12 octets of the
final digest - this is Message Authentication Code (MAC).
5) Replace the msgAuthenticationParameters field with MAC obtained in
the step 4.
6) The authenticatedWholeMsg is then returned to the caller together
with statusInformation indicating success.
6.3.2. Processing an Incoming Message
This section describes the procedure followed by an SNMP engine
whenever it must authenticate an incoming message using the
usmHMACMD5AuthProtocol.
1) If the digest received in the msgAuthenticationParameters field is
not 12 octets long, then an failure and an errorIndication
(authenticationError) is returned to the calling module.
2) The MAC received in the msgAuthenticationParameters field is
saved.
3) The digest in the msgAuthenticationParameters field is replaced by
the 12 zero octets.
4) From the secret authKey, two keys K1 and K2 are derived:
a) extend the authKey to 64 octets by appending 48 zero octets;
save it as extendedAuthKey
b) obtain IPAD by replicating the octet 0x36 64 times;
c) obtain K1 by XORing extendedAuthKey with IPAD;
d) obtain OPAD by replicating the octet 0x5C 64 times;
e) obtain K2 by XORing extendedAuthKey with OPAD.
5) The MAC is calculated over the wholeMsg:
a) prepend K1 to the wholeMsg and calculate the MD5 digest over
it;
b) prepend K2 to the result of step 5.a and calculate the MD5
digest over it;
c) first 12 octets of the result of step 5.b is the MAC.
The msgAuthenticationParameters field is replaced with the MAC
value that was saved in step 2.
6) Then the newly calculated MAC is compared with the MAC saved in
step 2. If they do not match, then an failure and an
errorIndication (authenticationFailure) is returned to the calling
module.
7) The authenticatedWholeMsg and statusInformation indicating success
are then returned to the caller.
7. HMAC-SHA-96 Authentication Protocol
This section describes the HMAC-SHA-96 authentication protocol. This
protocol uses the SHA hash-function which is described in [SHA-NIST],
in HMAC mode described in [RFC2104], truncating the output to 96
bits.
This protocol is identified by usmHMACSHAAuthProtocol.
Over time, other authentication protocols may be defined either as a
replacement of this protocol or in addition to this protocol.
7.1. Mechanisms
- In support of data integrity, a message digest algorithm is
required. A digest is calculated over an appropriate portion of an
SNMP message and included as part of the message sent to the
recipient.
- In support of data origin authentication and data integrity, a
secret value is prepended to the SNMP message prior to computing
the digest; the calculated digest is then partially inserted into
the message prior to transmission. The prepended secret is not
transmitted. The secret value is shared by all SNMP engines
authorized to originate messages on behalf of the appropriate user.
7.1.1. Digest Authentication Mechanism
The Digest Authentication Mechanism defined in this memo provides
for:
- verification of the integrity of a received message, i.e., the
message received is the message sent.
The integrity of the message is protected by computing a digest
over an appropriate portion of the message. The digest is computed
by the originator of the message, transmitted with the message, and
verified by the recipient of the message.
- verification of the user on whose behalf the message was generated.
A secret value known only to SNMP engines authorized to generate
messages on behalf of a user is used in HMAC mode (see [RFC2104]).
It also recommends the hash-function output used as Message
Authentication Code, to be truncated.
This mechanism uses the SHA [SHA-NIST] message digest algorithm. A
160-bit SHA digest is calculated in a special (HMAC) way over the
designated portion of an SNMP message and the first 96 bits of this
digest is included as part of the message sent to the recipient. The
size of the digest carried in a message is 12 octets. The size of
the private authentication key (the secret) is 20 octets. For the
details see section 7.3.
7.2. Elements of the HMAC-SHA-96 Authentication Protocol
This section contains definitions required to realize the
authentication module defined in this section of this memo.
7.2.1. Users
Authentication using this authentication protocol makes use of a
defined set of userNames. For any user on whose behalf a message
must be authenticated at a particular SNMP engine, that SNMP engine
must have knowledge of that user. An SNMP engine that wishes to
communicate with another SNMP engine must also have knowledge of a
user known to that engine, including knowledge of the applicable
attributes of that user.
A user and its attributes are defined as follows:
<userName>
A string representing the name of the user.
<authKey>
A user's secret key to be used when calculating a digest.
It MUST be 20 octets long for SHA.
7.2.2. msgAuthoritativeEngineID
The msgAuthoritativeEngineID value contained in an authenticated
message specifies the authoritative SNMP engine for that particular
message (see the definition of SnmpEngineID in the SNMP Architecture
document [RFC3411]).
The user's (private) authentication key is normally different at each
authoritative SNMP engine and so the snmpEngineID is used to select
the proper key for the authentication process.
7.2.3. SNMP Messages Using this Authentication Protocol
Messages using this authentication protocol carry a
msgAuthenticationParameters field as part of the
msgSecurityParameters. For this protocol, the
msgAuthenticationParameters field is the serialized OCTET STRING
representing the first 12 octets of HMAC-SHA-96 output done over the
wholeMsg.
The digest is calculated over the wholeMsg so if a message is
authenticated, that also means that all the fields in the message are
intact and have not been tampered with.
7.2.4. Services Provided by the HMAC-SHA-96 Authentication Module
This section describes the inputs and outputs that the HMAC-SHA-96
Authentication module expects and produces when the User-based
Security module calls the HMAC-SHA-96 Authentication module for
services.
7.2.4.1. Services for Generating an Outgoing SNMP Message
HMAC-SHA-96 authentication protocol assumes that the selection of the
authKey is done by the caller and that the caller passes the secret
key to be used.
Upon completion the authentication module returns statusInformation
and, if the message digest was correctly calculated, the wholeMsg
with the digest inserted at the proper place. The abstract service
primitive is:
statusInformation = -- success or failure
authenticateOutgoingMsg(
IN authKey -- secret key for authentication
IN wholeMsg -- unauthenticated complete message
OUT authenticatedWholeMsg -- complete authenticated message
)
The abstract data elements are:
statusInformation
An indication of whether the authentication process was successful.
If not it is an indication of the problem.
authKey
The secret key to be used by the authentication algorithm. The
length of this key MUST be 20 octets.
wholeMsg
The message to be authenticated.
authenticatedWholeMsg
The authenticated message (including inserted digest) on output.
Note, that authParameters field is filled by the authentication
module and this field should be already present in the wholeMsg
before the Message Authentication Code (MAC) is generated.
7.2.4.2. Services for Processing an Incoming SNMP Message
HMAC-SHA-96 authentication protocol assumes that the selection of the
authKey is done by the caller and that the caller passes the secret
key to be used.
Upon completion the authentication module returns statusInformation
and, if the message digest was correctly calculated, the wholeMsg as
it was processed. The abstract service primitive is:
statusInformation = -- success or failure
authenticateIncomingMsg(
IN authKey -- secret key for authentication
IN authParameters -- as received on the wire
IN wholeMsg -- as received on the wire
OUT authenticatedWholeMsg -- complete authenticated message
)
The abstract data elements are:
statusInformation
An indication of whether the authentication process was successful.
If not it is an indication of the problem.
authKey
The secret key to be used by the authentication algorithm. The
length of this key MUST be 20 octets.
authParameters
The authParameters from the incoming message.
wholeMsg
The message to be authenticated on input and the authenticated
message on output.
authenticatedWholeMsg
The whole message after the authentication check is complete.
7.3. Elements of Procedure
This section describes the procedures for the HMAC-SHA-96
authentication protocol.
7.3.1. Processing an Outgoing Message
This section describes the procedure followed by an SNMP engine
whenever it must authenticate an outgoing message using the
usmHMACSHAAuthProtocol.
1) The msgAuthenticationParameters field is set to the serialization,
according to the rules in [RFC3417], of an OCTET STRING containing
12 zero octets.
2) From the secret authKey, two keys K1 and K2 are derived:
a) extend the authKey to 64 octets by appending 44 zero octets;
save it as extendedAuthKey
b) obtain IPAD by replicating the octet 0x36 64 times;
c) obtain K1 by XORing extendedAuthKey with IPAD;
d) obtain OPAD by replicating the octet 0x5C 64 times;
e) obtain K2 by XORing extendedAuthKey with OPAD.
3) Prepend K1 to the wholeMsg and calculate the SHA digest over it
according to [SHA-NIST].
4) Prepend K2 to the result of the step 4 and calculate SHA digest
over it according to [SHA-NIST]. Take the first 12 octets of the
final digest - this is Message Authentication Code (MAC).
5) Replace the msgAuthenticationParameters field with MAC obtained in
the step 5.
6) The authenticatedWholeMsg is then returned to the caller together
with statusInformation indicating success.
7.3.2. Processing an Incoming Message
This section describes the procedure followed by an SNMP engine
whenever it must authenticate an incoming message using the
usmHMACSHAAuthProtocol.
1) If the digest received in the msgAuthenticationParameters field is
not 12 octets long, then an failure and an errorIndication
(authenticationError) is returned to the calling module.
2) The MAC received in the msgAuthenticationParameters field is
saved.
3) The digest in the msgAuthenticationParameters field is replaced by
the 12 zero octets.
4) From the secret authKey, two keys K1 and K2 are derived:
a) extend the authKey to 64 octets by appending 44 zero octets;
save it as extendedAuthKey
b) obtain IPAD by replicating the octet 0x36 64 times;
c) obtain K1 by XORing extendedAuthKey with IPAD;
d) obtain OPAD by replicating the octet 0x5C 64 times;
e) obtain K2 by XORing extendedAuthKey with OPAD.
5) The MAC is calculated over the wholeMsg:
a) prepend K1 to the wholeMsg and calculate the SHA digest over
it;
b) prepend K2 to the result of step 5.a and calculate the SHA
digest over it;
c) first 12 octets of the result of step 5.b is the MAC.
The msgAuthenticationParameters field is replaced with the MAC
value that was saved in step 2.
6) The the newly calculated MAC is compared with the MAC saved in
step 2. If they do not match, then a failure and an
errorIndication (authenticationFailure) are returned to the
calling module.
7) The authenticatedWholeMsg and statusInformation indicating success
are then returned to the caller.
8. CBC-DES Symmetric Encryption Protocol
This section describes the CBC-DES Symmetric Encryption Protocol.
This protocol is the first privacy protocol defined for the
User-based Security Model.
This protocol is identified by usmDESPrivProtocol.
Over time, other privacy protocols may be defined either as a
replacement of this protocol or in addition to this protocol.
8.1. Mechanisms
- In support of data confidentiality, an encryption algorithm is
required. An appropriate portion of the message is encrypted prior
to being transmitted. The User-based Security Model specifies that
the scopedPDU is the portion of the message that needs to be
encrypted.
- A secret value in combination with a timeliness value is used to
create the en/decryption key and the initialization vector. The
secret value is shared by all SNMP engines authorized to originate
messages on behalf of the appropriate user.
8.1.1. Symmetric Encryption Protocol
The Symmetric Encryption Protocol defined in this memo provides
support for data confidentiality. The designated portion of an SNMP
message is encrypted and included as part of the message sent to the
recipient.
Two organizations have published specifications defining the DES:
the National Institute of Standards and Technology (NIST) [DES-NIST]
and the American National Standards Institute [DES-ANSI]. There is a
companion Modes of Operation specification for each definition
([DESO-NIST] and [DESO-ANSI], respectively).
The NIST has published three additional documents that implementors
may find useful.
- There is a document with guidelines for implementing and using the
DES, including functional specifications for the DES and its modes
of operation [DESG-NIST].
- There is a specification of a validation test suite for the DES
[DEST-NIST]. The suite is designed to test all aspects of the DES
and is useful for pinpointing specific problems.
- There is a specification of a maintenance test for the DES [DESM-
NIST]. The test utilizes a minimal amount of data and processing
to test all components of the DES. It provides a simple yes-or-no
indication of correct operation and is useful to run as part of an
initialization step, e.g., when a computer re-boots.
8.1.1.1. DES key and Initialization Vector
The first 8 octets of the 16-octet secret (private privacy key) are
used as a DES key. Since DES uses only 56 bits, the Least
Significant Bit in each octet is disregarded.
The Initialization Vector for encryption is obtained using the
following procedure.
The last 8 octets of the 16-octet secret (private privacy key) are
used as pre-IV.
In order to ensure that the IV for two different packets encrypted by
the same key, are not the same (i.e., the IV does not repeat) we need
to "salt" the pre-IV with something unique per packet. An 8-octet
string is used as the "salt". The concatenation of the generating
SNMP engine's 32-bit snmpEngineBoots and a local 32-bit integer, that
the encryption engine maintains, is input to the "salt". The 32-bit
integer is initialized to an arbitrary value at boot time.
The 32-bit snmpEngineBoots is converted to the first 4 octets (Most
Significant Byte first) of our "salt". The 32-bit integer is then
converted to the last 4 octet (Most Significant Byte first) of our
"salt". The resulting "salt" is then XOR-ed with the pre-IV to
obtain the IV. The 8-octet "salt" is then put into the
privParameters field encoded as an OCTET STRING. The "salt" integer
is then modified. We recommend that it be incremented by one and
wrap when it reaches the maximum value.
How exactly the value of the "salt" (and thus of the IV) varies, is
an implementation issue, as long as the measures are taken to avoid
producing a duplicate IV.
The "salt" must be placed in the privParameters field to enable the
receiving entity to compute the correct IV and to decrypt the
message.
8.1.1.2. Data Encryption
The data to be encrypted is treated as sequence of octets. Its
length should be an integral multiple of 8 - and if it is not, the
data is padded at the end as necessary. The actual pad value is
irrelevant.
The data is encrypted in Cipher Block Chaining mode.
The plaintext is divided into 64-bit blocks.
The plaintext for each block is XOR-ed with the ciphertext of the
previous block, the result is encrypted and the output of the
encryption is the ciphertext for the block. This procedure is
repeated until there are no more plaintext blocks.
For the very first block, the Initialization Vector is used instead
of the ciphertext of the previous block.
8.1.1.3. Data Decryption
Before decryption, the encrypted data length is verified. If the
length of the OCTET STRING to be decrypted is not an integral
multiple of 8 octets, the decryption process is halted and an
appropriate exception noted. When decrypting, the padding is
ignored.
The first ciphertext block is decrypted, the decryption output is
XOR-ed with the Initialization Vector, and the result is the first
plaintext block.
For each subsequent block, the ciphertext block is decrypted, the
decryption output is XOR-ed with the previous ciphertext block and
the result is the plaintext block.
8.2. Elements of the DES Privacy Protocol
This section contains definitions required to realize the privacy
module defined by this memo.
8.2.1. Users
Data en/decryption using this Symmetric Encryption Protocol makes use
of a defined set of userNames. For any user on whose behalf a
message must be en/decrypted at a particular SNMP engine, that SNMP
engine must have knowledge of that user. An SNMP engine that wishes
to communicate with another SNMP engine must also have knowledge of a
user known to that SNMP engine, including knowledge of the applicable
attributes of that user.
A user and its attributes are defined as follows:
<userName>
An octet string representing the name of the user.
<privKey>
A user's secret key to be used as input for the DES key and IV.
The length of this key MUST be 16 octets.
8.2.2. msgAuthoritativeEngineID
The msgAuthoritativeEngineID value contained in an authenticated
message specifies the authoritative SNMP engine for that particular
message (see the definition of SnmpEngineID in the SNMP Architecture
document [RFC3411]).
The user's (private) privacy key is normally different at each
authoritative SNMP engine and so the snmpEngineID is used to select
the proper key for the en/decryption process.
8.2.3. SNMP Messages Using this Privacy Protocol
Messages using this privacy protocol carry a msgPrivacyParameters
field as part of the msgSecurityParameters. For this protocol, the
msgPrivacyParameters field is the serialized OCTET STRING
representing the "salt" that was used to create the IV.
8.2.4. Services Provided by the DES Privacy Module
This section describes the inputs and outputs that the DES Privacy
module expects and produces when the User-based Security module
invokes the DES Privacy module for services.
8.2.4.1. Services for Encrypting Outgoing Data
This DES privacy protocol assumes that the selection of the privKey
is done by the caller and that the caller passes the secret key to be
used.
Upon completion the privacy module returns statusInformation and, if
the encryption process was successful, the encryptedPDU and the
msgPrivacyParameters encoded as an OCTET STRING. The abstract
service primitive is:
statusInformation = -- success of failure
encryptData(
IN encryptKey -- secret key for encryption
IN dataToEncrypt -- data to encrypt (scopedPDU)
OUT encryptedData -- encrypted data (encryptedPDU)
OUT privParameters -- filled in by service provider
)
The abstract data elements are:
statusInformation
An indication of the success or failure of the encryption process.
In case of failure, it is an indication of the error.
encryptKey
The secret key to be used by the encryption algorithm. The length
of this key MUST be 16 octets.
dataToEncrypt
The data that must be encrypted.
encryptedData
The encrypted data upon successful completion.
privParameters
The privParameters encoded as an OCTET STRING.
8.2.4.2. Services for Decrypting Incoming Data
This DES privacy protocol assumes that the selection of the privKey
is done by the caller and that the caller passes the secret key to be
used.
Upon completion the privacy module returns statusInformation and, if
the decryption process was successful, the scopedPDU in plain text.
The abstract service primitive is:
statusInformation =
decryptData(
IN decryptKey -- secret key for decryption
IN privParameters -- as received on the wire
IN encryptedData -- encrypted data (encryptedPDU)
OUT decryptedData -- decrypted data (scopedPDU)
)
The abstract data elements are:
statusInformation
An indication whether the data was successfully decrypted and if
not an indication of the error.
decryptKey
The secret key to be used by the decryption algorithm. The length
of this key MUST be 16 octets.
privParameters
The "salt" to be used to calculate the IV.
encryptedData
The data to be decrypted.
decryptedData
The decrypted data.
8.3. Elements of Procedure.
This section describes the procedures for the DES privacy protocol.
8.3.1. Processing an Outgoing Message
This section describes the procedure followed by an SNMP engine
whenever it must encrypt part of an outgoing message using the
usmDESPrivProtocol.
1) The secret cryptKey is used to construct the DES encryption key,
the "salt" and the DES pre-IV (from which the IV is computed as
described in section 8.1.1.1).
2) The privParameters field is set to the serialization according to
the rules in [RFC3417] of an OCTET STRING representing the "salt"
string.
3) The scopedPDU is encrypted (as described in section 8.1.1.2)
and the encrypted data is serialized according to the rules in
[RFC3417] as an OCTET STRING.
4) The serialized OCTET STRING representing the encrypted scopedPDU
together with the privParameters and statusInformation indicating
success is returned to the calling module.
8.3.2. Processing an Incoming Message
This section describes the procedure followed by an SNMP engine
whenever it must decrypt part of an incoming message using the
usmDESPrivProtocol.
1) If the privParameters field is not an 8-octet OCTET STRING, then
an error indication (decryptionError) is returned to the calling
module.
2) The "salt" is extracted from the privParameters field.
3) The secret cryptKey and the "salt" are then used to construct the
DES decryption key and pre-IV (from which the IV is computed as
described in section 8.1.1.1).
4) The encryptedPDU is then decrypted (as described in section
8.1.1.3).
5) If the encryptedPDU cannot be decrypted, then an error indication
(decryptionError) is returned to the calling module.
6) The decrypted scopedPDU and statusInformation indicating success
are returned to the calling module.
9. Intellectual Property
The IETF takes no position regarding the validity or scope of any
intellectual property or other rights that might be claimed to
pertain to the implementation or use of the technology described in
this document or the extent to which any license under such rights
might or might not be available; neither does it represent that it
has made any effort to identify any such rights. Information on the
IETF's procedures with respect to rights in standards-track and
standards-related documentation can be found in BCP-11. Copies of
claims of rights made available for publication and any assurances of
licenses to be made available, or the result of an attempt made to
obtain a general license or permission for the use of such
proprietary rights by implementors or users of this specification can
be obtained from the IETF Secretariat.
The IETF invites any interested party to bring to its attention any
copyrights, patents or patent applications, or other proprietary
rights which may cover technology that may be required to practice
this standard. Please address the information to the IETF Executive
Director.
10. Acknowledgements
This document is the result of the efforts of the SNMPv3 Working
Group. Some special thanks are in order to the following SNMPv3 WG
members:
Harald Tveit Alvestrand (Maxware)
Dave Battle (SNMP Research, Inc.)
Alan Beard (Disney Worldwide Services)
Paul Berrevoets (SWI Systemware/Halcyon Inc.)
Martin Bjorklund (Ericsson)
Uri Blumenthal (IBM T.J. Watson Research Center)
Jeff Case (SNMP Research, Inc.)
John Curran (BBN)
Mike Daniele (Compaq Computer Corporation))
T. Max Devlin (Eltrax Systems)
John Flick (Hewlett Packard)
Rob Frye (MCI)
Wes Hardaker (U.C.Davis, Information Technology - D.C.A.S.)
David Harrington (Cabletron Systems Inc.)
Lauren Heintz (BMC Software, Inc.)
N.C. Hien (IBM T.J. Watson Research Center)
Michael Kirkham (InterWorking Labs, Inc.)
Dave Levi (SNMP Research, Inc.)
Louis A Mamakos (UUNET Technologies Inc.)
Joe Marzot (Nortel Networks)
Paul Meyer (Secure Computing Corporation)
Keith McCloghrie (Cisco Systems)
Bob Moore (IBM)
Russ Mundy (TIS Labs at Network Associates)
Bob Natale (ACE*COMM Corporation)
Mike O'Dell (UUNET Technologies Inc.)
Dave Perkins (DeskTalk)
Peter Polkinghorne (Brunel University)
Randy Presuhn (BMC Software, Inc.)
David Reeder (TIS Labs at Network Associates)
David Reid (SNMP Research, Inc.)
Aleksey Romanov (Quality Quorum)
Shawn Routhier (Epilogue)
Juergen Schoenwaelder (TU Braunschweig)
Bob Stewart (Cisco Systems)
Mike Thatcher (Independent Consultant)
Bert Wijnen (IBM T.J. Watson Research Center)
The document is based on recommendations of the IETF Security and
Administrative Framework Evolution for SNMP Advisory Team. Members
of that Advisory Team were:
David Harrington (Cabletron Systems Inc.)
Jeff Johnson (Cisco Systems)
David Levi (SNMP Research Inc.)
John Linn (Openvision)
Russ Mundy (Trusted Information Systems) chair
Shawn Routhier (Epilogue)
Glenn Waters (Nortel)
Bert Wijnen (IBM T. J. Watson Research Center)
As recommended by the Advisory Team and the SNMPv3 Working Group
Charter, the design incorporates as much as practical from previous
RFCs and drafts. As a result, special thanks are due to the authors
of previous designs known as SNMPv2u and SNMPv2*:
Jeff Case (SNMP Research, Inc.)
David Harrington (Cabletron Systems Inc.)
David Levi (SNMP Research, Inc.)
Keith McCloghrie (Cisco Systems)
Brian O'Keefe (Hewlett Packard)
Marshall T. Rose (Dover Beach Consulting)
Jon Saperia (BGS Systems Inc.)
Steve Waldbusser (International Network Services)
Glenn W. Waters (Bell-Northern Research Ltd.)
11. Security Considerations
11.1. Recommended Practices
This section describes practices that contribute to the secure,
effective operation of the mechanisms defined in this memo.
- An SNMP engine must discard SNMP Response messages that do not
correspond to any currently outstanding Request message. It is the
responsibility of the Message Processing module to take care of
this. For example it can use a msgID for that.
An SNMP Command Generator Application must discard any Response
Class PDU for which there is no currently outstanding Confirmed
Class PDU; for example for SNMPv2 [RFC3416] PDUs, the request-id
component in the PDU can be used to correlate Responses to
outstanding Requests.
Although it would be typical for an SNMP engine and an SNMP Command
Generator Application to do this as a matter of course, when using
these security protocols it is significant due to the possibility
of message duplication (malicious or otherwise).
- If an SNMP engine uses a msgID for correlating Response messages to
outstanding Request messages, then it MUST use different msgIDs in
all such Request messages that it sends out during a Time Window
(150 seconds) period.
A Command Generator or Notification Originator Application MUST use
different request-ids in all Request PDUs that it sends out during
a TimeWindow (150 seconds) period.
This must be done to protect against the possibility of message
duplication (malicious or otherwise).
For example, starting operations with a msgID and/or request-id
value of zero is not a good idea. Initializing them with an
unpredictable number (so they do not start out the same after each
reboot) and then incrementing by one would be acceptable.
- An SNMP engine should perform time synchronization using
authenticated messages in order to protect against the possibility
of message duplication (malicious or otherwise).
- When sending state altering messages to a managed authoritative
SNMP engine, a Command Generator Application should delay sending
successive messages to that managed SNMP engine until a positive
acknowledgement is received for the previous message or until the
previous message expires.
No message ordering is imposed by the SNMP. Messages may be
received in any order relative to their time of generation and each
will be processed in the ordered received. Note that when an
authenticated message is sent to a managed SNMP engine, it will be
valid for a period of time of approximately 150 seconds under
normal circumstances, and is subject to replay during this period.
Indeed, an SNMP engine and SNMP Command Generator Applications must
cope with the loss and re-ordering of messages resulting from
anomalies in the network as a matter of course.
However, a managed object, snmpSetSerialNo [RFC3418], is
specifically defined for use with SNMP Set operations in order to
provide a mechanism to ensure that the processing of SNMP messages
occurs in a specific order.
- The frequency with which the secrets of a User-based Security Model
user should be changed is indirectly related to the frequency of
their use.
Protecting the secrets from disclosure is critical to the overall
security of the protocols. Frequent use of a secret provides a
continued source of data that may be useful to a cryptanalyst in
exploiting known or perceived weaknesses in an algorithm. Frequent
changes to the secret avoid this vulnerability.
Changing a secret after each use is generally regarded as the most
secure practice, but a significant amount of overhead may be
associated with that approach.
Note, too, in a local environment the threat of disclosure may be
less significant, and as such the changing of secrets may be less
frequent. However, when public data networks are used as the
communication paths, more caution is prudent.
11.2 Defining Users
The mechanisms defined in this document employ the notion of users on
whose behalf messages are sent. How "users" are defined is subject
to the security policy of the network administration. For example,
users could be individuals (e.g., "joe" or "jane"), or a particular
role (e.g., "operator" or "administrator"), or a combination (e.g.,
"joe-operator", "jane-operator" or "joe-admin"). Furthermore, a user
may be a logical entity, such as an SNMP Application or a set of SNMP
Applications, acting on behalf of an individual or role, or set of
individuals, or set of roles, including combinations.
Appendix A describes an algorithm for mapping a user "password" to a
16/20 octet value for use as either a user's authentication key or
privacy key (or both). Note however, that using the same password
(and therefore the same key) for both authentication and privacy is
very poor security practice and should be strongly discouraged.
Passwords are often generated, remembered, and input by a human.
Human-generated passwords may be less than the 16/20 octets required
by the authentication and privacy protocols, and brute force attacks
can be quite easy on a relatively short ASCII character set.
Therefore, the algorithm is Appendix A performs a transformation on
the password. If the Appendix A algorithm is used, SNMP
implementations (and SNMP configuration applications) must ensure
that passwords are at least 8 characters in length. Please note that
longer passwords with repetitive strings may result in exactly the
same key. For example, a password 'bertbert' will result in exactly
the same key as password 'bertbertbert'.
Because the Appendix A algorithm uses such passwords (nearly)
directly, it is very important that they not be easily guessed. It
is suggested that they be composed of mixed-case alphanumeric and
punctuation characters that don't form words or phrases that might be
found in a dictionary. Longer passwords improve the security of the
system. Users may wish to input multiword phrases to make their
password string longer while ensuring that it is memorable.
Since it is infeasible for human users to maintain different
passwords for every SNMP engine, but security requirements strongly
discourage having the same key for more than one SNMP engine, the
User-based Security Model employs a compromise proposed in
[Localized-key]. It derives the user keys for the SNMP engines from
user's password in such a way that it is practically impossible to
either determine the user's password, or user's key for another SNMP
engine from any combination of user's keys on SNMP engines.
Note however, that if user's password is disclosed, then key
localization will not help and network security may be compromised in
this case. Therefore a user's password or non-localized key MUST NOT
be stored on a managed device/node. Instead the localized key SHALL
be stored (if at all), so that, in case a device does get
compromised, no other managed or managing devices get compromised.
11.3. Conformance
To be termed a "Secure SNMP implementation" based on the User-based
Security Model, an SNMP implementation MUST:
- implement one or more Authentication Protocol(s). The HMAC-MD5-96
and HMAC-SHA-96 Authentication Protocols defined in this memo are
examples of such protocols.
- to the maximum extent possible, prohibit access to the secret(s) of
each user about which it maintains information in a Local
Configuration Datastore (LCD) under all circumstances except as
required to generate and/or validate SNMP messages with respect to
that user.
- implement the key-localization mechanism.
- implement the SNMP-USER-BASED-SM-MIB.
In addition, an authoritative SNMP engine SHOULD provide initial
configuration in accordance with Appendix A.1.
Implementation of a Privacy Protocol (the DES Symmetric Encryption
Protocol defined in this memo is one such protocol) is optional.
11.4. Use of Reports
The use of unsecure reports (i.e., sending them with a securityLevel
of noAuthNoPriv) potentially exposes a non-authoritative SNMP engine
to some form of attacks. Some people consider these denial of
service attacks, others don't. An installation should evaluate the
risk involved before deploying unsecure Report PDUs.
11.5 Access to the SNMP-USER-BASED-SM-MIB
The objects in this MIB may be considered sensitive in many
environments. Specifically the objects in the usmUserTable contain
information about users and their authentication and privacy
protocols. It is important to closely control (both read and write)
access to these MIB objects by using appropriately configured Access
Control models (for example the View-based Access Control Model as
specified in [RFC3415]).
12. References
12.1 Normative References
[RFC1321] Rivest, R., "Message Digest Algorithm MD5", RFC1321,
April 1992.
[RFC2104] Krawczyk, H., Bellare, M. and R. Canetti, "HMAC:
Keyed-Hashing for Message Authentication", RFC2104,
February 1997.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC2119, March 1997.
[RFC2578] McCloghrie, K., Perkins, D., Schoenwaelder, J., Case,
J., Rose, M. and S. Waldbusser, "Structure of
Management Information Version 2 (SMIv2)", STD 58,
RFC2578, April 1999.
[RFC2579] McCloghrie, K., Perkins, D., Schoenwaelder, J., Case,
J., Rose, M. and S. Waldbusser, "Textual Conventions
for SMIv2", STD 58, RFC2579, April 1999.
[RFC2580] McCloghrie, K., Perkins, D., Schoenwaelder, J., Case,
J., Rose, M. and S. Waldbusser, "Conformance
Statements for SMIv2", STD 58, RFC2580, April 1999.
[RFC3411] Harrington, D., Presuhn, R. and B. Wijnen, "An
Architecture for Describing Simple Network Management
Protocol (SNMP) Management Frameworks", STD 62, RFC
3411, December 2002.
[RFC3412] Case, J., Harrington, D., Presuhn, R. and B. Wijnen,
"Message Processing and Dispatching for the Simple
Network Management Protocol (SNMP)", STD 62, RFC
3412, December 2002.
[RFC3415] Wijnen, B., Presuhn, R. and K. McCloghrie, "View-
based Access Control Model (VACM) for the Simple
Network Management Protocol (SNMP)", STD 62, RFC
3415, December 2002.
[RFC3416] Presuhn, R., Case, J., McCloghrie, K., Rose, M. and
S. Waldbusser, "Version 2 of the Protocol Operations
for the Simple Network Management Protocol (SNMP)",
STD 62, RFC3416, December 2002.
[RFC3417] Presuhn, R., Case, J., McCloghrie, K., Rose, M. and
S. Waldbusser, "Transport Mappings for the Simple
Network Management Protocol (SNMP)", STD 62, RFC
3417, December 2002.
[RFC3418] Presuhn, R., Case, J., McCloghrie, K., Rose, M. and