iaik.tc.tss.impl.java.tcs.pbg
Class TcTpmCmdStorage

java.lang.Object
  extended by iaik.tc.tss.impl.java.tcs.pbg.TcTpmCmdCommon
      extended by iaik.tc.tss.impl.java.tcs.pbg.TcTpmCmdStorage

public class TcTpmCmdStorage
extends TcTpmCmdCommon


Constructor Summary
TcTpmCmdStorage()
           
 
Method Summary
static java.lang.Object[] TpmCreateWrapKey(TcIStreamDest dest, long parentHandle, TcTpmEncauth dataUsageAuth, TcTpmEncauth dataMigrationAuth, TcITpmKeyNew keyInfo, TcTcsAuth inAuth1)
           
static java.lang.Object[] TpmGetPubKey(TcIStreamDest dest, long keyHandle, TcTcsAuth inAuth1)
           
static java.lang.Object[] TpmLoadKey2(TcIStreamDest dest, long parentHandle, TcITpmKey inKey, TcTcsAuth inAuth1)
           
static java.lang.Object[] TpmSeal(TcIStreamDest dest, long keyHandle, TcTpmEncauth encAuth, TcITpmPcrInfo pcrInfo, TcBlobData inData, TcTcsAuth inAuth1)
           
static java.lang.Object[] TpmSealx(TcIStreamDest dest, long keyHandle, TcTpmEncauth encAuth, TcTpmPcrInfoLong pcrInfo, TcBlobData inData, TcTcsAuth inAuth1)
           
static java.lang.Object[] TpmUnBind(TcIStreamDest dest, long keyHandle, TcBlobData inData, TcTcsAuth inAuth1)
           
static java.lang.Object[] TpmUnseal(TcIStreamDest dest, long parentHandle, TcITpmStoredData inData, TcTcsAuth inAuth1, TcTcsAuth inAuth2)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TcTpmCmdStorage

public TcTpmCmdStorage()
Method Detail

TpmSeal

public static java.lang.Object[] TpmSeal(TcIStreamDest dest,
                                         long keyHandle,
                                         TcTpmEncauth encAuth,
                                         TcITpmPcrInfo pcrInfo,
                                         TcBlobData inData,
                                         TcTcsAuth inAuth1)
                                  throws TcTddlException,
                                         TcTpmException
Parameters:
dest - The destination where the byte stream is written to.
inAuth1 - Authorization values for first authorization session.
keyHandle - Handle of a loaded key that can perform seal operations.
encAuth - The encrypted AuthData for the sealed data.
pcrInfo - The PCR selection information. The caller MAY use TcTpmPcrInfoLong.
inData - The data to be sealed to the platform and any specified PCRs
Returns:
The returned Object[] holds the following elements:
  • 0 ... TPM return code (Long)
  • 1 ... outgoing authorization for session containing new nonceEven (TcTpmAuth)
  • 2 ... Encrypted, integrity-protected data object that is the result of the TPM_Seal operation. (TcTpmStoredData)
Throws:
TcTpmException - This exception indicates that a TPM error has occurred. The specific error code id held by the exception.
TcTddlException
TPM 1.2 Spec, page number:
59

TpmUnseal

public static java.lang.Object[] TpmUnseal(TcIStreamDest dest,
                                           long parentHandle,
                                           TcITpmStoredData inData,
                                           TcTcsAuth inAuth1,
                                           TcTcsAuth inAuth2)
                                    throws TcTddlException,
                                           TcTpmException
Parameters:
dest - The destination where the byte stream is written to.
inAuth1 - Authorization values for first authorization session.
inAuth2 - Authorization values for second authorization session.
parentHandle - Handle of a loaded key that can unseal the data.
inData - The encrypted data generated by TPM_Seal.
Returns:
The returned Object[] holds the following elements:
  • 0 ... TPM return code (Long)
  • 1 ... outgoing authorization for 1st session containing new nonceEven (TcTpmAuth)
  • 2 ... outgoing authorization for 2nd session containing new nonceEven (TcTpmAuth)
  • 3 ... Decrypted data that had been sealed (TcBlobData)
Throws:
TcTpmException - This exception indicates that a TPM error has occurred. The specific error code id held by the exception.
TcTddlException
TPM 1.2 Spec, page number:
63

TpmUnBind

public static java.lang.Object[] TpmUnBind(TcIStreamDest dest,
                                           long keyHandle,
                                           TcBlobData inData,
                                           TcTcsAuth inAuth1)
                                    throws TcTddlException,
                                           TcTpmException
Parameters:
dest - The destination where the byte stream is written to.
inAuth1 - Authorization values for first authorization session.
keyHandle - The keyHandle identifier of a loaded key that can perform UnBindoperations.
inData - Encrypted blob to be decrypted
Returns:
The returned Object[] holds the following elements:
  • 0 ... TPM return code (Long)
  • 1 ... outgoing authorization for session containing new nonceEven (TcTpmAuth)
  • 2 ... The resulting decrypted data. (TcBlobData)
Throws:
TcTpmException - This exception indicates that a TPM error has occurred. The specific error code id held by the exception.
TcTddlException
TPM 1.2 Spec, page number:
67

TpmCreateWrapKey

public static java.lang.Object[] TpmCreateWrapKey(TcIStreamDest dest,
                                                  long parentHandle,
                                                  TcTpmEncauth dataUsageAuth,
                                                  TcTpmEncauth dataMigrationAuth,
                                                  TcITpmKeyNew keyInfo,
                                                  TcTcsAuth inAuth1)
                                           throws TcTddlException,
                                                  TcTpmException
Parameters:
dest - The destination where the byte stream is written to.
inAuth1 - Authorization values for first authorization session.
parentHandle - Handle of a loaded key that can perform key wrapping.
dataUsageAuth - Encrypted usage AuthData for thesealed data.
dataMigrationAuth - Encrypted migration AuthData forthe sealed data.
keyInfo - Information about key to be created, pubkey.keyLength and keyInfo.encData elements are 0. This structure may be TcTpmKey or TcTpmKey12.
Returns:
The returned Object[] holds the following elements:
  • 0 ... TPM return code (Long)
  • 1 ... outgoing authorization for session containing new nonceEven (TcTpmAuth)
  • 2 ... The TcTpmKey or TcTpmKey12 object which includes the public and encrypted private key.
Throws:
TcTpmException - This exception indicates that a TPM error has occurred. The specific error code id held by the exception.
TcTddlException
TPM 1.2 Spec, page number:
70

TpmLoadKey2

public static java.lang.Object[] TpmLoadKey2(TcIStreamDest dest,
                                             long parentHandle,
                                             TcITpmKey inKey,
                                             TcTcsAuth inAuth1)
                                      throws TcTddlException,
                                             TcTpmException
Parameters:
dest - The destination where the byte stream is written to.
inAuth1 - Authorization values for first authorization session.
parentHandle - TPM handle of parent key.
inKey - Incoming key object, both encrypted private and clear public portions. This may be of type TcTpmKey or TcTpmKey12.
Returns:
The returned Object[] holds the following elements:
  • 0 ... TPM return code (Long)
  • 1 ... outgoing authorization for session containing new nonceEven (TcTpmAuth)
  • 2 ... Internal TPM handle where decrypted key was loaded. (long)
Throws:
TcTpmException - This exception indicates that a TPM error has occurred. The specific error code id held by the exception.
TcTddlException
TPM 1.2 Spec, page number:
73

TpmGetPubKey

public static java.lang.Object[] TpmGetPubKey(TcIStreamDest dest,
                                              long keyHandle,
                                              TcTcsAuth inAuth1)
                                       throws TcTddlException,
                                              TcTpmException
Parameters:
dest - The destination where the byte stream is written to.
inAuth1 - Authorization values for first authorization session.
keyHandle - TPM handle of key.
Returns:
The returned Object[] holds the following elements:
  • 0 ... TPM return code (Long)
  • 1 ... outgoing authorization for session containing new nonceEven (TcTpmAuth)
  • 2 ... Public portion of key in keyHandle. (TcTpmPubkey)
Throws:
TcTpmException - This exception indicates that a TPM error has occurred. The specific error code id held by the exception.
TcTddlException
TPM 1.2 Spec, page number:
79

TpmSealx

public static java.lang.Object[] TpmSealx(TcIStreamDest dest,
                                          long keyHandle,
                                          TcTpmEncauth encAuth,
                                          TcTpmPcrInfoLong pcrInfo,
                                          TcBlobData inData,
                                          TcTcsAuth inAuth1)
                                   throws TcTddlException,
                                          TcTpmException
Parameters:
dest - The destination where the byte stream is written to.
inAuth1 - Authorization values for first authorization session.
keyHandle - Handle of a loaded key that can perform seal operations.
encAuth - The encrypted AuthData for the sealed data.
pcrInfo - MUST use TcTpmPcrInfoLong.
inData - The data to be sealed to the platform and any specified PCRs
Returns:
The returned Object[] holds the following elements:
  • 0 ... TPM return code (Long)
  • 1 ... outgoing authorization for session containing new nonceEven (TcTpmAuth)
  • 2 ... Encrypted, integrity-protected data object that is the result of the TPM_Sealx operation. (TcTpmStoredData)
Throws:
TcTpmException - This exception indicates that a TPM error has occurred. The specific error code id held by the exception.
TcTddlException
TPM 1.2 Spec, page number:
82