|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TcITpm
One purpose of the TPM class is to represent the owner for a TCG subsystem (TPM). The owner of a TPM is comparable with an administrator in the PC environment. For that reason there exists only one instance of the TPM class per context. This object is automatically associated with one policy object, which must be used to handle the owner authentication data. On the other hand it provides some basic control and reporting functionality.
Method Summary | |
---|---|
TcBlobData |
activateIdentity(TcIRsaKey identityKey,
TcBlobData asymCaContentsBlob,
TcBlobData symCaAttestationBlob)
This method proofs the credential to be the credential of the identity key and returns the decrypted credential created by the Privacy CA for that identity. |
TcTpmMigrationkeyAuth |
authorizeMigrationTicket(TcIRsaKey migrationKey,
long migrationScheme)
This method provides the migration ticket required for the migration process. |
TcTssValidation |
certifySelfTest(TcIRsaKey key,
TcTssValidation validation)
This method performs a self-test of each internal TPM function and returns an authenticated value (signature) if the test has passed. |
TcTssValidation |
checkMaintenancePubKey(TcIRsaKey key,
TcTssValidation validationData)
This method proofs the maintenance public key. |
void |
clearOwner(boolean forcedClear)
This method clears the TPM ownership. |
void |
CMKApproveMA(TcIMigData maAuthData)
This method creates an authorization ticket, to allow the TPM owner to specify which Migration Authorities they approve and allow users to create certified-migration-keys without further involvement with the TPM owner. |
void |
CMKCreateTicket(TcIRsaKey verifyKey,
TcIMigData sigData)
This method uses a public key to verify the signature over a digest. |
void |
CMKSetRestrictions(long cmkDelegate)
This method is used by the owner to globally dictate the usage of a certified migration key with delegated authorization. |
TcBlobData |
collateIdentityRequest(TcIRsaKey srk,
TcIRsaKey caPubKey,
TcBlobData identityLabel,
TcIRsaKey identityKey,
long algId)
This method creates an identity key, binds it to the label and returns a certificate request package. |
TcTssValidation |
createEndorsementKey(TcIRsaKey key,
TcTssValidation validationData)
This method creates the endorsement key. |
Object[] |
createRevocableEndorsementKey(TcIRsaKey key,
TcTssValidation validationData,
TcTpmNonce ekResetData)
This method creates the revocable endorsement key. |
TcBlobData |
dirRead(long dirIndex)
This method reads a Data Integrity Register. |
void |
dirWrite(long dirIndex,
TcBlobData dirData)
This method writes a Data Integrity Register. |
TcBlobData |
getCapability(long capArea,
TcBlobData subCap)
This method provides the capabilities of the TPM. |
boolean |
getCapabilityBoolean(long capArea,
TcBlobData subCap)
This method is an alternative to getCapability(long, TcBlobData) . |
void |
getCapabilitySigned()
The TPM function TPM_GetCapabilitySigned that actually performs this functions was found to contain a vulnerability that makes its security questionable therefore its use unadvised. |
long |
getCapabilityUINT32(long capArea,
TcBlobData subCap)
This method is an alternative to getCapability(long, TcBlobData) . |
TcTssVersion |
getCapabilityVersion(long capArea,
TcBlobData subCap)
This method is an alternative to getCapability(long, TcBlobData) . |
TcTssPcrEvent |
getEvent(long pcrIndex,
long eventNumber)
This method provides a PCR event for a given PCR index and event number. |
int |
getEventCount(long pcrIndex)
This method is similar to the getEvents method. |
TcTssPcrEvent[] |
getEventLog()
This method provides the whole event log. |
TcTssPcrEvent[] |
getEvents(long pcrIndex,
long startNumber,
long eventNumber)
This method provides a specific number of PCR events for a given index. |
Object[] |
getPubEndorsementKey(boolean ownerAuthorized,
TcTssValidation validataionData)
This method returns the public endorsement key. |
TcIRsaKey |
getPubEndorsementKeyOwner()
This method returns the public endorsement key. |
TcBlobData |
getRandom(long length)
This method returns random data obtained from the TPM via the TSS. |
boolean |
getStatus(long statusFlag)
This method returns the TPM status. |
TcBlobData |
getTestResult()
This method provides manufacturer specific information regarding the results of the self test. |
void |
killMaintenanceFeature()
This method disables the functionality of creating a maintenance archive. |
TcTssValidation |
loadMaintenancePubKey(TcIRsaKey key,
TcTssValidation validationData)
This method loads the public maintenance key into the TPM. |
TcIRsaKey |
OwnerGetSRKPubKey()
This method returns the public part of the SRK. |
TcBlobData |
pcrExtend(long pcrIndex,
TcBlobData data,
TcTssPcrEvent pcrEvent)
This method extends a PCR register and writes the PCR event log. |
TcBlobData |
pcrRead(long pcrIndex)
This methods reads a PCR register. |
void |
pcrReset(TcIPcrComposite pcrComposite)
This methods resets a PCR register. |
TcTssValidation |
quote(TcIRsaKey identKey,
TcIPcrComposite pcrComposite,
TcTssValidation validation)
This method quotes a TCG system. |
Object[] |
quote2(TcIRsaKey identKey,
boolean addVersion,
TcIPcrComposite pcrComposite,
TcTssValidation validation)
This method quotes a TCG system using TPM_Quote2 which provides the requestor a more complete view of the current platform configuration than TPM_Quote. |
TcTpmCounterValue |
readCurrentCounter()
This method reads the current value of the current active counter register. |
TcTpmCurrentTicks |
readCurrentTicks()
This method reads the current tick out of the TPM. |
void |
revokeEndorsementKey(TcTpmNonce ekResetData)
This method clears the TPM revocable endorsement key pair. |
void |
selfTestFull()
This method performs a self-test of each internal TPM function. |
void |
setOperatorAuth(TcIPolicy operatorPolicy)
This function sets the operator authorization value in the TPM. |
void |
setStatus(long statusFlag,
boolean tpmState)
This method modifies the TPM status. |
void |
stirRandom(TcBlobData entropyData)
This method adds entropy to the TPM Random Number Generator. |
void |
takeOwnership(TcIRsaKey srk,
TcIRsaKey pubEk)
This method takes ownership of the TPM. |
Methods inherited from interface TcIAttributes |
---|
getAttribData, getAttribUint32, setAttribData, setAttribUint32 |
Methods inherited from interface TcIAuthObject |
---|
changeAuth, changeAuthAsym, getPolicyObject, getUsagePolicyObject |
Method Detail |
---|
void takeOwnership(TcIRsaKey srk, TcIRsaKey pubEk) throws TcTssException
srk
- The storage root key object.pubEk
- The public endorsement key object. The public endorsement key is required for
encryption of the SRK and EK secret sent to the TPM. The pubEk parameter can be set to
null. In this case, the takeOwnership method will query the TPM for the public
endorsement key.s
TcTssException
Object[] getPubEndorsementKey(boolean ownerAuthorized, TcTssValidation validataionData) throws TcTssException
TcIAttributes.getAttribData(long, long)
.
ownerAuthorized
- Flag determining if owner authorization is required. Note that owner
authorization is not required if the ownership of the TPM has not yet been taken.
After TPM ownership has been taken, owner authorization is required to obtain the
public EK.validataionData
- External data that is used by the TPM to compute the checksum. If this
parameter is omitted (i.e. it is set to null), the validation is done by the TSP:
TcIRsaKey
TcTssValidation
TcTssException
TcIRsaKey getPubEndorsementKeyOwner() throws TcTssException
TcIAttributes.getAttribData(long, long)
. This method always
tries to read the public EK using owner authorization. If effectively is a shortcut for
getPubEndorsementKey(boolean, TcTssValidation)
with (true, null) as parameters.
TcIRsaKey
TcTssException
boolean getStatus(long statusFlag) throws TcTssException
TcTssConstants.TSS_TPMSTATUS_DISABLEOWNERCLEAR
TcTssConstants.TSS_TPMSTATUS_DISABLEFORCECLEAR
TcTssConstants.TSS_TPMSTATUS_DISABLED
TcTssConstants.TSS_TPMSTATUS_PHYSICALSETDEACTIVATED
TcTssConstants.TSS_TPMSTATUS_SETTEMPDEACTIVATED
TcTssConstants.TSS_TPMSTATUS_SETOWNERINSTALL
TcTssConstants.TSS_TPMSTATUS_DISABLEPUBEKREAD
TcTssConstants.TSS_TPMSTATUS_ALLOWMAINTENANCE
TcTssConstants.TSS_TPMSTATUS_PHYSPRES_LIFETIMELOCK
TcTssConstants.TSS_TPMSTATUS_PHYSPRES_HWENABLE
TcTssConstants.TSS_TPMSTATUS_PHYSPRES_CMDENABLE
TcTssConstants.TSS_TPMSTATUS_CEKP_USED
TcTssConstants.TSS_TPMSTATUS_PHYSPRESENCE
TcTssConstants.TSS_TPMSTATUS_PHYSPRES_LOCK
statusFlag
- status flag to be read
TcTssException
void setStatus(long statusFlag, boolean tpmState) throws TcTssException
statusFlag
- determines the flag to be set. TcTssConstants.TSS_TPMSTATUS_DISABLEOWNERCLEAR
, tpmState is ignoredTcTssConstants.TSS_TPMSTATUS_DISABLEFORCECLEAR
, tpmState is ignoredTcTssConstants.TSS_TPMSTATUS_OWNERSETDISABLE
TcTssConstants.TSS_TPMSTATUS_PHYSICALDISABLE
TcTssConstants.TSS_TPMSTATUS_PHYSICALSETDEACTIVATED
TcTssConstants.TSS_TPMSTATUS_SETTEMPDEACTIVATED
, tpmState is ignoredTcTssConstants.TSS_TPMSTATUS_SETOWNERINSTALL
TcTssConstants.TSS_TPMSTATUS_DISABLEPUBEKREAD
, tpmState is ignoredtpmState
- the new value of the flag
TcTssException
TcBlobData getRandom(long length) throws TcTssException
length
- The length of the data to be requested. The maximum length of the random data is
4096.
TcTssException
TcBlobData pcrRead(long pcrIndex) throws TcTssException
pcrIndex
- Index of the PCR to read.
TcTssException
void pcrReset(TcIPcrComposite pcrComposite) throws TcTssException
pcrComposite
- Indices of the PCR to read.
TcTssException
TcBlobData pcrExtend(long pcrIndex, TcBlobData data, TcTssPcrEvent pcrEvent) throws TcTssException
pcrIndex
- Index of the PCR to extend.data
- Data blob for the PCR extend operation.pcrEvent
- Contains the info for an event entry. If this object is null no event entry is
created and the method only executes an TPM extend operation
TcTssException
TcTssPcrEvent getEvent(long pcrIndex, long eventNumber) throws TcTssException
pcrIndex
- Index of the PCR to request.eventNumber
- Index of the event to request.
TcTssException
TcTssPcrEvent[] getEvents(long pcrIndex, long startNumber, long eventNumber) throws TcTssException
pcrIndex
- Index of the PCR to request.startNumber
- Index of the first event to request.eventNumber
- Number of elements to request.
TcTssException
int getEventCount(long pcrIndex) throws TcTssException
pcrIndex
- Index of the PCR to request.
TcTssException
TcTssPcrEvent[] getEventLog() throws TcTssException
TcTssException
TcTssValidation quote(TcIRsaKey identKey, TcIPcrComposite pcrComposite, TcTssValidation validation) throws TcTssException
TcTssConstants.TSS_PCRS_STRUCT_INFO
is used in the
PcrComposite a TcTssException
with error code
TcTssErrors.TSS_E_INVALID_OBJ_ACCESS
is thrown. The returned signature is computed over
the TcTpmQuoteInfo
structure.
identKey
- Signature key.pcrComposite
- PCR composite object. Will be used as input only.validation
- Provides externalData information required to compute the signature. If this
parameter is omitted (set to null), the TSP will generate external data and do the
validation.TcTssException
Object[] quote2(TcIRsaKey identKey, boolean addVersion, TcIPcrComposite pcrComposite, TcTssValidation validation) throws TcTssException
TcTssConstants.TSS_PCRS_STRUCT_INFO_SHORT
is used in the
PcrComposite a TcTssException
with error code
TcTssErrors.TSS_E_INVALID_OBJ_ACCESS
is thrown. The returned signature is computed over
the TcTpmQuoteInfo
structure.
identKey
- Signature key.addVersion
- If true, the TPM version is added to the output otherwise it is omitted.pcrComposite
- PCR composite object. Will be used as input only.validation
- Provides externalData information required to compute the signature. If this
parameter is omitted (set to null), the TSP will generate external data and do the
validation.TcTssValidation
TcTpmConstants.TPM_CAP_VERSION_VAL
. If
addVersion is false, this element is null (TcTpmCapVersionInfo
.
TcTssException
void stirRandom(TcBlobData entropyData) throws TcTssException
entropyData
- The entropy data.
TcTssException
TcTssValidation createEndorsementKey(TcIRsaKey key, TcTssValidation validationData) throws TcTssException
TcIAttributes.setAttribUint32(long, long, long)
and
TcIAttributes.setAttribData(long, long, TcBlobData)
key
- Key object specifying the attributes of the endorsement key to create.validationData
- Provides externalData information required to compute the checksum. If
the TSP should compute compute the checksum set this parameter to null.
TcTssException
Object[] createRevocableEndorsementKey(TcIRsaKey key, TcTssValidation validationData, TcTpmNonce ekResetData) throws TcTssException
TcIAttributes.setAttribUint32(long, long, long)
and
TcIAttributes.setAttribData(long, long, TcBlobData)
key
- Key object specifying the attributes of the endorsement key to create.validationData
- Provides externalData information required to compute the checksum. If
the TSP should compute compute the checksum set this parameter to null.ekResetData
- The authorization value to be used with RevokeEndorsementKeyPair. Generated
by the TPM if null.
TcTssValidation
TcTpmNonce
TcTssException
void revokeEndorsementKey(TcTpmNonce ekResetData) throws TcTssException
ekResetData
- The authorization value which was set with
createRevocableEndorsementKey
TcTssException
void clearOwner(boolean forcedClear) throws TcTssException
forcedClear
- If FALSE, a clear ownership with proof of the TPM owner secret is done. If
TRUE, a forced clear ownership with proof of physical access is done.
TcTssException
TcBlobData dirRead(long dirIndex) throws TcTssException
dirIndex
- Index of the DIR to read.
TcTssException
void dirWrite(long dirIndex, TcBlobData dirData) throws TcTssException
dirIndex
- Index of the DIR to write.dirData
- data to be written to the DIR.
TcTssException
TcBlobData getCapability(long capArea, TcBlobData subCap) throws TcTssException
capArea
- Flag indicating the attribute to query. TcTssConstants.TSS_TPMCAP_ORD
TcTssConstants.TSS_TPMCAP_FLAG
TcTssConstants.TSS_TPMCAP_ALG
TcTssConstants.TSS_TPMCAP_PROPERTY
TcTssConstants.TSS_TPMCAP_VERSION
TcTssConstants.TSS_TPMCAP_VERSION_VAL
TcTssConstants.TSS_TPMCAP_NV_LIST
TcTssConstants.TSS_TPMCAP_NV_INDEX
TcTssConstants.TSS_TPMCAP_MFR
TcTssConstants.TSS_TPMCAP_SYM_MODE
TcTssConstants.TSS_TPMCAP_HANDLE
TcTssConstants.TSS_TPMCAP_TRANS_ES
TcTssConstants.TSS_TPMCAP_AUTH_ENCRYPT
subCap
- Data indicating the attribute to query. TcTssException
boolean getCapabilityBoolean(long capArea, TcBlobData subCap) throws TcTssException
getCapability(long, TcBlobData)
. The only
difference is that the returned data is interpreted as TSS_BOOL (boolean).
TcTssException
long getCapabilityUINT32(long capArea, TcBlobData subCap) throws TcTssException
getCapability(long, TcBlobData)
. The only
difference is that the returned data is interpreted as UINT32 (long).
TcTssException
TcTssVersion getCapabilityVersion(long capArea, TcBlobData subCap) throws TcTssException
getCapability(long, TcBlobData)
. The only
difference is that the returned data is interpreted as TSS_VERSION.
Note that on 1.2 TPMs, TSS_TPMCAP_VERSION is fixed to always return 1.1.0.0. To obtain the real
TPM version on a 1.2 TPM, TSS_TPMCAP_VERSION_VAL has to be used. TSS_TPMCAP_VERSION_VAL not
only retrieves the version but a TcTpmCapVersionInfo
structure. This method returns the
version field of this structure. To obtain the full TcTpmCapVersionInfo
structure, use
getCapability(long, TcBlobData)
.
capArea
- Flag indicating the attribute to query subCap
- Ignored (set to null);
TcTssException
void getCapabilitySigned() throws TcTssException
TcTssException
void selfTestFull() throws TcTssException
TcTssException
TcBlobData getTestResult() throws TcTssException
TcTssException
TcTssValidation certifySelfTest(TcIRsaKey key, TcTssValidation validation) throws TcTssException
TcTssConstants.TSS_SS_RSASSAPKCS1V15_SHA1
, the return value can either be a
BAD_PARAMETER error or success with a vendor specific signature.
key
- Signature key.validation
- ExternalData information required to compute the signature. If not validation
data is provided (i.e. this parameter is set to null), validation is done by the TSP.
TcTssException
void killMaintenanceFeature() throws TcTssException
TcTssException
TcTssValidation loadMaintenancePubKey(TcIRsaKey key, TcTssValidation validationData) throws TcTssException
key
- maintenance key objectvalidationData
- externalData information required to compute the signature. If
validationData != NULL: The caller has to proof the digest by its own. If
validationData == NULL: The TSS Service Provider proofs the digest got from the TPM
internally.
TcTssException
TcTssValidation checkMaintenancePubKey(TcIRsaKey key, TcTssValidation validationData) throws TcTssException
key
- maintenance key objectvalidationData
- externalData information required to compute the signature.
TcTssException
TcBlobData collateIdentityRequest(TcIRsaKey srk, TcIRsaKey caPubKey, TcBlobData identityLabel, TcIRsaKey identityKey, long algId) throws TcTssException
srk
- object (Storage Root Key).caPubKey
- Key object holding the public key of the CA which signs the certificate of the
created identity key.algId
- Symmetric algorithm to use as required by the Privacy CA.identityLabel
- The identity label which should be a UNICODE string.identityKey
- Identity key object. The template for the identity key to be created. The
key parameters must be set up correctly when creating the key object before this
method is called..
TcTssException
TcBlobData activateIdentity(TcIRsaKey identityKey, TcBlobData asymCaContentsBlob, TcBlobData symCaAttestationBlob) throws TcTssException
identityKey
- The identity key object.asymCaContentsBlob
- The blob containing the encrypted ASYM_CA_CONTENTS data structure
received from the Privacy CA.symCaAttestationBlob
- The blob containing the encrypted SYM_CA_ATTESTATION data structure
received from the Privacy CA.
TcTssException
TcTpmMigrationkeyAuth authorizeMigrationTicket(TcIRsaKey migrationKey, long migrationScheme) throws TcTssException
migrationKey
- key object representing the migration key.migrationScheme
- Flag indicating the migration scheme to be used. TcTssException
TcTpmCurrentTicks readCurrentTicks() throws TcTssException
TcTssException
TcTpmCounterValue readCurrentCounter() throws TcTssException
TcTssException
TcIRsaKey OwnerGetSRKPubKey() throws TcTssException
TcTssException
void CMKSetRestrictions(long cmkDelegate) throws TcTssException
cmkDelegate
- Bit mask to determine the restrictions on certified-migration-keys
Valid Flags are:
TcTssException
void CMKApproveMA(TcIMigData maAuthData) throws TcTssException
maAuthData
- Migration data properties object to transfer the input and output data blob
during the migration process. For this command the object calculates the digest of the
selected MSA (Migration Selection Authority) which are imported into this object.
TcTssException
void CMKCreateTicket(TcIRsaKey verifyKey, TcIMigData sigData) throws TcTssException
verifyKey
- The Key object containing the public key used to check the signature value.sigData
- Migration data properties object to transfer the input and output data blob
during the migration process. For this command the object includes the data proper
to be signed and the signature value to be verified. The caller can access the
ticket/signature data via GetAttribData().
TcTssException
void setOperatorAuth(TcIPolicy operatorPolicy) throws TcTssException
operatorPolicy
- the policy object holding the new operator authorization value.
TcTssException
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |