IAIK PKCS#11 Wrapper
version 1.5

iaik.pkcs.pkcs11.parameters
Class DHKeyDerivationParameters

java.lang.Object
  |
  +--iaik.pkcs.pkcs11.parameters.DHKeyDerivationParameters
All Implemented Interfaces:
java.lang.Cloneable, Parameters
Direct Known Subclasses:
EcDH1KeyDerivationParameters, EcMQVKeyDerivationParameters, X942DH1KeyDerivationParameters

public abstract class DHKeyDerivationParameters
extends java.lang.Object
implements Parameters

This abstract class encapsulates parameters for the DH mechanisms Mechanism.ECDH1_DERIVE, Mechanism.ECDH1_COFACTOR_DERIVE, Mechanism.ECMQV_DERIVE, Mechanism.X9_42_DH_DERIVE , Mechanism.X9_42_DH_HYBRID_DERIVE and Mechanism.X9_42_MQV_DERIVE.

Version:
1.0
Author:
Karl Scheibelhofer

Inner Class Summary
static interface DHKeyDerivationParameters.KeyDerivationFunctionType
          This interface defines the available key derivation function types as defined by PKCS#11: CKD_NULL, CKD_SHA1_KDF, CKD_SHA1_KDF_ASN1, CKD_SHA1_KDF_CONCATENATE.
 
Field Summary
protected  long keyDerivationFunction_
          The key derivation function used on the shared secret value.
protected  byte[] publicData_
          The other partie's public key value.
 
Constructor Summary
protected DHKeyDerivationParameters(long keyDerivationFunction, byte[] publicData)
          Create a new DHKeyDerivationParameters object with the given attributes.
 
Method Summary
 java.lang.Object clone()
          Create a (deep) clone of this object.
 boolean equals(java.lang.Object otherObject)
          Compares all member variables of this object with the other object.
 long getKeyDerivationFunction()
          Get the key derivation function used on the shared secret value.
 byte[] getPublicData()
          Get the other partie's public key value.
 int hashCode()
          The overriding of this method should ensure that the objects of this class work correctly in a hashtable.
 void setKeyDerivationFunction(long keyDerivationFunction)
          Set the ey derivation function used on the shared secret value.
 void setPublicData(byte[] publicData)
          Set the other partie's public key value.
 java.lang.String toString()
          Returns the string representation of this object.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface iaik.pkcs.pkcs11.parameters.Parameters
getPKCS11ParamsObject
 

Field Detail

keyDerivationFunction_

protected long keyDerivationFunction_
The key derivation function used on the shared secret value.

publicData_

protected byte[] publicData_
The other partie's public key value.
Constructor Detail

DHKeyDerivationParameters

protected DHKeyDerivationParameters(long keyDerivationFunction,
                                    byte[] publicData)
Create a new DHKeyDerivationParameters object with the given attributes.
Parameters:
keyDerivationFunction - The key derivation function used on the shared secret value. One of the values defined in KeyDerivationFunctionType.
publicData - The other partie's public key value.
Method Detail

clone

public java.lang.Object clone()
Create a (deep) clone of this object.
Overrides:
clone in class java.lang.Object
Returns:
A clone of this object.

getKeyDerivationFunction

public long getKeyDerivationFunction()
Get the key derivation function used on the shared secret value.
Returns:
The key derivation function used on the shared secret value. One of the values defined in KeyDerivationFunctionType.

getPublicData

public byte[] getPublicData()
Get the other partie's public key value.
Returns:
The other partie's public key value.

setKeyDerivationFunction

public void setKeyDerivationFunction(long keyDerivationFunction)
Set the ey derivation function used on the shared secret value.
Parameters:
keyDerivationFunction - The key derivation function used on the shared secret value. One of the values defined in KeyDerivationFunctionType.

setPublicData

public void setPublicData(byte[] publicData)
Set the other partie's public key value.
Parameters:
publicData - The other partie's public key value.

toString

public java.lang.String toString()
Returns the string representation of this object. Do not parse data from this string, it is for debugging only.
Overrides:
toString in class java.lang.Object
Returns:
A string representation of this object.

equals

public boolean equals(java.lang.Object otherObject)
Compares all member variables of this object with the other object. Returns only true, if all are equal in both objects.
Overrides:
equals in class java.lang.Object
Parameters:
otherObject - The other object to compare to.
Returns:
True, if other is an instance of this class and all member variables of both objects are equal. False, otherwise.

hashCode

public int hashCode()
The overriding of this method should ensure that the objects of this class work correctly in a hashtable.
Overrides:
hashCode in class java.lang.Object
Returns:
The hash code of this object.

IAIK PKCS#11 Wrapper
version 1.5

IAIK JavaSecurity Website http://jce.iaik.tugraz.at/

IAIK at Graz University of Technology, Austria, Europe
Copyright 2001-2004, IAIK, Graz University of Technology, Inffeldgasse 16a, 8010 Graz, Austria. All Rights Reserved.
version 1.5