iaik.tc.tss.api.tspi
Interface TcIPcrComposite

All Superinterfaces:
TcIAttributes, TcIWorkingObject

public interface TcIPcrComposite
extends TcIWorkingObject, TcIAttributes

The contents of the platform configuration register (PCR) of a TCG system can be used to establish a confidence level for this system. This class provides a comfortable way to deal with PCR values (e.g. select, read, write). An instance of such a class is used from all TSP functions that need PCR information in their parameter list.


Method Summary
 TcBlobData getPcrCompositeHash()
          This method gets the digestAtRelease from the PCR composite object using a 1.2 TcTpmPcrInfoLong or TcTpmPcrInfoShort structure.
 long getPcrLocality()
          This method gets the LocalityAtRelease from the PCR composite object using a 1.2 TcTpmPcrInfoLong or TcTpmPcrInfoShort structure.
 TcBlobData getPcrValue(long pcrIndex)
          This method returns the digest value of a given PCR index inside a PCR composite object.
 void selectPcrIndex(long pcrIndex)
          This method selects a PCR index inside a PCR composite object using the 1.1 TcTpmPcrInfo structure.
 void selectPcrIndexEx(long pcrIndex, long direction)
          This method selects a PCR index inside a PCR composite object containing a TcTpmPcrInfoLong or TcTpmPcrInfoShort structure.
 void setPcrLocality(long localityValue)
          This method sets the LocalityAtRelease inside the PCR composite object using a 1.2 TcTpmPcrInfoLong or TcTpmPcrInfoShort structure.
 void setPcrValue(long pcrIndex, TcBlobData pcrValue)
          This method sets the digest for a given PCR index inside the PCR composite object.
An example for the usage is the preparation of a PCR composite object before calling TcIRsaKey.createKey(TcIRsaKey, TcIPcrComposite).
 
Methods inherited from interface TcIAttributes
getAttribData, getAttribUint32, setAttribData, setAttribUint32
 

Method Detail

setPcrValue

void setPcrValue(long pcrIndex,
                 TcBlobData pcrValue)
                 throws TcTssException
This method sets the digest for a given PCR index inside the PCR composite object.
An example for the usage is the preparation of a PCR composite object before calling TcIRsaKey.createKey(TcIRsaKey, TcIPcrComposite). Multiple PCRs with different indices can be set by calling this method multiple times in the same PCR composite object.
This method may be used to set PCR values in a PCR composite object regardless of the type of PCR structure (TcTpmPcrInfo, TcTpmPcrInfoShort or TcTpmPcrInfoLong) used by the object.
If a TcTpmPcrInfoLong is used, this method sets the PCR value for DigestAtRelease.

Parameters:
pcrIndex - The index of the PCR to set.
pcrValue - The value of the PCR.
Throws:
TcTssException
TSS Spec. 1.2 Errata A, page number:
296
TSS Spec. 1.10 Golden, Aug. 20, 2003, page number:
182

getPcrValue

TcBlobData getPcrValue(long pcrIndex)
                       throws TcTssException
This method returns the digest value of a given PCR index inside a PCR composite object. Multiple PCR values for different indices can be retrieved by calling this method multiple times on a PCR composite object.
This method may be used to get PCR values in a PCR composite object regardless of the PCR structure type (TcTpmPcrInfo, TcTpmPcrInfoShort or TcTpmPcrInfoLong).
If a TcTpmPcrInfoLong is used, this method returns the digestAtRelease.

Parameters:
pcrIndex - The index of the PCR to read.
Returns:
The contents of PCR specified by pcrIndex.
Throws:
TcTssException
TSS Spec. 1.2 Errata A, page number:
297
TSS Spec. 1.10 Golden, Aug. 20, 2003, page number:
183

selectPcrIndex

void selectPcrIndex(long pcrIndex)
                    throws TcTssException
This method selects a PCR index inside a PCR composite object using the 1.1 TcTpmPcrInfo structure. If the PcrComposite object is using another structure than TcTpmPcrInfo, this function throws a TcTssException with an TcTssErrors.TSS_E_INVALID_OBJ_ACCESS error code.

Parameters:
pcrIndex - The index of the PCR to select.
Throws:
TcTssException
TSS Spec. 1.2 Errata A, page number:
295
TSS Spec. 1.10 Golden, Aug. 20, 2003, page number:
181

setPcrLocality

void setPcrLocality(long localityValue)
                    throws TcTssException
This method sets the LocalityAtRelease inside the PCR composite object using a 1.2 TcTpmPcrInfoLong or TcTpmPcrInfoShort structure. If the PcrComposite object is using a TcTpmPcrInfo (e.g. because the underlying TPM is a 1.1 TPM) a TcTssException with TcTssErrors.TSS_E_INVALID_OBJ_ACCESS error code is thrown.

Parameters:
localityValue - LocalityAtRelease value to set. Valid locality values are: TcTpmConstants.TPM_LOC_ZERO, TcTpmConstants.TPM_LOC_ONE, TcTpmConstants.TPM_LOC_TWO, TcTpmConstants.TPM_LOC_THREE, TcTpmConstants.TPM_LOC_FOUR.
Throws:
TcTssException
TSS Spec. 1.2 Errata A, page number:
305

getPcrLocality

long getPcrLocality()
                    throws TcTssException
This method gets the LocalityAtRelease from the PCR composite object using a 1.2 TcTpmPcrInfoLong or TcTpmPcrInfoShort structure.

Returns:
The LocalityAtRelease value.
Throws:
TcTssException
TSS Spec. 1.2 Errata A, page number:
306

getPcrCompositeHash

TcBlobData getPcrCompositeHash()
                               throws TcTssException
This method gets the digestAtRelease from the PCR composite object using a 1.2 TcTpmPcrInfoLong or TcTpmPcrInfoShort structure. If the PcrComposite object is using a TcTpmPcrInfo (e.g. because the underlying TPM is a 1.1 TPM) a TcTssException with TcTssErrors.TSS_E_INVALID_OBJ_ACCESS error code is thrown.

Returns:
The digestAtRelease value.
Throws:
TcTssException
TSS Spec. 1.2 Errata A, page number:
307

selectPcrIndexEx

void selectPcrIndexEx(long pcrIndex,
                      long direction)
                      throws TcTssException
This method selects a PCR index inside a PCR composite object containing a TcTpmPcrInfoLong or TcTpmPcrInfoShort structure. For TcTpmPcrInfoLong, the index may be selected for creation or release; for TcTpmPcrInfoShort, the index may be selected only for release.
If the PcrComposite object is using a TcTpmPcrInfo (e.g. because the underlying TPM is a 1.1 TPM) a TcTssException with TcTssErrors.TSS_E_INVALID_OBJ_ACCESS error code is thrown.
If the PcrComposite object is using TcTpmPcrInfoShort and the direction indicates Creation, the method will throw a TcTssException with a TcTssErrors.TSS_E_INVALID_OBJ_ACCESS.

Parameters:
pcrIndex - The index of the PCR to select.
direction - Chooses whether the index selected is for a PCR at creation or a PCR at release. Valid direction flags are TcTssConstants.TSS_PCRS_DIRECTION_CREATION and TcTssConstants.TSS_PCRS_DIRECTION_RELEASE.
Throws:
TcTssException
TSS Spec. 1.2 Errata A, page number:
308