iaik.tc.tss.api.tspi
Interface TcINvRam

All Superinterfaces:
TcIAttributes, TcIAuthObject

public interface TcINvRam
extends TcIAttributes, TcIAuthObject

This class is used to store the attributes of a region of non volatile RAM inside the TPM, for use when defining, releasing, reading or writing such a region. This class establishes the size of the data space, the index, the various authorizations required to either read or write that area. Those authorizations can be based on PCR values or authorization data, but not locality. The various attributes of the class are used to establish what is requested before defineSpace is called (similar to the way a key is created).


Method Summary
 void defineSpace(TcIPcrComposite readPcrComposite, TcIPcrComposite writePcrComposite)
          This method establishes the space necessary for the NV store.
 TcBlobData readValue(long offset, long dataLength)
          This method reads the data from the defined area.
 void releaseSpace()
          This method releases the space associated with the NV store instance.
 void writeValue(long offset, TcBlobData dataToWrite)
          This method writes a given value to a previously defined area.
 
Methods inherited from interface TcIAttributes
getAttribData, getAttribUint32, setAttribData, setAttribUint32
 
Methods inherited from interface TcIAuthObject
changeAuth, changeAuthAsym, getPolicyObject, getUsagePolicyObject
 

Method Detail

defineSpace

void defineSpace(TcIPcrComposite readPcrComposite,
                 TcIPcrComposite writePcrComposite)
                 throws TcTssException
This method establishes the space necessary for the NV store. Note that this command requires owner authorization which can be set via the usage policy of the TPM object.

Parameters:
readPcrComposite - If this value is null, no PCR values are associated with reading from the NV space. If not null, the newly created NV storage area will require the PCR values described in this parameter for successfully reading this storage area.
writePcrComposite - If this value is null, no PCR values are associated with writing to the NV space. If not null, the newly created NV storage area will require the PCR values describe in this parameter for successfully writing to this storage area.
Throws:
TcTssException
TSS Spec. 1.2 Errata A, page number:
381

releaseSpace

void releaseSpace()
                  throws TcTssException
This method releases the space associated with the NV store instance. Note that this command requires owner authorization which can be set via the usage policy of the TPM object.

Throws:
TcTssException
TSS Spec. 1.2 Errata A, page number:
383

writeValue

void writeValue(long offset,
                TcBlobData dataToWrite)
                throws TcTssException
This method writes a given value to a previously defined area. If a policy object is assigned to this object, the authData within the policy object will be used to authorize this operation. If there is no policy object associated with this object, an unauthenticated write will be performed.

Parameters:
offset - The offset within the NV area to begin writing.
dataToWrite - The data to be written.
Throws:
TcTssException
TSS Spec. 1.2 Errata A, page number:
384

readValue

TcBlobData readValue(long offset,
                     long dataLength)
                     throws TcTssException
This method reads the data from the defined area. If a policy object is assigned to this object, the authData within the policy object will be used to authorize this operation. If there is no policy object associated with this object, an unauthenticated write will be performed.

Parameters:
offset - The offset within the NV area to begin reading.
dataLength - The number of bytes to be read.
Returns:
The data read from the NV area.
Throws:
TcTssException