com.sun.management.snmp.usm
Interface SnmpUsmAuthAlgorithm

All Superinterfaces:
SnmpUsmAlgorithm
All Known Implementing Classes:
SnmpUsmHmacAlgorithm, SnmpUsmHmacMd5, SnmpUsmHmacSha

public interface SnmpUsmAuthAlgorithm
extends SnmpUsmAlgorithm

Authentication algorithm interface. Every authentication algorithm must be compliant to this interface. When developing your own authentication algorithm you have to implement this interface.

Since:
Java DMK 5.1

Method Summary
 byte[] calculateAuthDelta(byte[] oldKey, byte[] newKey, byte[] random)
          Calculate the delta parameter needed when processing key change.
 byte[] calculateNewAuthKey(byte[] oldKey, byte[] randomdelta)
          Compute the new key and return it.
 byte[] calculateNewPrivKey(byte[] oldKey, byte[] randomdelta, int deltaSize)
          Compute the new key and return it.
 byte[] calculatePrivDelta(byte[] oldKey, byte[] newKey, byte[] random, int deltaSize)
          Calculate the delta parameter needed when processing key change for a privacy algorithm.
 byte[] localizeAuthKey(byte[] key, SnmpEngineId engineId)
          Localize the passed key using the passed SnmpEngineId.
 byte[] localizePrivKey(byte[] key, SnmpEngineId engineId, int keysize)
          Localize the passed privacy key using the passed SnmpEngineId.
 byte[] password_to_key(String password)
          Translate a password to a key.
 byte[] sign(byte[] key, byte[] text, int length)
          Sign some data using a key.
 boolean verify(byte[] key, byte[] data, int length, byte[] signature)
          Verify a received signed data.
 
Methods inherited from interface com.sun.management.snmp.usm.SnmpUsmAlgorithm
getAlgorithm, getDeltaSize, getOid
 

Method Detail

sign

byte[] sign(byte[] key,
            byte[] text,
            int length)
Sign some data using a key.

Parameters:
key - The key to use.
text - The data to sign.
length - The data length.
Returns:
The data signature.

verify

boolean verify(byte[] key,
               byte[] data,
               int length,
               byte[] signature)
Verify a received signed data.

Parameters:
key - The key to use.
data - The data that has been signed with the key.
length - The data length.
signature - The signature to compare to.
Returns:
true if signatures are equals, false otherwise.

password_to_key

byte[] password_to_key(String password)
Translate a password to a key. It MUST be compliant to RFC 2574 description.

Parameters:
password - Password to convert.
Returns:
The key.

localizeAuthKey

byte[] localizeAuthKey(byte[] key,
                       SnmpEngineId engineId)
Localize the passed key using the passed SnmpEngineId. It MUST be compliant to RFC 2574 description.

Parameters:
key - The key to localize;
engineId - The Id used to localize the key.
Returns:
The localized key.

localizePrivKey

byte[] localizePrivKey(byte[] key,
                       SnmpEngineId engineId,
                       int keysize)
Localize the passed privacy key using the passed SnmpEngineId. It MUST be compliant to RFC 2574 description.

Parameters:
key - The key to localize;
engineId - The Id used to localize the key.
keysize - The privacy algorithm key size.
Returns:
The localized key.

calculateAuthDelta

byte[] calculateAuthDelta(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:
oldKey - The old key.
newKey - The new key.
random - The random value.
Returns:
The delta.

calculatePrivDelta

byte[] calculatePrivDelta(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:
oldKey - The old key.
newKey - The new key.
random - The random value.
deltaSize - The algorithm delta size.
Returns:
The delta.

calculateNewAuthKey

byte[] calculateNewAuthKey(byte[] oldKey,
                           byte[] randomdelta)
Compute the new key and return it. It MUST be compliant to RFC 2574 description. This is done mainly in the agent side.

Parameters:
oldKey - The old key.
randomdelta - Random and received delta concatenation.

calculateNewPrivKey

byte[] calculateNewPrivKey(byte[] oldKey,
                           byte[] randomdelta,
                           int deltaSize)
Compute the new key and return it. It MUST be compliant to RFC 2574 description. This is done mainly in the agent side.

Parameters:
oldKey - The old key.
randomdelta - Random and received delta concatenation.
deltaSize - The algorithm deltaSize

Open Source build 02
opendmk-1.0-b02 2007.10.01_19:17:46_MEST

Copyright 1998-2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.