IAIK PKCS#11 Wrapper
version 1.5

iaik.pkcs.pkcs11.parameters
Class EcMQVKeyDerivationParameters

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

public class EcMQVKeyDerivationParameters
extends DHKeyDerivationParameters

This class encapsulates parameters for the DH mechanisms Mechanism.ECMQV_DERIVE.


Inner classes inherited from class iaik.pkcs.pkcs11.parameters.DHKeyDerivationParameters
DHKeyDerivationParameters.KeyDerivationFunctionType
 
Field Summary
protected  long hPrivateData_
          key handle for second EC private key value.
protected  byte[] pPublicData2_
          pointer to other party’s second EC public key value.
protected  long publicKey_
          Handle to the first party’s ephemeral public key.
protected  byte[] sharedData_
          The data shared between the two parties.
protected  long ulPrivateDataLen_
          the length in bytes of the second EC private key.
 
Fields inherited from class iaik.pkcs.pkcs11.parameters.DHKeyDerivationParameters
keyDerivationFunction_, publicData_
 
Constructor Summary
EcMQVKeyDerivationParameters(long keyDerivationFunction, byte[] sharedData, byte[] publicData, long ulPrivateDataLen, long hPrivateData, byte[] pPublicData2, long publicKey)
          Create a new EcMQVKeyDerivationParameters 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 gethPrivateData()
          Gets the key handle for the second EC private key value.
 java.lang.Object getPKCS11ParamsObject()
          Get this parameters object as an object of the CK_ECDH1_DERIVE_PARAMS class.
 byte[] getpPublicData2()
          Gets the other party’s second EC public key value.
 long getPublicKey()
          Gets the handle to the first party’s ephemeral public key .
 byte[] getSharedData()
          Get the data shared between the two parties.
 long getUlPrivateDataLen()
          Get the length in bytes of the second EC private key.
 int hashCode()
          The overriding of this method should ensure that the objects of this class work correctly in a hashtable.
 void sethPrivateData_(long hPrivateData)
          Sets the key handle for the second EC private key value.
 void setpPublicData2_(byte[] pPublicData2)
          Sets the other party’s second EC public key value.
 void setPublicKey(long publicKey)
          Sets the handle to the first party’s ephemeral public key.
 void setSharedData(byte[] sharedData)
          Set the data shared between the two parties.
 void setUlPrivateDataLen(long ulPrivateDataLen)
          Set the length in bytes of the secon dEC private key.
 java.lang.String toString()
          Returns the string representation of this object.
 
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

sharedData_

protected byte[] sharedData_
The data shared between the two parties.

ulPrivateDataLen_

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

hPrivateData_

protected long hPrivateData_
key handle for second EC private key value.

pPublicData2_

protected byte[] pPublicData2_
pointer to other party’s second EC public key value.

publicKey_

protected long publicKey_
Handle to the first party’s ephemeral public key.
Constructor Detail

EcMQVKeyDerivationParameters

public EcMQVKeyDerivationParameters(long keyDerivationFunction,
                                    byte[] sharedData,
                                    byte[] publicData,
                                    long ulPrivateDataLen,
                                    long hPrivateData,
                                    byte[] pPublicData2,
                                    long publicKey)
Create a new EcMQVKeyDerivationParameters 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.
ulPrivateDataLen - the length in bytes of the second EC private key
hPrivateData - Key handle for second EC private key value
pPublicData2 - pointer to other party's second EC public key value
publicKey - Handle to the first party's ephemeral public key
Method Detail

clone

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

getPKCS11ParamsObject

public java.lang.Object getPKCS11ParamsObject()
Get this parameters object as an object of the CK_ECDH1_DERIVE_PARAMS class.
Returns:
This object as a CK_ECDH1_DERIVE_PARAMS object.

getSharedData

public byte[] getSharedData()
Get the data shared between the two parties.
Returns:
The data shared between the two parties.

setSharedData

public void setSharedData(byte[] sharedData)
Set the data shared between the two parties.
Parameters:
sharedData - The data shared between the two parties.

getUlPrivateDataLen

public long getUlPrivateDataLen()
Get the length in bytes of the second EC private key.
Returns:
the length in bytes of the second EC private key

setUlPrivateDataLen

public void setUlPrivateDataLen(long ulPrivateDataLen)
Set the length in bytes of the secon dEC private key.
Parameters:
ulPrivateDataLen - the length in bytes of the secon dEC private key

gethPrivateData

public long gethPrivateData()
Gets the key handle for the second EC private key value.
Returns:
the key handle for the second EC private key value

sethPrivateData_

public void sethPrivateData_(long hPrivateData)
Sets the key handle for the second EC private key value.
Parameters:
hPrivateData - the key handle for the second EC private key value

getpPublicData2

public byte[] getpPublicData2()
Gets the other party’s second EC public key value.
Returns:
the other party’s second EC public key value

setpPublicData2_

public void setpPublicData2_(byte[] pPublicData2)
Sets the other party’s second EC public key value.
Parameters:
pPublicData2 - the other party’s second EC public key value

getPublicKey

public long getPublicKey()
Gets the handle to the first party’s ephemeral public key .
Returns:
the Handle to the first party’s ephemeral public key

setPublicKey

public void setPublicKey(long publicKey)
Sets the handle to the first party’s ephemeral public key.
Parameters:
publicKey_ - the handle to the first party’s ephemeral public key

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 DHKeyDerivationParameters
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 DHKeyDerivationParameters
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 DHKeyDerivationParameters
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