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(TcTpmNvDataPublic pubData)
          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(TcTpmNvDataPublic pubData)
                 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.

Be careful when defining indices with set D-bit. Indices which have this bit set might be unerasable on some TPMs. Some TPM_NV_INDEX_* constants have this bit set for compatibility reasons.

Parameters:
pubData - Complete TcTpmNvDataPublic object containing access information for the newly created NV 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. If the data is larger than the TPM input buffer size, it needs to be read in chunks. *

Parameters:
offset - The offset within the NV area to begin reading.
dataLength - The number of bytes to be read. The special value 0xFFFFFFFF activates Smart Read: the TSS will determine the size of data automatically and assemble it internally from its parts.
Returns:
The data read from the NV area.
Throws:
TcTssException