IAIK PKCS#11 Wrapper
version 1.2.16

iaik.pkcs.pkcs11.parameters
Class X942DH2KeyDerivationParameters

java.lang.Object
  extended byiaik.pkcs.pkcs11.parameters.DHKeyDerivationParameters
      extended byiaik.pkcs.pkcs11.parameters.X942DH1KeyDerivationParameters
          extended byiaik.pkcs.pkcs11.parameters.X942DH2KeyDerivationParameters
All Implemented Interfaces:
Cloneable, Parameters

public class X942DH2KeyDerivationParameters
extends X942DH1KeyDerivationParameters

This abstract class encapsulates parameters for the X9.42 DH mechanisms Mechanism.X9_42_DH_HYBRID_DERIVE and Mechanism.X9_42_MQV_DERIVE.

Invariants
(privateData <> null) and (publicData2 <> null)

Nested Class Summary
 
Nested classes inherited from class iaik.pkcs.pkcs11.parameters.DHKeyDerivationParameters
DHKeyDerivationParameters.KeyDerivationFunctionType
 
Field Summary
protected  Object privateData_
          The key for the second EC private key value.
protected  long privateDataLength_
          The length in bytes of the second EC private key.
protected  byte[] publicData2_
          The other party’s second EC public key value.
 
Fields inherited from class iaik.pkcs.pkcs11.parameters.X942DH1KeyDerivationParameters
otherInfo_
 
Fields inherited from class iaik.pkcs.pkcs11.parameters.DHKeyDerivationParameters
keyDerivationFunction_, publicData_
 
Constructor Summary
X942DH2KeyDerivationParameters(long keyDerivationFunction, byte[] sharedData, byte[] publicData, long privateDataLength, Object privateData, byte[] publicData2)
          Create a new X942DH1KeyDerivationParameters object with the given attributes.
 
Method Summary
 Object clone()
          Create a (deep) clone of this object.
 boolean equals(Object otherObject)
          Compares all member variables of this object with the other object.
 Object getPKCS11ParamsObject()
          Get this parameters object as an object of the CK_X9_42_DH2_DERIVE_PARAMS class.
 Object getPrivateData()
          Get the key for the second X9.42 private key value.
 long getPrivateDataLength()
          Get the length in bytes of the second X9.42 private key.
 byte[] getPublicData2()
          Get the other party’s second X9.42 public key value.
 int hashCode()
          The overriding of this method should ensure that the objects of this class work correctly in a hashtable.
 void setPrivateData(Object privateData)
          Set the key for the second X9.42 private key value.
 void setPrivateDataLength(long privateDataLength)
          Set the length in bytes of the second X9.42 private key.
 void setPublicData2(byte[] publicData2)
          Set the other party’s second X9.42 public key value.
 String toString()
          Returns the string representation of this object.
 
Methods inherited from class iaik.pkcs.pkcs11.parameters.X942DH1KeyDerivationParameters
getOtherInfo, setOtherInfo
 
Methods inherited from class iaik.pkcs.pkcs11.parameters.DHKeyDerivationParameters
getKeyDerivationFunction, getPublicData, setKeyDerivationFunction, setPublicData
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

privateDataLength_

protected long privateDataLength_
The length in bytes of the second EC private key.


privateData_

protected Object privateData_
The key for the second EC private key value.


publicData2_

protected byte[] publicData2_
The other party’s second EC public key value.

Constructor Detail

X942DH2KeyDerivationParameters

public X942DH2KeyDerivationParameters(long keyDerivationFunction,
                                      byte[] sharedData,
                                      byte[] publicData,
                                      long privateDataLength,
                                      Object privateData,
                                      byte[] publicData2)
Create a new X942DH1KeyDerivationParameters object with the given attributes.

Parameters:
keyDerivationFunction - The key derivation function used on the shared secret value. One of the values defined in KeyDerivationFunctionType.
sharedData - The data shared between the two parties.
publicData - The other partie's public key value.
privateDataLength - The length in bytes of the second EC private key.
privateData - The key for the second X9.42 private key value.
publicData2 - The other party’s second X9.42 public key value.
Preconditions
((keyDerivationFunction == KeyDerivationFunctionType.NULL) or (keyDerivationFunction == KeyDerivationFunctionType.SHA1_KDF) or (keyDerivationFunction == KeyDerivationFunctionType.SHA1_KDF_ASN1) or (keyDerivationFunction == KeyDerivationFunctionType.SHA1_KDF_CONCATENATE)) and (publicData <> null) and (privateData <> null) and (publicData2 <> null)
Postconditions
Method Detail

clone

public Object clone()
Create a (deep) clone of this object.

Overrides:
clone in class X942DH1KeyDerivationParameters
Returns:
A clone of this object.
Preconditions
Postconditions
(result <> null) and (result instanceof X942DH2KeyDerivationParameters) and (result.equals(this))

getPKCS11ParamsObject

public Object getPKCS11ParamsObject()
Get this parameters object as an object of the CK_X9_42_DH2_DERIVE_PARAMS class.

Specified by:
getPKCS11ParamsObject in interface Parameters
Overrides:
getPKCS11ParamsObject in class X942DH1KeyDerivationParameters
Returns:
This object as a CK_X9_42_DH2_DERIVE_PARAMS object.
Preconditions
Postconditions
(result <> null)

getPrivateData

public Object getPrivateData()
Get the key for the second X9.42 private key value.

Returns:
The key for the second X9.42 private key value.
Preconditions
Postconditions
(result <> null)

getPrivateDataLength

public long getPrivateDataLength()
Get the length in bytes of the second X9.42 private key.

Returns:
The length in bytes of the second X9.42 private key.
Preconditions
Postconditions

getPublicData2

public byte[] getPublicData2()
Get the other party’s second X9.42 public key value.

Returns:
The other party’s second X9.42 public key value.
Preconditions
Postconditions
(result <> null)

setPrivateData

public void setPrivateData(Object privateData)
Set the key for the second X9.42 private key value.

Parameters:
privateData - The key for the second X9.42 private key value.
Preconditions
(privateData <> null)
Postconditions

setPrivateDataLength

public void setPrivateDataLength(long privateDataLength)
Set the length in bytes of the second X9.42 private key.

Parameters:
privateDataLength - The length in bytes of the second X9.42 private key.
Preconditions
Postconditions

setPublicData2

public void setPublicData2(byte[] publicData2)
Set the other party’s second X9.42 public key value.

Parameters:
publicData2 - The other party’s second X9.42 public key value.
Preconditions
(publicData2 <> null)
Postconditions

toString

public 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 X942DH1KeyDerivationParameters
Returns:
A string representation of this object.

equals

public boolean equals(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 X942DH1KeyDerivationParameters
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.
Preconditions
Postconditions

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 X942DH1KeyDerivationParameters
Returns:
The hash code of this object.
Preconditions
Postconditions

IAIK PKCS#11 Wrapper
version 1.2.16

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

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