Package tss.tpm

Class 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 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 byte[] toTpm()
        Deprecated.
        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.
        Use fromBytes(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 class TpmStructure
        Parameters:
        _p - The structure accumulator
        d - The data to serialize
      • numHandles

        public int numHandles()
        Overrides:
        numHandles in class CmdStructure
        Returns:
        Number of TPM handles contained (as fields) in this data structure
      • numAuthHandles

        public int numAuthHandles()
        Overrides:
        numAuthHandles in class ReqStructure
        Returns:
        Number of authorization TPM handles contained in this data structure
      • getHandles

        public TPM_HANDLE[] getHandles()
        Overrides:
        getHandles in class ReqStructure
        Returns:
        An array of TPM handles contained in this TPM request data structure
      • sessEncInfo

        public SessEncInfo sessEncInfo()
        Overrides:
        sessEncInfo in class CmdStructure
        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.