public class Tpm extends TpmBase
TPM-defined functions have names like TPM2_PCR_Read(): the TPM2_ prefix is dropped in the Java definition of these functions: e.g. PCR_Read().
The Tpm and TpmBase classes also provide a few helper-functions: for example, the command _allowErrors() tells Tpm to not throw an exception if the Next TPM command returns an error.
Tpm objects must be "connected" to a physical TPM or simulator using the _setDevice() method. Some devices (like the TPM simulator) need to be configured before they can be used. See the sample code that is part of the tss.Java distribution for more information.
_EndorsementHandle, _LockoutHandle, _OwnerHandle, _PlatformHandle| Constructor and Description |
|---|
Tpm() |
| Modifier and Type | Method and Description |
|---|---|
AC_GetCapabilityResponse |
AC_GetCapability(TPM_HANDLE ac,
TPM_AT capability,
int count)
The purpose of this command is to obtain information about an Attached Component referenced by an AC handle.
|
TPMS_AC_OUTPUT |
AC_Send(TPM_HANDLE sendObject,
TPM_HANDLE authHandle,
TPM_HANDLE ac,
byte[] acDataIn)
The purpose of this command is to send (copy) a loaded object from the TPM to an Attached Component.
|
byte[] |
ActivateCredential(TPM_HANDLE activateHandle,
TPM_HANDLE keyHandle,
TPMS_ID_OBJECT credentialBlob,
byte[] secret)
This command enables the association of a credential with an object in a way that ensures that the TPM has validated the parameters of the credentialed object.
|
CertifyResponse |
Certify(TPM_HANDLE objectHandle,
TPM_HANDLE signHandle,
byte[] qualifyingData,
TPMU_SIG_SCHEME inScheme)
The purpose of this command is to prove that an object with a specific Name is loaded in the TPM.
|
CertifyCreationResponse |
CertifyCreation(TPM_HANDLE signHandle,
TPM_HANDLE objectHandle,
byte[] qualifyingData,
byte[] creationHash,
TPMU_SIG_SCHEME inScheme,
TPMT_TK_CREATION creationTicket)
This command is used to prove the association between an object and its creation data.
|
void |
ChangeEPS(TPM_HANDLE authHandle)
This replaces the current endorsement primary seed (EPS) with a value from the RNG and sets the Endorsement hierarchy controls to their default initialization values: ehEnable is SET, endorsementAuth and endorsementPolicy are both set to the Empty Buffer.
|
void |
ChangePPS(TPM_HANDLE authHandle)
This replaces the current platform primary seed (PPS) with a value from the RNG and sets platformPolicy to the default initialization value (the Empty Buffer).
|
void |
Clear(TPM_HANDLE authHandle)
This command removes all TPM context associated with a specific Owner.
|
void |
ClearControl(TPM_HANDLE auth,
byte disable)
TPM2_ClearControl() disables and enables the execution of TPM2_Clear().
|
void |
ClockRateAdjust(TPM_HANDLE auth,
TPM_CLOCK_ADJUST rateAdjust)
This command adjusts the rate of advance of Clock and Time to provide a better approximation to real time.
|
void |
ClockSet(TPM_HANDLE auth,
long newTime)
This command is used to advance the value of the TPMs Clock.
|
CommitResponse |
Commit(TPM_HANDLE signHandle,
TPMS_ECC_POINT P1,
byte[] s2,
byte[] y2)
TPM2_Commit() performs the first part of an ECC anonymous signing operation.
|
TPM_HANDLE |
ContextLoad(TPMS_CONTEXT context)
This command is used to reload a context that has been saved by TPM2_ContextSave().
|
TPMS_CONTEXT |
ContextSave(TPM_HANDLE saveHandle)
This command saves a session context, object context, or sequence object context outside the TPM.
|
CreateResponse |
Create(TPM_HANDLE parentHandle,
TPMS_SENSITIVE_CREATE inSensitive,
TPMT_PUBLIC inPublic,
byte[] outsideInfo,
TPMS_PCR_SELECTION[] creationPCR)
This command is used to create an object that can be loaded into a TPM using TPM2_Load().
|
CreateLoadedResponse |
CreateLoaded(TPM_HANDLE parentHandle,
TPMS_SENSITIVE_CREATE inSensitive,
byte[] inPublic)
This command creates an object and loads it in the TPM.
|
CreatePrimaryResponse |
CreatePrimary(TPM_HANDLE primaryHandle,
TPMS_SENSITIVE_CREATE inSensitive,
TPMT_PUBLIC inPublic,
byte[] outsideInfo,
TPMS_PCR_SELECTION[] creationPCR)
This command is used to create a Primary Object under one of the Primary Seeds or a Temporary Object under TPM_RH_NULL.
|
void |
DictionaryAttackLockReset(TPM_HANDLE lockHandle)
This command cancels the effect of a TPM lockout due to a number of successive authorization failures.
|
void |
DictionaryAttackParameters(TPM_HANDLE lockHandle,
int newMaxTries,
int newRecoveryTime,
int lockoutRecovery)
This command changes the lockout parameters.
|
DuplicateResponse |
Duplicate(TPM_HANDLE objectHandle,
TPM_HANDLE newParentHandle,
byte[] encryptionKeyIn,
TPMT_SYM_DEF_OBJECT symmetricAlg)
This command duplicates a loaded object so that it may be used in a different hierarchy.
|
EC_EphemeralResponse |
EC_Ephemeral(TPM_ECC_CURVE curveID)
TPM2_EC_Ephemeral() creates an ephemeral key for use in a two-phase key exchange protocol.
|
TPMS_ALGORITHM_DETAIL_ECC |
ECC_Parameters(TPM_ECC_CURVE curveID)
This command returns the parameters of an ECC curve identified by its TCG-assigned curveID.
|
ECDH_KeyGenResponse |
ECDH_KeyGen(TPM_HANDLE keyHandle)
This command uses the TPM to generate an ephemeral key pair (de, Qe where Qe [de]G).
|
TPMS_ECC_POINT |
ECDH_ZGen(TPM_HANDLE keyHandle,
TPMS_ECC_POINT inPoint)
This command uses the TPM to recover the Z value from a public point (QB) and a private key (ds).
|
EncryptDecryptResponse |
EncryptDecrypt(TPM_HANDLE keyHandle,
byte decrypt,
TPM_ALG_ID mode,
byte[] ivIn,
byte[] inData)
NOTE 1 This command is deprecated, and TPM2_EncryptDecrypt2() is preferred.
|
EncryptDecrypt2Response |
EncryptDecrypt2(TPM_HANDLE keyHandle,
byte[] inData,
byte decrypt,
TPM_ALG_ID mode,
byte[] ivIn)
This command is identical to TPM2_EncryptDecrypt(), except that the inData parameter is the first parameter.
|
TPMT_HA[] |
EventSequenceComplete(TPM_HANDLE pcrHandle,
TPM_HANDLE sequenceHandle,
byte[] buffer)
This command adds the last part of data, if any, to an Event Sequence and returns the result in a digest list.
|
void |
EvictControl(TPM_HANDLE auth,
TPM_HANDLE objectHandle,
TPM_HANDLE persistentHandle)
This command allows certain Transient Objects to be made persistent or a persistent object to be evicted.
|
FieldUpgradeDataResponse |
FieldUpgradeData(byte[] fuData)
This command will take the actual field upgrade image to be installed on the TPM.
|
void |
FieldUpgradeStart(TPM_HANDLE authorization,
TPM_HANDLE keyHandle,
byte[] fuDigest,
TPMU_SIGNATURE manifestSignature)
This command uses platformPolicy and a TPM Vendor Authorization Key to authorize a Field Upgrade Manifest.
|
byte[] |
FirmwareRead(int sequenceNumber)
This command is used to read a copy of the current firmware installed in the TPM.
|
void |
FlushContext(TPM_HANDLE flushHandle)
This command causes all context associated with a loaded object, sequence object, or session to be removed from TPM memory.
|
GetCapabilityResponse |
GetCapability(TPM_CAP capability,
int property,
int propertyCount)
This command returns various information regarding the TPM and its current state.
|
GetCommandAuditDigestResponse |
GetCommandAuditDigest(TPM_HANDLE privacyHandle,
TPM_HANDLE signHandle,
byte[] qualifyingData,
TPMU_SIG_SCHEME inScheme)
This command returns the current value of the command audit digest, a digest of the commands being audited, and the audit hash algorithm.
|
byte[] |
GetRandom(int bytesRequested)
This command returns the next bytesRequested octets from the random number generator (RNG).
|
GetSessionAuditDigestResponse |
GetSessionAuditDigest(TPM_HANDLE privacyAdminHandle,
TPM_HANDLE signHandle,
TPM_HANDLE sessionHandle,
byte[] qualifyingData,
TPMU_SIG_SCHEME inScheme)
This command returns a digital signature of the audit session digest.
|
GetTestResultResponse |
GetTestResult()
This command returns manufacturer-specific information regarding the results of a self-test and an indication of the test status.
|
GetTimeResponse |
GetTime(TPM_HANDLE privacyAdminHandle,
TPM_HANDLE signHandle,
byte[] qualifyingData,
TPMU_SIG_SCHEME inScheme)
This command returns the current values of Time and Clock.
|
HashResponse |
Hash(byte[] data,
TPM_ALG_ID hashAlg,
TPM_HANDLE hierarchy)
This command performs a hash operation on a data buffer and returns the results.
|
TPM_HANDLE |
HashSequenceStart(byte[] auth,
TPM_ALG_ID hashAlg)
This command starts a hash or an Event Sequence.
|
void |
HierarchyChangeAuth(TPM_HANDLE authHandle,
byte[] newAuth)
This command allows the authorization secret for a hierarchy or lockout to be changed using the current authorization value as the command authorization.
|
void |
HierarchyControl(TPM_HANDLE authHandle,
TPM_HANDLE enable,
byte state)
This command enables and disables use of a hierarchy and its associated NV storage.
|
TPM_HANDLE |
HMAC_Start(TPM_HANDLE handle,
byte[] auth,
TPM_ALG_ID hashAlg)
This command starts an HMAC sequence.
|
byte[] |
HMAC(TPM_HANDLE handle,
byte[] buffer,
TPM_ALG_ID hashAlg)
This command performs an HMAC on the supplied data using the indicated hash algorithm.
|
TPM2B_PRIVATE |
Import(TPM_HANDLE parentHandle,
byte[] encryptionKey,
TPMT_PUBLIC objectPublic,
TPM2B_PRIVATE duplicate,
byte[] inSymSeed,
TPMT_SYM_DEF_OBJECT symmetricAlg)
This command allows an object to be encrypted using the symmetric encryption values of a Storage Key.
|
TPM_ALG_ID[] |
IncrementalSelfTest(TPM_ALG_ID[] toTest)
This command causes the TPM to perform a test of the selected algorithms.
|
TPM_HANDLE |
Load(TPM_HANDLE parentHandle,
TPM2B_PRIVATE inPrivate,
TPMT_PUBLIC inPublic)
This command is used to load objects into the TPM.
|
TPM_HANDLE |
LoadExternal(TPMT_SENSITIVE inPrivate,
TPMT_PUBLIC inPublic,
TPM_HANDLE hierarchy)
This command is used to load an object that is not a Protected Object into the TPM.
|
TPM_HANDLE |
MAC_Start(TPM_HANDLE handle,
byte[] auth,
TPM_ALG_ID inScheme)
This command starts a MAC sequence.
|
byte[] |
MAC(TPM_HANDLE handle,
byte[] buffer,
TPM_ALG_ID inScheme)
This command performs an HMAC or a block cipher MAC on the supplied data using the indicated algorithm.
|
MakeCredentialResponse |
MakeCredential(TPM_HANDLE handle,
byte[] credential,
byte[] objectName)
This command allows the TPM to perform the actions required of a Certificate Authority (CA) in creating a TPM2B_ID_OBJECT containing an activation credential.
|
NV_CertifyResponse |
NV_Certify(TPM_HANDLE signHandle,
TPM_HANDLE authHandle,
TPM_HANDLE nvIndex,
byte[] qualifyingData,
TPMU_SIG_SCHEME inScheme,
int size,
int offset)
The purpose of this command is to certify the contents of an NV Index or portion of an NV Index.
|
void |
NV_ChangeAuth(TPM_HANDLE nvIndex,
byte[] newAuth)
This command allows the authorization secret for an NV Index to be changed.
|
void |
NV_DefineSpace(TPM_HANDLE authHandle,
byte[] auth,
TPMS_NV_PUBLIC publicInfo)
This command defines the attributes of an NV Index and causes the TPM to reserve space to hold the data associated with the NV Index.
|
void |
NV_Extend(TPM_HANDLE authHandle,
TPM_HANDLE nvIndex,
byte[] data)
This command extends a value to an area in NV memory that was previously defined by TPM2_NV_DefineSpace.
|
void |
NV_GlobalWriteLock(TPM_HANDLE authHandle)
The command will SET TPMA_NV_WRITELOCKED for all indexes that have their TPMA_NV_GLOBALLOCK attribute SET.
|
void |
NV_Increment(TPM_HANDLE authHandle,
TPM_HANDLE nvIndex)
This command is used to increment the value in an NV Index that has the TPM_NT_COUNTER attribute.
|
byte[] |
NV_Read(TPM_HANDLE authHandle,
TPM_HANDLE nvIndex,
int size,
int offset)
This command reads a value from an area in NV memory previously defined by TPM2_NV_DefineSpace().
|
void |
NV_ReadLock(TPM_HANDLE authHandle,
TPM_HANDLE nvIndex)
If TPMA_NV_READ_STCLEAR is SET in an Index, then this command may be used to prevent further reads of the NV Index until the next TPM2_Startup (TPM_SU_CLEAR).
|
NV_ReadPublicResponse |
NV_ReadPublic(TPM_HANDLE nvIndex)
This command is used to read the public area and Name of an NV Index.
|
void |
NV_SetBits(TPM_HANDLE authHandle,
TPM_HANDLE nvIndex,
long bits)
This command is used to SET bits in an NV Index that was created as a bit field.
|
void |
NV_UndefineSpace(TPM_HANDLE authHandle,
TPM_HANDLE nvIndex)
This command removes an Index from the TPM.
|
void |
NV_UndefineSpaceSpecial(TPM_HANDLE nvIndex,
TPM_HANDLE platform)
This command allows removal of a platform-created NV Index that has TPMA_NV_POLICY_DELETE SET.
|
void |
NV_Write(TPM_HANDLE authHandle,
TPM_HANDLE nvIndex,
byte[] data,
int offset)
This command writes a value to an area in NV memory that was previously defined by TPM2_NV_DefineSpace().
|
void |
NV_WriteLock(TPM_HANDLE authHandle,
TPM_HANDLE nvIndex)
If the TPMA_NV_WRITEDEFINE or TPMA_NV_WRITE_STCLEAR attributes of an NV location are SET, then this command may be used to inhibit further writes of the NV Index.
|
TPM2B_PRIVATE |
ObjectChangeAuth(TPM_HANDLE objectHandle,
TPM_HANDLE parentHandle,
byte[] newAuth)
This command is used to change the authorization secret for a TPM-resident object.
|
PCR_AllocateResponse |
PCR_Allocate(TPM_HANDLE authHandle,
TPMS_PCR_SELECTION[] pcrAllocation)
This command is used to set the desired PCR allocation of PCR and algorithms.
|
TPMT_HA[] |
PCR_Event(TPM_HANDLE pcrHandle,
byte[] eventData)
This command is used to cause an update to the indicated PCR.
|
void |
PCR_Extend(TPM_HANDLE pcrHandle,
TPMT_HA[] digests)
This command is used to cause an update to the indicated PCR.
|
PCR_ReadResponse |
PCR_Read(TPMS_PCR_SELECTION[] pcrSelectionIn)
This command returns the values of all PCR specified in pcrSelectionIn.
|
void |
PCR_Reset(TPM_HANDLE pcrHandle)
If the attribute of a PCR allows the PCR to be reset and proper authorization is provided, then this command may be used to set the PCR in all banks to zero.
|
void |
PCR_SetAuthPolicy(TPM_HANDLE authHandle,
byte[] authPolicy,
TPM_ALG_ID hashAlg,
TPM_HANDLE pcrNum)
This command is used to associate a policy with a PCR or group of PCR.
|
void |
PCR_SetAuthValue(TPM_HANDLE pcrHandle,
byte[] auth)
This command changes the authValue of a PCR or group of PCR.
|
void |
Policy_AC_SendSelect(TPM_HANDLE policySession,
byte[] objectName,
byte[] authHandleName,
byte[] acName,
byte includeObject)
This command allows qualification of the sending (copying) of an Object to an Attached Component (AC).
|
void |
PolicyAuthorize(TPM_HANDLE policySession,
byte[] approvedPolicy,
byte[] policyRef,
byte[] keySign,
TPMT_TK_VERIFIED checkTicket)
This command allows policies to change.
|
void |
PolicyAuthorizeNV(TPM_HANDLE authHandle,
TPM_HANDLE nvIndex,
TPM_HANDLE policySession)
This command provides a capability that is the equivalent of a revocable policy.
|
void |
PolicyAuthValue(TPM_HANDLE policySession)
This command allows a policy to be bound to the authorization value of the authorized entity.
|
void |
PolicyCommandCode(TPM_HANDLE policySession,
TPM_CC code)
This command indicates that the authorization will be limited to a specific command code.
|
void |
PolicyCounterTimer(TPM_HANDLE policySession,
byte[] operandB,
int offset,
TPM_EO operation)
This command is used to cause conditional gating of a policy based on the contents of the TPMS_TIME_INFO structure.
|
void |
PolicyCpHash(TPM_HANDLE policySession,
byte[] cpHashA)
This command is used to allow a policy to be bound to a specific command and command parameters.
|
void |
PolicyDuplicationSelect(TPM_HANDLE policySession,
byte[] objectName,
byte[] newParentName,
byte includeObject)
This command allows qualification of duplication to allow duplication to a selected new parent.
|
byte[] |
PolicyGetDigest(TPM_HANDLE policySession)
This command returns the current policyDigest of the session.
|
void |
PolicyLocality(TPM_HANDLE policySession,
TPMA_LOCALITY locality)
This command indicates that the authorization will be limited to a specific locality.
|
void |
PolicyNameHash(TPM_HANDLE policySession,
byte[] nameHash)
This command allows a policy to be bound to a specific set of TPM entities without being bound to the parameters of the command.
|
void |
PolicyNV(TPM_HANDLE authHandle,
TPM_HANDLE nvIndex,
TPM_HANDLE policySession,
byte[] operandB,
int offset,
TPM_EO operation)
This command is used to cause conditional gating of a policy based on the contents of an NV Index.
|
void |
PolicyNvWritten(TPM_HANDLE policySession,
byte writtenSet)
This command allows a policy to be bound to the TPMA_NV_WRITTEN attributes.
|
void |
PolicyOR(TPM_HANDLE policySession,
TPM2B_DIGEST[] pHashList)
This command allows options in authorizations without requiring that the TPM evaluate all of the options.
|
void |
PolicyPassword(TPM_HANDLE policySession)
This command allows a policy to be bound to the authorization value of the authorized object.
|
void |
PolicyPCR(TPM_HANDLE policySession,
byte[] pcrDigest,
TPMS_PCR_SELECTION[] pcrs)
This command is used to cause conditional gating of a policy based on PCR.
|
void |
PolicyPhysicalPresence(TPM_HANDLE policySession)
This command indicates that physical presence will need to be asserted at the time the authorization is performed.
|
void |
PolicyRestart(TPM_HANDLE sessionHandle)
This command allows a policy authorization session to be returned to its initial state.
|
PolicySecretResponse |
PolicySecret(TPM_HANDLE authHandle,
TPM_HANDLE policySession,
byte[] nonceTPM,
byte[] cpHashA,
byte[] policyRef,
int expiration)
This command includes a secret-based authorization to a policy.
|
PolicySignedResponse |
PolicySigned(TPM_HANDLE authObject,
TPM_HANDLE policySession,
byte[] nonceTPM,
byte[] cpHashA,
byte[] policyRef,
int expiration,
TPMU_SIGNATURE auth)
This command includes a signed authorization in a policy.
|
void |
PolicyTemplate(TPM_HANDLE policySession,
byte[] templateHash)
This command allows a policy to be bound to a specific creation template.
|
void |
PolicyTicket(TPM_HANDLE policySession,
byte[] timeout,
byte[] cpHashA,
byte[] policyRef,
byte[] authName,
TPMT_TK_AUTH ticket)
This command is similar to TPM2_PolicySigned() except that it takes a ticket instead of a signed authorization.
|
void |
PP_Commands(TPM_HANDLE auth,
TPM_CC[] setList,
TPM_CC[] clearList)
This command is used to determine which commands require assertion of Physical Presence (PP) in addition to platformAuth/platformPolicy.
|
QuoteResponse |
Quote(TPM_HANDLE signHandle,
byte[] qualifyingData,
TPMU_SIG_SCHEME inScheme,
TPMS_PCR_SELECTION[] PCRselect)
This command is used to quote PCR values.
|
TPMS_TIME_INFO |
ReadClock()
This command reads the current TPMS_TIME_INFO structure that contains the current setting of Time, Clock, resetCount, and restartCount.
|
ReadPublicResponse |
ReadPublic(TPM_HANDLE objectHandle)
This command allows access to the public area of a loaded object.
|
RewrapResponse |
Rewrap(TPM_HANDLE oldParent,
TPM_HANDLE newParent,
TPM2B_PRIVATE inDuplicate,
byte[] name,
byte[] inSymSeed)
This command allows the TPM to serve in the role as a Duplication Authority.
|
byte[] |
RSA_Decrypt(TPM_HANDLE keyHandle,
byte[] cipherText,
TPMU_ASYM_SCHEME inScheme,
byte[] label)
This command performs RSA decryption using the indicated padding scheme according to IETF RFC 3447 ((PKCS#1).
|
byte[] |
RSA_Encrypt(TPM_HANDLE keyHandle,
byte[] message,
TPMU_ASYM_SCHEME inScheme,
byte[] label)
This command performs RSA encryption using the indicated padding scheme according to IETF RFC 3447.
|
void |
SelfTest(byte fullTest)
This command causes the TPM to perform a test of its capabilities.
|
SequenceCompleteResponse |
SequenceComplete(TPM_HANDLE sequenceHandle,
byte[] buffer,
TPM_HANDLE hierarchy)
This command adds the last part of data, if any, to a hash/HMAC sequence and returns the result.
|
void |
SequenceUpdate(TPM_HANDLE sequenceHandle,
byte[] buffer)
This command is used to add data to a hash or HMAC sequence.
|
void |
SetAlgorithmSet(TPM_HANDLE authHandle,
int algorithmSet)
This command allows the platform to change the set of algorithms that are used by the TPM.
|
void |
SetCommandCodeAuditStatus(TPM_HANDLE auth,
TPM_ALG_ID auditAlg,
TPM_CC[] setList,
TPM_CC[] clearList)
This command may be used by the Privacy Administrator or platform to change the audit status of a command or to set the hash algorithm used for the audit digest, but not both at the same time.
|
void |
SetPrimaryPolicy(TPM_HANDLE authHandle,
byte[] authPolicy,
TPM_ALG_ID hashAlg)
This command allows setting of the authorization policy for the lockout (lockoutPolicy), the platform hierarchy (platformPolicy), the storage hierarchy (ownerPolicy), and the endorsement hierarchy (endorsementPolicy).
|
void |
Shutdown(TPM_SU shutdownType)
This command is used to prepare the TPM for a power cycle.
|
TPMU_SIGNATURE |
Sign(TPM_HANDLE keyHandle,
byte[] digest,
TPMU_SIG_SCHEME inScheme,
TPMT_TK_HASHCHECK validation)
This command causes the TPM to sign an externally provided hash with the specified symmetric or asymmetric signing key.
|
StartAuthSessionResponse |
StartAuthSession(TPM_HANDLE tpmKey,
TPM_HANDLE bind,
byte[] nonceCaller,
byte[] encryptedSalt,
TPM_SE sessionType,
TPMT_SYM_DEF symmetric,
TPM_ALG_ID authHash)
This command is used to start an authorization session using alternative methods of establishing the session key (sessionKey).
|
void |
Startup(TPM_SU startupType)
TPM2_Startup() is always preceded by _TPM_Init, which is the physical indication that TPM initialization is necessary because of a system-wide reset.
|
void |
StirRandom(byte[] inData)
This command is used to add "additional information" to the RNG state.
|
void |
TestParms(TPMU_PUBLIC_PARMS parameters)
This command is used to check to see if specific combinations of algorithm parameters are supported.
|
byte[] |
Unseal(TPM_HANDLE itemHandle)
This command returns the data in a loaded Sealed Data Object.
|
byte[] |
Vendor_TCG_Test(byte[] inputData)
This is a placeholder to allow testing of the dispatch code.
|
TPMT_TK_VERIFIED |
VerifySignature(TPM_HANDLE keyHandle,
byte[] digest,
TPMU_SIGNATURE signature)
This command uses loaded keys to validate a signature on a message with the message digest passed to the TPM.
|
ZGen_2PhaseResponse |
ZGen_2Phase(TPM_HANDLE keyA,
TPMS_ECC_POINT inQsB,
TPMS_ECC_POINT inQeB,
TPM_ALG_ID inScheme,
int counter)
This command supports two-phase key exchange protocols.
|
_allowErrors, _expectError, _expectMoreResponses, _expectResponses, _getDevice, _GetExpectedResponses, _getLastResponseCode, _lastCommandSucceeded, _setCallback, _setDevice, _withSession, _withSessions, close, DispatchCommand, getLastResponseCodepublic void Startup(TPM_SU startupType)
startupType - TPM_SU_CLEAR or TPM_SU_STATEpublic void Shutdown(TPM_SU shutdownType)
shutdownType - TPM_SU_CLEAR or TPM_SU_STATEpublic void SelfTest(byte fullTest)
fullTest - YES if full test to be performed NO if only test of untested functions requiredpublic TPM_ALG_ID[] IncrementalSelfTest(TPM_ALG_ID[] toTest)
toTest - list of algorithms that should be testedpublic GetTestResultResponse GetTestResult()
public StartAuthSessionResponse StartAuthSession(TPM_HANDLE tpmKey, TPM_HANDLE bind, byte[] nonceCaller, byte[] encryptedSalt, TPM_SE sessionType, TPMT_SYM_DEF symmetric, TPM_ALG_ID authHash)
tpmKey - handle of a loaded decrypt key used to encrypt salt may be TPM_RH_NULL Auth Index: Nonebind - entity providing the authValue may be TPM_RH_NULL Auth Index: NonenonceCaller - initial nonceCaller, sets nonceTPM size for the session shall be at least 16 octetsencryptedSalt - value encrypted according to the type of tpmKey If tpmKey is TPM_RH_NULL, this shall be the Empty Buffer.sessionType - indicates the type of the session; simple HMAC or policy (including a trial policy)symmetric - the algorithm and key size for parameter encryption may select TPM_ALG_NULLauthHash - hash algorithm to use for the session Shall be a hash algorithm supported by the TPM and not TPM_ALG_NULLpublic void PolicyRestart(TPM_HANDLE sessionHandle)
sessionHandle - the handle for the policy sessionpublic CreateResponse Create(TPM_HANDLE parentHandle, TPMS_SENSITIVE_CREATE inSensitive, TPMT_PUBLIC inPublic, byte[] outsideInfo, TPMS_PCR_SELECTION[] creationPCR)
parentHandle - handle of parent for new object Auth Index: 1 Auth Role: USERinSensitive - the sensitive datainPublic - the public templateoutsideInfo - data that will be included in the creation data for this object to provide permanent, verifiable linkage between this object and some object owner datacreationPCR - PCR that will be used in creation datapublic TPM_HANDLE Load(TPM_HANDLE parentHandle, TPM2B_PRIVATE inPrivate, TPMT_PUBLIC inPublic)
parentHandle - TPM handle of parent key; shall not be a reserved handle Auth Index: 1 Auth Role: USERinPrivate - the private portion of the objectinPublic - the public portion of the objectpublic TPM_HANDLE LoadExternal(TPMT_SENSITIVE inPrivate, TPMT_PUBLIC inPublic, TPM_HANDLE hierarchy)
inPrivate - the sensitive portion of the object (optional)inPublic - the public portion of the objecthierarchy - hierarchy with which the object area is associatedpublic ReadPublicResponse ReadPublic(TPM_HANDLE objectHandle)
objectHandle - TPM handle of an object Auth Index: Nonepublic byte[] ActivateCredential(TPM_HANDLE activateHandle, TPM_HANDLE keyHandle, TPMS_ID_OBJECT credentialBlob, byte[] secret)
activateHandle - handle of the object associated with certificate in credentialBlob Auth Index: 1 Auth Role: ADMINkeyHandle - loaded key used to decrypt the TPMS_SENSITIVE in credentialBlob Auth Index: 2 Auth Role: USERcredentialBlob - the credentialsecret - keyHandle algorithm-dependent encrypted seed that protects credentialBlobpublic MakeCredentialResponse MakeCredential(TPM_HANDLE handle, byte[] credential, byte[] objectName)
handle - loaded public area, used to encrypt the sensitive area containing the credential key Auth Index: Nonecredential - the credential informationobjectName - Name of the object to which the credential appliespublic byte[] Unseal(TPM_HANDLE itemHandle)
itemHandle - handle of a loaded data object Auth Index: 1 Auth Role: USERpublic TPM2B_PRIVATE ObjectChangeAuth(TPM_HANDLE objectHandle, TPM_HANDLE parentHandle, byte[] newAuth)
objectHandle - handle of the object Auth Index: 1 Auth Role: ADMINparentHandle - handle of the parent Auth Index: NonenewAuth - new authorization valuepublic CreateLoadedResponse CreateLoaded(TPM_HANDLE parentHandle, TPMS_SENSITIVE_CREATE inSensitive, byte[] inPublic)
parentHandle - Handle of a transient storage key, a persistent storage key, TPM_RH_ENDORSEMENT, TPM_RH_OWNER, TPM_RH_PLATFORM+{PP}, or TPM_RH_NULL Auth Index: 1 Auth Role: USERinSensitive - the sensitive data, see TPM 2.0 Part 1 Sensitive ValuesinPublic - the public templatepublic DuplicateResponse Duplicate(TPM_HANDLE objectHandle, TPM_HANDLE newParentHandle, byte[] encryptionKeyIn, TPMT_SYM_DEF_OBJECT symmetricAlg)
objectHandle - loaded object to duplicate Auth Index: 1 Auth Role: DUPnewParentHandle - shall reference the public area of an asymmetric key Auth Index: NoneencryptionKeyIn - optional symmetric encryption key The size for this key is set to zero when the TPM is to generate the key. This parameter may be encrypted.symmetricAlg - definition for the symmetric algorithm to be used for the inner wrapper may be TPM_ALG_NULL if no inner wrapper is appliedpublic RewrapResponse Rewrap(TPM_HANDLE oldParent, TPM_HANDLE newParent, TPM2B_PRIVATE inDuplicate, byte[] name, byte[] inSymSeed)
oldParent - parent of object Auth Index: 1 Auth Role: UsernewParent - new parent of the object Auth Index: NoneinDuplicate - an object encrypted using symmetric key derived from inSymSeedname - the Name of the object being rewrappedinSymSeed - the seed for the symmetric key and HMAC key needs oldParent private key to recover the seed and generate the symmetric keypublic TPM2B_PRIVATE Import(TPM_HANDLE parentHandle, byte[] encryptionKey, TPMT_PUBLIC objectPublic, TPM2B_PRIVATE duplicate, byte[] inSymSeed, TPMT_SYM_DEF_OBJECT symmetricAlg)
parentHandle - the handle of the new parent for the object Auth Index: 1 Auth Role: USERencryptionKey - the optional symmetric encryption key used as the inner wrapper for duplicate If symmetricAlg is TPM_ALG_NULL, then this parameter shall be the Empty Buffer.objectPublic - the public area of the object to be imported This is provided so that the integrity value for duplicate and the object attributes can be checked. NOTE Even if the integrity value of the object is not checked on input, the object Name is required to create the integrity value for the imported object.duplicate - the symmetrically encrypted duplicate object that may contain an inner symmetric wrapperinSymSeed - the seed for the symmetric key and HMAC key inSymSeed is encrypted/encoded using the algorithms of newParent.symmetricAlg - definition for the symmetric algorithm to use for the inner wrapper If this algorithm is TPM_ALG_NULL, no inner wrapper is present and encryptionKey shall be the Empty Buffer.public byte[] RSA_Encrypt(TPM_HANDLE keyHandle, byte[] message, TPMU_ASYM_SCHEME inScheme, byte[] label)
keyHandle - reference to public portion of RSA key to use for encryption Auth Index: Nonemessage - message to be encrypted NOTE 1 The data type was chosen because it limits the overall size of the input to no greater than the size of the largest RSA public key. This may be larger than allowed for keyHandle.inScheme - the padding scheme to use if scheme associated with keyHandle is TPM_ALG_NULLlabel - optional label L to be associated with the message Size of the buffer is zero if no label is present NOTE 2 See description of label above.public byte[] RSA_Decrypt(TPM_HANDLE keyHandle, byte[] cipherText, TPMU_ASYM_SCHEME inScheme, byte[] label)
keyHandle - RSA key to use for decryption Auth Index: 1 Auth Role: USERcipherText - cipher text to be decrypted NOTE An encrypted RSA data block is the size of the public modulus.inScheme - the padding scheme to use if scheme associated with keyHandle is TPM_ALG_NULLlabel - label whose association with the message is to be verifiedpublic ECDH_KeyGenResponse ECDH_KeyGen(TPM_HANDLE keyHandle)
keyHandle - Handle of a loaded ECC key public area. Auth Index: Nonepublic TPMS_ECC_POINT ECDH_ZGen(TPM_HANDLE keyHandle, TPMS_ECC_POINT inPoint)
keyHandle - handle of a loaded ECC key Auth Index: 1 Auth Role: USERinPoint - a public keypublic TPMS_ALGORITHM_DETAIL_ECC ECC_Parameters(TPM_ECC_CURVE curveID)
curveID - parameter set selectorpublic ZGen_2PhaseResponse ZGen_2Phase(TPM_HANDLE keyA, TPMS_ECC_POINT inQsB, TPMS_ECC_POINT inQeB, TPM_ALG_ID inScheme, int counter)
keyA - handle of an unrestricted decryption key ECC The private key referenced by this handle is used as dS,A Auth Index: 1 Auth Role: USERinQsB - other partys static public key (Qs,B = (Xs,B, Ys,B))inQeB - other party's ephemeral public key (Qe,B = (Xe,B, Ye,B))inScheme - the key exchange schemecounter - value returned by TPM2_EC_Ephemeral()public EncryptDecryptResponse EncryptDecrypt(TPM_HANDLE keyHandle, byte decrypt, TPM_ALG_ID mode, byte[] ivIn, byte[] inData)
keyHandle - the symmetric key used for the operation Auth Index: 1 Auth Role: USERdecrypt - if YES, then the operation is decryption; if NO, the operation is encryptionmode - symmetric encryption/decryption mode this field shall match the default mode of the key or be TPM_ALG_NULL.ivIn - an initial value as required by the algorithminData - the data to be encrypted/decryptedpublic EncryptDecrypt2Response EncryptDecrypt2(TPM_HANDLE keyHandle, byte[] inData, byte decrypt, TPM_ALG_ID mode, byte[] ivIn)
keyHandle - the symmetric key used for the operation Auth Index: 1 Auth Role: USERinData - the data to be encrypted/decrypteddecrypt - if YES, then the operation is decryption; if NO, the operation is encryptionmode - symmetric mode this field shall match the default mode of the key or be TPM_ALG_NULL.ivIn - an initial value as required by the algorithmpublic HashResponse Hash(byte[] data, TPM_ALG_ID hashAlg, TPM_HANDLE hierarchy)
data - data to be hashedhashAlg - algorithm for the hash being computed shall not be TPM_ALG_NULLhierarchy - hierarchy to use for the ticket (TPM_RH_NULL allowed)public byte[] HMAC(TPM_HANDLE handle, byte[] buffer, TPM_ALG_ID hashAlg)
handle - handle for the symmetric signing key providing the HMAC key Auth Index: 1 Auth Role: USERbuffer - HMAC datahashAlg - algorithm to use for HMACpublic byte[] MAC(TPM_HANDLE handle, byte[] buffer, TPM_ALG_ID inScheme)
handle - handle for the symmetric signing key providing the MAC key Auth Index: 1 Auth Role: USERbuffer - MAC datainScheme - algorithm to use for MACpublic byte[] GetRandom(int bytesRequested)
bytesRequested - number of octets to returnpublic void StirRandom(byte[] inData)
inData - additional informationpublic TPM_HANDLE HMAC_Start(TPM_HANDLE handle, byte[] auth, TPM_ALG_ID hashAlg)
handle - handle of an HMAC key Auth Index: 1 Auth Role: USERauth - authorization value for subsequent use of the sequencehashAlg - the hash algorithm to use for the HMACpublic TPM_HANDLE MAC_Start(TPM_HANDLE handle, byte[] auth, TPM_ALG_ID inScheme)
handle - handle of a MAC key Auth Index: 1 Auth Role: USERauth - authorization value for subsequent use of the sequenceinScheme - the algorithm to use for the MACpublic TPM_HANDLE HashSequenceStart(byte[] auth, TPM_ALG_ID hashAlg)
auth - authorization value for subsequent use of the sequencehashAlg - the hash algorithm to use for the hash sequence An Event Sequence starts if this is TPM_ALG_NULL.public void SequenceUpdate(TPM_HANDLE sequenceHandle, byte[] buffer)
sequenceHandle - handle for the sequence object Auth Index: 1 Auth Role: USERbuffer - data to be added to hashpublic SequenceCompleteResponse SequenceComplete(TPM_HANDLE sequenceHandle, byte[] buffer, TPM_HANDLE hierarchy)
sequenceHandle - authorization for the sequence Auth Index: 1 Auth Role: USERbuffer - data to be added to the hash/HMAChierarchy - hierarchy of the ticket for a hashpublic TPMT_HA[] EventSequenceComplete(TPM_HANDLE pcrHandle, TPM_HANDLE sequenceHandle, byte[] buffer)
pcrHandle - PCR to be extended with the Event data Auth Index: 1 Auth Role: USERsequenceHandle - authorization for the sequence Auth Index: 2 Auth Role: USERbuffer - data to be added to the Eventpublic CertifyResponse Certify(TPM_HANDLE objectHandle, TPM_HANDLE signHandle, byte[] qualifyingData, TPMU_SIG_SCHEME inScheme)
objectHandle - handle of the object to be certified Auth Index: 1 Auth Role: ADMINsignHandle - handle of the key used to sign the attestation structure Auth Index: 2 Auth Role: USERqualifyingData - user provided qualifying datainScheme - signing scheme to use if the scheme for signHandle is TPM_ALG_NULLpublic CertifyCreationResponse CertifyCreation(TPM_HANDLE signHandle, TPM_HANDLE objectHandle, byte[] qualifyingData, byte[] creationHash, TPMU_SIG_SCHEME inScheme, TPMT_TK_CREATION creationTicket)
signHandle - handle of the key that will sign the attestation block Auth Index: 1 Auth Role: USERobjectHandle - the object associated with the creation data Auth Index: NonequalifyingData - user-provided qualifying datacreationHash - hash of the creation data produced by TPM2_Create() or TPM2_CreatePrimary()inScheme - signing scheme to use if the scheme for signHandle is TPM_ALG_NULLcreationTicket - ticket produced by TPM2_Create() or TPM2_CreatePrimary()public QuoteResponse Quote(TPM_HANDLE signHandle, byte[] qualifyingData, TPMU_SIG_SCHEME inScheme, TPMS_PCR_SELECTION[] PCRselect)
signHandle - handle of key that will perform signature Auth Index: 1 Auth Role: USERqualifyingData - data supplied by the callerinScheme - signing scheme to use if the scheme for signHandle is TPM_ALG_NULLPCRselect - PCR set to quotepublic GetSessionAuditDigestResponse GetSessionAuditDigest(TPM_HANDLE privacyAdminHandle, TPM_HANDLE signHandle, TPM_HANDLE sessionHandle, byte[] qualifyingData, TPMU_SIG_SCHEME inScheme)
privacyAdminHandle - handle of the privacy administrator (TPM_RH_ENDORSEMENT) Auth Index: 1 Auth Role: USERsignHandle - handle of the signing key Auth Index: 2 Auth Role: USERsessionHandle - handle of the audit session Auth Index: NonequalifyingData - user-provided qualifying data may be zero-lengthinScheme - signing scheme to use if the scheme for signHandle is TPM_ALG_NULLpublic GetCommandAuditDigestResponse GetCommandAuditDigest(TPM_HANDLE privacyHandle, TPM_HANDLE signHandle, byte[] qualifyingData, TPMU_SIG_SCHEME inScheme)
privacyHandle - handle of the privacy administrator (TPM_RH_ENDORSEMENT) Auth Index: 1 Auth Role: USERsignHandle - the handle of the signing key Auth Index: 2 Auth Role: USERqualifyingData - other data to associate with this audit digestinScheme - signing scheme to use if the scheme for signHandle is TPM_ALG_NULLpublic GetTimeResponse GetTime(TPM_HANDLE privacyAdminHandle, TPM_HANDLE signHandle, byte[] qualifyingData, TPMU_SIG_SCHEME inScheme)
privacyAdminHandle - handle of the privacy administrator (TPM_RH_ENDORSEMENT) Auth Index: 1 Auth Role: USERsignHandle - the keyHandle identifier of a loaded key that can perform digital signatures Auth Index: 2 Auth Role: USERqualifyingData - data to tick stampinScheme - signing scheme to use if the scheme for signHandle is TPM_ALG_NULLpublic CommitResponse Commit(TPM_HANDLE signHandle, TPMS_ECC_POINT P1, byte[] s2, byte[] y2)
signHandle - handle of the key that will be used in the signing operation Auth Index: 1 Auth Role: USERP1 - a point (M) on the curve used by signHandles2 - octet array used to derive x-coordinate of a base pointy2 - y coordinate of the point associated with s2public EC_EphemeralResponse EC_Ephemeral(TPM_ECC_CURVE curveID)
curveID - The curve for the computed ephemeral pointpublic TPMT_TK_VERIFIED VerifySignature(TPM_HANDLE keyHandle, byte[] digest, TPMU_SIGNATURE signature)
keyHandle - handle of public key that will be used in the validation Auth Index: Nonedigest - digest of the signed messagesignature - signature to be testedpublic TPMU_SIGNATURE Sign(TPM_HANDLE keyHandle, byte[] digest, TPMU_SIG_SCHEME inScheme, TPMT_TK_HASHCHECK validation)
keyHandle - Handle of key that will perform signing Auth Index: 1 Auth Role: USERdigest - digest to be signedinScheme - signing scheme to use if the scheme for keyHandle is TPM_ALG_NULLvalidation - proof that digest was created by the TPM If keyHandle is not a restricted signing key, then this may be a NULL Ticket with tag = TPM_ST_CHECKHASH.public void SetCommandCodeAuditStatus(TPM_HANDLE auth, TPM_ALG_ID auditAlg, TPM_CC[] setList, TPM_CC[] clearList)
auth - TPM_RH_OWNER or TPM_RH_PLATFORM+{PP} Auth Index: 1 Auth Role: USERauditAlg - hash algorithm for the audit digest; if TPM_ALG_NULL, then the hash is not changedsetList - list of commands that will be added to those that will be auditedclearList - list of commands that will no longer be auditedpublic void PCR_Extend(TPM_HANDLE pcrHandle, TPMT_HA[] digests)
pcrHandle - handle of the PCR Auth Handle: 1 Auth Role: USERdigests - list of tagged digest values to be extendedpublic TPMT_HA[] PCR_Event(TPM_HANDLE pcrHandle, byte[] eventData)
pcrHandle - Handle of the PCR Auth Handle: 1 Auth Role: USEReventData - Event data in sized bufferpublic PCR_ReadResponse PCR_Read(TPMS_PCR_SELECTION[] pcrSelectionIn)
pcrSelectionIn - The selection of PCR to readpublic PCR_AllocateResponse PCR_Allocate(TPM_HANDLE authHandle, TPMS_PCR_SELECTION[] pcrAllocation)
authHandle - TPM_RH_PLATFORM+{PP} Auth Index: 1 Auth Role: USERpcrAllocation - the requested allocationpublic void PCR_SetAuthPolicy(TPM_HANDLE authHandle, byte[] authPolicy, TPM_ALG_ID hashAlg, TPM_HANDLE pcrNum)
authHandle - TPM_RH_PLATFORM+{PP} Auth Index: 1 Auth Role: USERauthPolicy - the desired authPolicyhashAlg - the hash algorithm of the policypcrNum - the PCR for which the policy is to be setpublic void PCR_SetAuthValue(TPM_HANDLE pcrHandle, byte[] auth)
pcrHandle - handle for a PCR that may have an authorization value set Auth Index: 1 Auth Role: USERauth - the desired authorization valuepublic void PCR_Reset(TPM_HANDLE pcrHandle)
pcrHandle - the PCR to reset Auth Index: 1 Auth Role: USERpublic PolicySignedResponse PolicySigned(TPM_HANDLE authObject, TPM_HANDLE policySession, byte[] nonceTPM, byte[] cpHashA, byte[] policyRef, int expiration, TPMU_SIGNATURE auth)
authObject - handle for a key that will validate the signature Auth Index: NonepolicySession - handle for the policy session being extended Auth Index: NonenonceTPM - the policy nonce for the session This can be the Empty Buffer.cpHashA - digest of the command parameters to which this authorization is limited This is not the cpHash for this command but the cpHash for the command to which this policy session will be applied. If it is not limited, the parameter will be the Empty Buffer.policyRef - a reference to a policy relating to the authorization may be the Empty Buffer Size is limited to be no larger than the nonce size supported on the TPM.expiration - time when authorization will expire, measured in seconds from the time that nonceTPM was generated If expiration is non-negative, a NULL Ticket is returned. See 23.2.5.auth - signed authorization (not optional)public PolicySecretResponse PolicySecret(TPM_HANDLE authHandle, TPM_HANDLE policySession, byte[] nonceTPM, byte[] cpHashA, byte[] policyRef, int expiration)
authHandle - handle for an entity providing the authorization Auth Index: 1 Auth Role: USERpolicySession - handle for the policy session being extended Auth Index: NonenonceTPM - the policy nonce for the session This can be the Empty Buffer.cpHashA - digest of the command parameters to which this authorization is limited This not the cpHash for this command but the cpHash for the command to which this policy session will be applied. If it is not limited, the parameter will be the Empty Buffer.policyRef - a reference to a policy relating to the authorization may be the Empty Buffer Size is limited to be no larger than the nonce size supported on the TPM.expiration - time when authorization will expire, measured in seconds from the time that nonceTPM was generated If expiration is non-negative, a NULL Ticket is returned. See 23.2.5.public void PolicyTicket(TPM_HANDLE policySession, byte[] timeout, byte[] cpHashA, byte[] policyRef, byte[] authName, TPMT_TK_AUTH ticket)
policySession - handle for the policy session being extended Auth Index: Nonetimeout - time when authorization will expire The contents are TPM specific. This shall be the value returned when ticket was produced.cpHashA - digest of the command parameters to which this authorization is limited If it is not limited, the parameter will be the Empty Buffer.policyRef - reference to a qualifier for the policy may be the Empty BufferauthName - name of the object that provided the authorizationticket - an authorization ticket returned by the TPM in response to a TPM2_PolicySigned() or TPM2_PolicySecret()public void PolicyOR(TPM_HANDLE policySession, TPM2B_DIGEST[] pHashList)
policySession - handle for the policy session being extended Auth Index: NonepHashList - the list of hashes to check for a matchpublic void PolicyPCR(TPM_HANDLE policySession, byte[] pcrDigest, TPMS_PCR_SELECTION[] pcrs)
policySession - handle for the policy session being extended Auth Index: NonepcrDigest - expected digest value of the selected PCR using the hash algorithm of the session; may be zero lengthpcrs - the PCR to include in the check digestpublic void PolicyLocality(TPM_HANDLE policySession, TPMA_LOCALITY locality)
policySession - handle for the policy session being extended Auth Index: Nonelocality - the allowed localities for the policypublic void PolicyNV(TPM_HANDLE authHandle, TPM_HANDLE nvIndex, TPM_HANDLE policySession, byte[] operandB, int offset, TPM_EO operation)
authHandle - handle indicating the source of the authorization value Auth Index: 1 Auth Role: USERnvIndex - the NV Index of the area to read Auth Index: NonepolicySession - handle for the policy session being extended Auth Index: NoneoperandB - the second operandoffset - the octet offset in the NV Index for the start of operand Aoperation - the comparison to makepublic void PolicyCounterTimer(TPM_HANDLE policySession, byte[] operandB, int offset, TPM_EO operation)
policySession - handle for the policy session being extended Auth Index: NoneoperandB - the second operandoffset - the octet offset in the TPMS_TIME_INFO structure for the start of operand Aoperation - the comparison to makepublic void PolicyCommandCode(TPM_HANDLE policySession, TPM_CC code)
policySession - handle for the policy session being extended Auth Index: Nonecode - the allowed commandCodepublic void PolicyPhysicalPresence(TPM_HANDLE policySession)
policySession - handle for the policy session being extended Auth Index: Nonepublic void PolicyCpHash(TPM_HANDLE policySession, byte[] cpHashA)
policySession - handle for the policy session being extended Auth Index: NonecpHashA - the cpHash added to the policypublic void PolicyNameHash(TPM_HANDLE policySession, byte[] nameHash)
policySession - handle for the policy session being extended Auth Index: NonenameHash - the digest to be added to the policypublic void PolicyDuplicationSelect(TPM_HANDLE policySession, byte[] objectName, byte[] newParentName, byte includeObject)
policySession - handle for the policy session being extended Auth Index: NoneobjectName - the Name of the object to be duplicatednewParentName - the Name of the new parentincludeObject - if YES, the objectName will be included in the value in policySessionpolicyDigestpublic void PolicyAuthorize(TPM_HANDLE policySession, byte[] approvedPolicy, byte[] policyRef, byte[] keySign, TPMT_TK_VERIFIED checkTicket)
policySession - handle for the policy session being extended Auth Index: NoneapprovedPolicy - digest of the policy being approvedpolicyRef - a policy qualifierkeySign - Name of a key that can sign a policy additioncheckTicket - ticket validating that approvedPolicy and policyRef were signed by keySignpublic void PolicyAuthValue(TPM_HANDLE policySession)
policySession - handle for the policy session being extended Auth Index: Nonepublic void PolicyPassword(TPM_HANDLE policySession)
policySession - handle for the policy session being extended Auth Index: Nonepublic byte[] PolicyGetDigest(TPM_HANDLE policySession)
policySession - handle for the policy session Auth Index: Nonepublic void PolicyNvWritten(TPM_HANDLE policySession, byte writtenSet)
policySession - handle for the policy session being extended Auth Index: NonewrittenSet - YES if NV Index is required to have been written NO if NV Index is required not to have been writtenpublic void PolicyTemplate(TPM_HANDLE policySession, byte[] templateHash)
policySession - handle for the policy session being extended Auth Index: NonetemplateHash - the digest to be added to the policypublic void PolicyAuthorizeNV(TPM_HANDLE authHandle, TPM_HANDLE nvIndex, TPM_HANDLE policySession)
authHandle - handle indicating the source of the authorization value Auth Index: 1 Auth Role: USERnvIndex - the NV Index of the area to read Auth Index: NonepolicySession - handle for the policy session being extended Auth Index: Nonepublic CreatePrimaryResponse CreatePrimary(TPM_HANDLE primaryHandle, TPMS_SENSITIVE_CREATE inSensitive, TPMT_PUBLIC inPublic, byte[] outsideInfo, TPMS_PCR_SELECTION[] creationPCR)
primaryHandle - TPM_RH_ENDORSEMENT, TPM_RH_OWNER, TPM_RH_PLATFORM+{PP}, or TPM_RH_NULL Auth Index: 1 Auth Role: USERinSensitive - the sensitive data, see TPM 2.0 Part 1 Sensitive ValuesinPublic - the public templateoutsideInfo - data that will be included in the creation data for this object to provide permanent, verifiable linkage between this object and some object owner datacreationPCR - PCR that will be used in creation datapublic void HierarchyControl(TPM_HANDLE authHandle, TPM_HANDLE enable, byte state)
authHandle - TPM_RH_ENDORSEMENT, TPM_RH_OWNER or TPM_RH_PLATFORM+{PP} Auth Index: 1 Auth Role: USERenable - the enable being modified TPM_RH_ENDORSEMENT, TPM_RH_OWNER, TPM_RH_PLATFORM, or TPM_RH_PLATFORM_NVstate - YES if the enable should be SET, NO if the enable should be CLEARpublic void SetPrimaryPolicy(TPM_HANDLE authHandle, byte[] authPolicy, TPM_ALG_ID hashAlg)
authHandle - TPM_RH_LOCKOUT, TPM_RH_ENDORSEMENT, TPM_RH_OWNER or TPM_RH_PLATFORM+{PP} Auth Index: 1 Auth Role: USERauthPolicy - an authorization policy digest; may be the Empty Buffer If hashAlg is TPM_ALG_NULL, then this shall be an Empty Buffer.hashAlg - the hash algorithm to use for the policy If the authPolicy is an Empty Buffer, then this field shall be TPM_ALG_NULL.public void ChangePPS(TPM_HANDLE authHandle)
authHandle - TPM_RH_PLATFORM+{PP} Auth Index: 1 Auth Role: USERpublic void ChangeEPS(TPM_HANDLE authHandle)
authHandle - TPM_RH_PLATFORM+{PP} Auth Handle: 1 Auth Role: USERpublic void Clear(TPM_HANDLE authHandle)
authHandle - TPM_RH_LOCKOUT or TPM_RH_PLATFORM+{PP} Auth Handle: 1 Auth Role: USERpublic void ClearControl(TPM_HANDLE auth, byte disable)
auth - TPM_RH_LOCKOUT or TPM_RH_PLATFORM+{PP} Auth Handle: 1 Auth Role: USERdisable - YES if the disableOwnerClear flag is to be SET, NO if the flag is to be CLEAR.public void HierarchyChangeAuth(TPM_HANDLE authHandle, byte[] newAuth)
authHandle - TPM_RH_LOCKOUT, TPM_RH_ENDORSEMENT, TPM_RH_OWNER or TPM_RH_PLATFORM+{PP} Auth Index: 1 Auth Role: USERnewAuth - new authorization valuepublic void DictionaryAttackLockReset(TPM_HANDLE lockHandle)
lockHandle - TPM_RH_LOCKOUT Auth Index: 1 Auth Role: USERpublic void DictionaryAttackParameters(TPM_HANDLE lockHandle, int newMaxTries, int newRecoveryTime, int lockoutRecovery)
lockHandle - TPM_RH_LOCKOUT Auth Index: 1 Auth Role: USERnewMaxTries - count of authorization failures before the lockout is imposednewRecoveryTime - time in seconds before the authorization failure count is automatically decremented A value of zero indicates that DA protection is disabled.lockoutRecovery - time in seconds after a lockoutAuth failure before use of lockoutAuth is allowed A value of zero indicates that a reboot is required.public void PP_Commands(TPM_HANDLE auth, TPM_CC[] setList, TPM_CC[] clearList)
auth - TPM_RH_PLATFORM+PP Auth Index: 1 Auth Role: USER + Physical PresencesetList - list of commands to be added to those that will require that Physical Presence be assertedclearList - list of commands that will no longer require that Physical Presence be assertedpublic void SetAlgorithmSet(TPM_HANDLE authHandle, int algorithmSet)
authHandle - TPM_RH_PLATFORM Auth Index: 1 Auth Role: USERalgorithmSet - a TPM vendor-dependent value indicating the algorithm set selectionpublic void FieldUpgradeStart(TPM_HANDLE authorization, TPM_HANDLE keyHandle, byte[] fuDigest, TPMU_SIGNATURE manifestSignature)
authorization - TPM_RH_PLATFORM+{PP} Auth Index:1 Auth Role: ADMINkeyHandle - handle of a public area that contains the TPM Vendor Authorization Key that will be used to validate manifestSignature Auth Index: NonefuDigest - digest of the first block in the field upgrade sequencemanifestSignature - signature over fuDigest using the key associated with keyHandle (not optional)public FieldUpgradeDataResponse FieldUpgradeData(byte[] fuData)
fuData - field upgrade image datapublic byte[] FirmwareRead(int sequenceNumber)
sequenceNumber - the number of previous calls to this command in this sequence set to 0 on the first callpublic TPMS_CONTEXT ContextSave(TPM_HANDLE saveHandle)
saveHandle - handle of the resource to save Auth Index: Nonepublic TPM_HANDLE ContextLoad(TPMS_CONTEXT context)
context - the context blobpublic void FlushContext(TPM_HANDLE flushHandle)
flushHandle - the handle of the item to flush NOTE This is a use of a handle as a parameter.public void EvictControl(TPM_HANDLE auth, TPM_HANDLE objectHandle, TPM_HANDLE persistentHandle)
auth - TPM_RH_OWNER or TPM_RH_PLATFORM+{PP} Auth Handle: 1 Auth Role: USERobjectHandle - the handle of a loaded object Auth Index: NonepersistentHandle - if objectHandle is a transient object handle, then this is the persistent handle for the object if objectHandle is a persistent object handle, then it shall be the same value as persistentHandlepublic TPMS_TIME_INFO ReadClock()
public void ClockSet(TPM_HANDLE auth, long newTime)
auth - TPM_RH_OWNER or TPM_RH_PLATFORM+{PP} Auth Handle: 1 Auth Role: USERnewTime - new Clock setting in millisecondspublic void ClockRateAdjust(TPM_HANDLE auth, TPM_CLOCK_ADJUST rateAdjust)
auth - TPM_RH_OWNER or TPM_RH_PLATFORM+{PP} Auth Handle: 1 Auth Role: USERrateAdjust - Adjustment to current Clock update ratepublic GetCapabilityResponse GetCapability(TPM_CAP capability, int property, int propertyCount)
capability - group selection; determines the format of the responseproperty - further definition of informationpropertyCount - number of properties of the indicated type to returnpublic void TestParms(TPMU_PUBLIC_PARMS parameters)
parameters - algorithm parameters to be validatedpublic void NV_DefineSpace(TPM_HANDLE authHandle, byte[] auth, TPMS_NV_PUBLIC publicInfo)
authHandle - TPM_RH_OWNER or TPM_RH_PLATFORM+{PP} Auth Index: 1 Auth Role: USERauth - the authorization valuepublicInfo - the public parameters of the NV areapublic void NV_UndefineSpace(TPM_HANDLE authHandle, TPM_HANDLE nvIndex)
authHandle - TPM_RH_OWNER or TPM_RH_PLATFORM+{PP} Auth Index: 1 Auth Role: USERnvIndex - the NV Index to remove from NV space Auth Index: Nonepublic void NV_UndefineSpaceSpecial(TPM_HANDLE nvIndex, TPM_HANDLE platform)
nvIndex - Index to be deleted Auth Index: 1 Auth Role: ADMINplatform - TPM_RH_PLATFORM + {PP} Auth Index: 2 Auth Role: USERpublic NV_ReadPublicResponse NV_ReadPublic(TPM_HANDLE nvIndex)
nvIndex - the NV Index Auth Index: Nonepublic void NV_Write(TPM_HANDLE authHandle, TPM_HANDLE nvIndex, byte[] data, int offset)
authHandle - handle indicating the source of the authorization value Auth Index: 1 Auth Role: USERnvIndex - the NV Index of the area to write Auth Index: Nonedata - the data to writeoffset - the octet offset into the NV Areapublic void NV_Increment(TPM_HANDLE authHandle, TPM_HANDLE nvIndex)
authHandle - handle indicating the source of the authorization value Auth Index: 1 Auth Role: USERnvIndex - the NV Index to increment Auth Index: Nonepublic void NV_Extend(TPM_HANDLE authHandle, TPM_HANDLE nvIndex, byte[] data)
authHandle - handle indicating the source of the authorization value Auth Index: 1 Auth Role: USERnvIndex - the NV Index to extend Auth Index: Nonedata - the data to extendpublic void NV_SetBits(TPM_HANDLE authHandle, TPM_HANDLE nvIndex, long bits)
authHandle - handle indicating the source of the authorization value Auth Index: 1 Auth Role: USERnvIndex - NV Index of the area in which the bit is to be set Auth Index: Nonebits - the data to OR with the current contentspublic void NV_WriteLock(TPM_HANDLE authHandle, TPM_HANDLE nvIndex)
authHandle - handle indicating the source of the authorization value Auth Index: 1 Auth Role: USERnvIndex - the NV Index of the area to lock Auth Index: Nonepublic void NV_GlobalWriteLock(TPM_HANDLE authHandle)
authHandle - TPM_RH_OWNER or TPM_RH_PLATFORM+{PP} Auth Index: 1 Auth Role: USERpublic byte[] NV_Read(TPM_HANDLE authHandle, TPM_HANDLE nvIndex, int size, int offset)
authHandle - the handle indicating the source of the authorization value Auth Index: 1 Auth Role: USERnvIndex - the NV Index to be read Auth Index: Nonesize - number of octets to readoffset - octet offset into the NV area This value shall be less than or equal to the size of the nvIndex data.public void NV_ReadLock(TPM_HANDLE authHandle, TPM_HANDLE nvIndex)
authHandle - the handle indicating the source of the authorization value Auth Index: 1 Auth Role: USERnvIndex - the NV Index to be locked Auth Index: Nonepublic void NV_ChangeAuth(TPM_HANDLE nvIndex, byte[] newAuth)
nvIndex - handle of the entity Auth Index: 1 Auth Role: ADMINnewAuth - new authorization valuepublic NV_CertifyResponse NV_Certify(TPM_HANDLE signHandle, TPM_HANDLE authHandle, TPM_HANDLE nvIndex, byte[] qualifyingData, TPMU_SIG_SCHEME inScheme, int size, int offset)
signHandle - handle of the key used to sign the attestation structure Auth Index: 1 Auth Role: USERauthHandle - handle indicating the source of the authorization value for the NV Index Auth Index: 2 Auth Role: USERnvIndex - Index for the area to be certified Auth Index: NonequalifyingData - user-provided qualifying datainScheme - signing scheme to use if the scheme for signHandle is TPM_ALG_NULLsize - number of octets to certifyoffset - octet offset into the NV area This value shall be less than or equal to the size of the nvIndex data.public AC_GetCapabilityResponse AC_GetCapability(TPM_HANDLE ac, TPM_AT capability, int count)
ac - handle indicating the Attached Component Auth Index: Nonecapability - starting info typecount - maximum number of values to returnpublic TPMS_AC_OUTPUT AC_Send(TPM_HANDLE sendObject, TPM_HANDLE authHandle, TPM_HANDLE ac, byte[] acDataIn)
sendObject - handle of the object being sent to ac Auth Index: 1 Auth Role: DUPauthHandle - the handle indicating the source of the authorization value Auth Index: 2 Auth Role: USERac - handle indicating the Attached Component to which the object will be sent Auth Index: NoneacDataIn - Optional non sensitive information related to the objectpublic void Policy_AC_SendSelect(TPM_HANDLE policySession, byte[] objectName, byte[] authHandleName, byte[] acName, byte includeObject)
policySession - handle for the policy session being extended Auth Index: NoneobjectName - the Name of the Object to be sentauthHandleName - the Name associated with authHandle used in the TPM2_AC_Send() commandacName - the Name of the Attached Component to which the Object will be sentincludeObject - if SET, objectName will be included in the value in policySessionpolicyDigestpublic byte[] Vendor_TCG_Test(byte[] inputData)
inputData - dummy dataCopyright © 2017. All rights reserved.