public interface

SnmpUsmKeyHandler

com.sun.jmx.snmp.SnmpUsmKeyHandler

Class Overview

This interface allows you to compute key localization and delta generation. It is useful when adding user in USM MIB. An instance of SnmpUsmKeyHandler is associated to each SnmpEngine object. When computing key, an authentication algorithm is needed. The supported ones are : usmHMACMD5AuthProtocol and usmHMACSHAAuthProtocol.

This API is a Sun Microsystems internal API and is subject to change without notice.

Summary

Constants
int DES_DELTA_SIZE DES privacy algorithm delta size.
int DES_KEY_SIZE DES privacy algorithm key size.
Public Methods
abstract byte[] calculateAuthDelta(String algoName, byte[] oldKey, byte[] newKey, byte[] random)
Calculate the delta parameter needed when processing key change.
abstract byte[] calculatePrivDelta(String algoName, byte[] oldKey, byte[] newKey, byte[] random, int deltaSize)
Calculate the delta parameter needed when processing key change for a privacy algorithm.
abstract byte[] localizeAuthKey(String algoName, byte[] key, SnmpEngineId engineId)
Localize the passed key using the passed SnmpEngineId.
abstract byte[] localizePrivKey(String algoName, byte[] key, SnmpEngineId engineId, int keysize)
Localize the passed privacy key using the passed SnmpEngineId.
abstract byte[] password_to_key(String algoName, String password)
Translate a password to a key.

Constants

public static final int DES_DELTA_SIZE

DES privacy algorithm delta size. To be used when calculing privacy key delta.

Constant Value: 16 (0x00000010)

public static final int DES_KEY_SIZE

DES privacy algorithm key size. To be used when localizing privacy key

Constant Value: 16 (0x00000010)

Public Methods

public abstract byte[] calculateAuthDelta (String algoName, byte[] oldKey, byte[] newKey, byte[] random)

Calculate the delta parameter needed when processing key change. This computation is done by the key change initiator. It MUST be compliant to RFC 2574 description.

Parameters
algoName The authentication algorithm to use.
oldKey The old key.
newKey The new key.
random The random value.
Returns
  • The delta.
Throws
IllegalArgumentException If the algorithm is unknown.

public abstract byte[] calculatePrivDelta (String algoName, byte[] oldKey, byte[] newKey, byte[] random, int deltaSize)

Calculate the delta parameter needed when processing key change for a privacy algorithm. This computation is done by the key change initiator. It MUST be compliant to RFC 2574 description.

Parameters
algoName The authentication algorithm to use.
oldKey The old key.
newKey The new key.
random The random value.
deltaSize The algo delta size.
Returns
  • The delta.
Throws
IllegalArgumentException If the algorithm is unknown.

public abstract byte[] localizeAuthKey (String algoName, byte[] key, SnmpEngineId engineId)

Localize the passed key using the passed SnmpEngineId. It MUST be compliant to RFC 2574 description.

Parameters
algoName The authentication algorithm to use.
key The key to localize;
engineId The Id used to localize the key.
Returns
  • The localized key.
Throws
IllegalArgumentException If the algorithm is unknown.

public abstract byte[] localizePrivKey (String algoName, byte[] key, SnmpEngineId engineId, int keysize)

Localize the passed privacy key using the passed SnmpEngineId. It MUST be compliant to RFC 2574 description.

Parameters
algoName The authentication algorithm to use.
key The key to localize;
engineId The Id used to localize the key.
keysize The privacy algorithm key size.
Returns
  • The localized key.
Throws
IllegalArgumentException If the algorithm is unknown.

public abstract byte[] password_to_key (String algoName, String password)

Translate a password to a key. It MUST be compliant to RFC 2574 description.

Parameters
algoName The authentication algorithm to use.
password Password to convert.
Returns
  • The key.
Throws
IllegalArgumentException If the algorithm is unknown.