Package tss.tpm
Class TPM2_Import_REQUEST
- java.lang.Object
-
- tss.TpmStructure
-
- tss.CmdStructure
-
- tss.ReqStructure
-
- tss.tpm.TPM2_Import_REQUEST
-
- All Implemented Interfaces:
TpmMarshaller
public class TPM2_Import_REQUEST extends ReqStructure
This command allows an object to be encrypted using the symmetric encryption values of a Storage Key. After encryption, the object may be loaded and used in the new hierarchy. The imported object (duplicate) may be singly encrypted, multiply encrypted, or unencrypted.
-
-
Field Summary
Fields Modifier and Type Field Description TPM2B_PRIVATE
duplicate
The symmetrically encrypted duplicate object that may contain an inner symmetric wrapperbyte[]
encryptionKey
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.byte[]
inSymSeed
The seed for the symmetric key and HMAC key inSymSeed is encrypted/encoded using the algorithms of newParent.TPMT_PUBLIC
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.TPM_HANDLE
parentHandle
The handle of the new parent for the object Auth Index: 1 Auth Role: USERTPMT_SYM_DEF_OBJECT
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.
-
Constructor Summary
Constructors Constructor Description TPM2_Import_REQUEST()
TPM2_Import_REQUEST(TPM_HANDLE _parentHandle, byte[] _encryptionKey, TPMT_PUBLIC _objectPublic, TPM2B_PRIVATE _duplicate, byte[] _inSymSeed, TPMT_SYM_DEF_OBJECT _symmetricAlg)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static TPM2_Import_REQUEST
fromBytes(byte[] byteBuf)
Static marshaling helperstatic TPM2_Import_REQUEST
fromTpm(byte[] byteBuf)
Deprecated.UsefromBytes(byte[])
insteadstatic TPM2_Import_REQUEST
fromTpm(TpmBuffer buf)
Static marshaling helperTPM_HANDLE[]
getHandles()
void
initFromTpm(TpmBuffer buf)
TpmMarshaller methodint
numAuthHandles()
int
numHandles()
SessEncInfo
sessEncInfo()
String
toString()
void
toStringInternal(TpmStructurePrinter _p, int d)
Serialize this object to the structure printerbyte[]
toTpm()
Deprecated.UseTpmStructure.toBytes()
insteadvoid
toTpm(TpmBuffer buf)
TpmMarshaller method-
Methods inherited from class tss.ReqStructure
typeName
-
Methods inherited from class tss.TpmStructure
equals, hashCode, toBytes
-
-
-
-
Field Detail
-
parentHandle
public TPM_HANDLE parentHandle
The handle of the new parent for the object Auth Index: 1 Auth Role: USER
-
encryptionKey
public byte[] encryptionKey
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
public TPMT_PUBLIC 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
public TPM2B_PRIVATE duplicate
The symmetrically encrypted duplicate object that may contain an inner symmetric wrapper
-
inSymSeed
public byte[] inSymSeed
The seed for the symmetric key and HMAC key inSymSeed is encrypted/encoded using the algorithms of newParent.
-
symmetricAlg
public TPMT_SYM_DEF_OBJECT 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.
-
-
Constructor Detail
-
TPM2_Import_REQUEST
public TPM2_Import_REQUEST()
-
TPM2_Import_REQUEST
public TPM2_Import_REQUEST(TPM_HANDLE _parentHandle, byte[] _encryptionKey, TPMT_PUBLIC _objectPublic, TPM2B_PRIVATE _duplicate, byte[] _inSymSeed, TPMT_SYM_DEF_OBJECT _symmetricAlg)
- Parameters:
_parentHandle
- The handle of the new parent for the object Auth Index: 1 Auth Role: USER_encryptionKey
- 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 wrapper_inSymSeed
- 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.
-
-
Method Detail
-
toTpm
public void toTpm(TpmBuffer buf)
TpmMarshaller method- Specified by:
toTpm
in interfaceTpmMarshaller
- Overrides:
toTpm
in classTpmStructure
- Parameters:
buf
- An output byte buffer
-
initFromTpm
public void initFromTpm(TpmBuffer buf)
TpmMarshaller method- Specified by:
initFromTpm
in interfaceTpmMarshaller
- Overrides:
initFromTpm
in classTpmStructure
- Parameters:
buf
- An input byte buffer
-
toTpm
public byte[] toTpm()
Deprecated.UseTpmStructure.toBytes()
instead- Returns:
- Wire (marshaled) representation of this object
-
fromBytes
public static TPM2_Import_REQUEST fromBytes(byte[] byteBuf)
Static marshaling helper- Parameters:
byteBuf
- Wire representation of the object- Returns:
- New object constructed from its wire representation
-
fromTpm
public static TPM2_Import_REQUEST fromTpm(byte[] byteBuf)
Deprecated.UsefromBytes(byte[])
instead- Parameters:
byteBuf
- Wire representation of the object- Returns:
- New object constructed from its wire representation
-
fromTpm
public static TPM2_Import_REQUEST fromTpm(TpmBuffer buf)
Static marshaling helper- Parameters:
buf
- Wire representation of the object- Returns:
- New object constructed from its wire representation
-
toStringInternal
public void toStringInternal(TpmStructurePrinter _p, int d)
Description copied from class:TpmStructure
Serialize this object to the structure printer- Overrides:
toStringInternal
in classTpmStructure
- Parameters:
_p
- The structure accumulatord
- The data to serialize
-
numHandles
public int numHandles()
- Overrides:
numHandles
in classCmdStructure
- Returns:
- Number of TPM handles contained (as fields) in this data structure
-
numAuthHandles
public int numAuthHandles()
- Overrides:
numAuthHandles
in classReqStructure
- Returns:
- Number of authorization TPM handles contained in this data structure
-
getHandles
public TPM_HANDLE[] getHandles()
- Overrides:
getHandles
in classReqStructure
- Returns:
- An array of TPM handles contained in this TPM request data structure
-
sessEncInfo
public SessEncInfo sessEncInfo()
- Overrides:
sessEncInfo
in classCmdStructure
- Returns:
- Non-zero size info of the encryptable command/response parameter if session based encryption can be applied to this object (i.e. its first non-handle field is marshaled in size-prefixed form). Otherwise returns zero initialized struct.
-
-