public class TPMT_PUBLIC extends TpmStructure
| Modifier and Type | Field and Description |
|---|---|
byte[] |
authPolicy
optional policy for using this key The policy is computed using the nameAlg of the object.
|
TPM_ALG_ID |
nameAlg
algorithm used for computing the Name of the object NOTE The "+" indicates that the instance of a TPMT_PUBLIC may have a "+" to indicate that the nameAlg may be TPM_ALG_NULL.
|
TPMA_OBJECT |
objectAttributes
attributes that, along with type, determine the manipulations of this object
|
TPMU_PUBLIC_PARMS |
parameters
the algorithm or structure details
|
TPMU_PUBLIC_ID |
unique
the unique identifier of the structure For an asymmetric key, this would be the public key.
|
| Constructor and Description |
|---|
TPMT_PUBLIC()
Table 191 defines the public area structure.
|
TPMT_PUBLIC(TPM_ALG_ID _nameAlg,
TPMA_OBJECT _objectAttributes,
byte[] _authPolicy,
TPMU_PUBLIC_PARMS _parameters,
TPMU_PUBLIC_ID _unique)
Table 191 defines the public area structure.
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
encrypt(byte[] inData,
String label) |
static TPMT_PUBLIC |
fromTpm(byte[] x) |
static TPMT_PUBLIC |
fromTpm(InByteBuf buf) |
byte[] |
getName()
Returns the TPM name of this object.
|
int |
GetUnionSelector_parameters() |
int |
GetUnionSelector_unique() |
void |
initFromTpm(InByteBuf buf)
Populate this object from the TPM representation in the input byte buffer object
|
String |
toString() |
void |
toStringInternal(TpmStructurePrinter _p,
int d)
Serialize this object to the structure printer
|
byte[] |
toTpm()
Convert this object to its TPM representation and return it as a byte array
|
void |
toTpm(OutByteBuf buf)
Convert this object to its TPM representation and store in the output byte buffer object
|
boolean |
validateQuote(PCR_ReadResponse expectedPcrs,
byte[] nonce,
QuoteResponse quote)
Validate a TPM quote against a set of PCR and a nonce.
|
boolean |
validateSignature(byte[] _dataThatWasSigned,
TPMU_SIGNATURE _signature)
Validate a TPM signature.
|
equals, hashCodepublic TPM_ALG_ID nameAlg
public TPMA_OBJECT objectAttributes
public byte[] authPolicy
public TPMU_PUBLIC_PARMS parameters
public TPMU_PUBLIC_ID unique
public TPMT_PUBLIC(TPM_ALG_ID _nameAlg, TPMA_OBJECT _objectAttributes, byte[] _authPolicy, TPMU_PUBLIC_PARMS _parameters, TPMU_PUBLIC_ID _unique)
_nameAlg - algorithm used for computing the Name of the object NOTE The "+" indicates that the instance of a TPMT_PUBLIC may have a "+" to indicate that the nameAlg may be TPM_ALG_NULL._objectAttributes - attributes that, along with type, determine the manipulations of this object_authPolicy - optional policy for using this key The policy is computed using the nameAlg of the object. NOTE Shall be the Empty Policy if no authorization policy is present._parameters - the algorithm or structure details (One of TPMS_KEYEDHASH_PARMS, TPMS_SYMCIPHER_PARMS, TPMS_RSA_PARMS, TPMS_ECC_PARMS, TPMS_ASYM_PARMS)_unique - the unique identifier of the structure For an asymmetric key, this would be the public key. (One of TPM2B_DIGEST_Keyedhash, TPM2B_DIGEST_Symcipher, TPM2B_PUBLIC_KEY_RSA, TPMS_ECC_POINT, TPMS_DERIVE)public TPMT_PUBLIC()
public int GetUnionSelector_parameters()
public int GetUnionSelector_unique()
public void toTpm(OutByteBuf buf)
TpmMarshallerbuf - An output byte bufferpublic void initFromTpm(InByteBuf buf)
TpmMarshallerbuf - An input byte bufferpublic byte[] toTpm()
TpmMarshallerpublic static TPMT_PUBLIC fromTpm(byte[] x)
public static TPMT_PUBLIC fromTpm(InByteBuf buf)
public void toStringInternal(TpmStructurePrinter _p, int d)
TpmStructuretoStringInternal in class TpmStructure_p - The structure accumulatord - The data to serializepublic boolean validateSignature(byte[] _dataThatWasSigned,
TPMU_SIGNATURE _signature)
_dataThatWasSigned - The data_signature - The TPM signaturepublic byte[] encrypt(byte[] inData,
String label)
public byte[] getName()
public boolean validateQuote(PCR_ReadResponse expectedPcrs, byte[] nonce, QuoteResponse quote)
expectedPcrs - PCR values expectednonce - The noncequote - The TPM generated quoteCopyright © 2017. All rights reserved.