iaik.tc.tss.api.tspi
Interface TcIHash

All Superinterfaces:
TcIAttributes, TcIWorkingObject

public interface TcIHash
extends TcIWorkingObject, TcIAttributes

A hash value represents a unique value corresponding to a particular set of bytes. This class provides a cryptographically secure way to use these functions for digital signature operations.


Method Summary
 TcBlobData getHashValue()
          This method returns the hash value of the hash object.
 void setHashValue(TcBlobData hashValue)
          This method sets the hash value of the hash object.
 TcBlobData sign(TcIRsaKey key)
          This method signs the hash data of the object with the provided signing key.
 Object[] tickStampBlob(TcIRsaKey key, TcTssValidation validationData)
          This method is similar to a time stamp: it associates a tick value with a blob, indicating that the blob existed at some point earlier than the time corresponding to the tick value.
 void updateHashValue(TcBlobData data)
          This method updates the hash object with new data.
 void verifySignature(TcBlobData signature, TcIRsaKey key)
          This method verifies the hash value of the hash object with a given signature.
 
Methods inherited from interface TcIAttributes
getAttribData, getAttribUint32, setAttribData, setAttribUint32
 

Method Detail

sign

TcBlobData sign(TcIRsaKey key)
                throws TcTssException
This method signs the hash data of the object with the provided signing key. The data to be signed must be set previously by calling

Parameters:
key - Key object which should be used for the signature.
Returns:
The resulting signature data.
Throws:
TcTssException
TSS Spec. 1.2 Errata A, page number:
354
TSS Spec. 1.10 Golden, Aug. 20, 2003, page number:
162

verifySignature

void verifySignature(TcBlobData signature,
                     TcIRsaKey key)
                     throws TcTssException
This method verifies the hash value of the hash object with a given signature. If no exception is thrown, the signature verification could be done successfully.

Parameters:
signature - The signature to be verified.
key - The key which should be used for the signature verification.
Throws:
TcTssException
TSS Spec. 1.2 Errata A, page number:
355
TSS Spec. 1.10 Golden, Aug. 20, 2003, page number:
164

setHashValue

void setHashValue(TcBlobData hashValue)
                  throws TcTssException
This method sets the hash value of the hash object.

Parameters:
hashValue - The hash value to be set.
Throws:
TcTssException
TSS Spec. 1.2 Errata A, page number:
356
TSS Spec. 1.10 Golden, Aug. 20, 2003, page number:
165

getHashValue

TcBlobData getHashValue()
                        throws TcTssException
This method returns the hash value of the hash object.

Returns:
Blob containing the hash data.
Throws:
TcTssException
TSS Spec. 1.2 Errata A, page number:
357
TSS Spec. 1.10 Golden, Aug. 20, 2003, page number:
166

updateHashValue

void updateHashValue(TcBlobData data)
                     throws TcTssException
This method updates the hash object with new data. This method can only be called if the hash object was initialized as a with the TcTssConstants.TSS_HASH_SHA1 init flag. Update means that that the provided data is appended to an internal buffer that already holds the data from previous update operations. The SHA1 hash of this internal buffer can be obtained using the getHashValue() method. Calling updateHashValue(a) and updateHashValue(b) is equivalent to updateHashValue(a + b).

Parameters:
data - Blob containing the data to be updated.
Throws:
TcTssException
TSS Spec. 1.2 Errata A, page number:
358
TSS Spec. 1.10 Golden, Aug. 20, 2003, page number:
167

tickStampBlob

Object[] tickStampBlob(TcIRsaKey key,
                       TcTssValidation validationData)
                       throws TcTssException
This method is similar to a time stamp: it associates a tick value with a blob, indicating that the blob existed at some point earlier than the time corresponding to the tick value.

Parameters:
key - Key to sign the time stamp
validationData - holds a nonce incorporated in stamping in the externalData_ field
Returns:
Object array of [0] validationData additionally externalData_ it now holds the signature in the field validationData_ [1] currentTicks at the time of stamping
Throws:
TcTssException
TSS Spec. 1.2 Errata A, page number:
374