iaik.tc.tss.impl.java.tcs.pbg
Class TcTpmCmdCrypto
java.lang.Object
iaik.tc.tss.impl.java.tcs.pbg.TcTpmCmdCommon
iaik.tc.tss.impl.java.tcs.pbg.TcTpmCmdCrypto
public class TcTpmCmdCrypto
- extends TcTpmCmdCommon
Method Summary |
static java.lang.Object[] |
TpmCertifyKey(TcIStreamDest dest,
long certHandle,
long keyHandle,
TcTpmNonce antiReplay,
TcTcsAuth inAuth1,
TcTcsAuth inAuth2)
|
static java.lang.Object[] |
TpmCertifyKey2(TcIStreamDest dest,
long keyHandle,
long certHandle,
TcTpmDigest migrationPubDigest,
TcTpmNonce antiReplay,
TcTcsAuth inAuth1,
TcTcsAuth inAuth2)
|
static java.lang.Object[] |
TpmGetRandom(TcIStreamDest dest,
long bytesRequested)
|
static java.lang.Object[] |
TpmSHA1Complete(TcIStreamDest dest,
TcBlobData hashData)
|
static java.lang.Object[] |
TpmSHA1CompleteExtend(TcIStreamDest dest,
long pcrNum,
TcBlobData hashData)
|
static java.lang.Object[] |
TpmSHA1Start(TcIStreamDest dest)
|
static java.lang.Object[] |
TpmSHA1Update(TcIStreamDest dest,
long numBytes,
TcBlobData hashData)
|
static java.lang.Object[] |
TpmSign(TcIStreamDest dest,
long keyHandle,
TcBlobData areaToSign,
TcTcsAuth inAuth1)
|
static java.lang.Object[] |
TpmStirRandom(TcIStreamDest dest,
TcBlobData inData)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TcTpmCmdCrypto
public TcTpmCmdCrypto()
TpmSHA1Start
public static java.lang.Object[] TpmSHA1Start(TcIStreamDest dest)
throws TcTddlException,
TcTpmException
- Parameters:
dest
- The destination where the byte stream is written to.
- Returns:
- The returned Object[] holds the following elements:
- 0 ... TPM return code (Long)
- 1 ... Maximum number of bytes that can be sent to TPM_SHA1Update. Must be a
multiple of 64 bytes. (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:
- 119
TpmSHA1Update
public static java.lang.Object[] TpmSHA1Update(TcIStreamDest dest,
long numBytes,
TcBlobData hashData)
throws TcTddlException,
TcTpmException
- Parameters:
dest
- The destination where the byte stream is written to.numBytes
- The number of bytes in hashData. Must be a multiple of 64 bytes.hashData
- Bytes to be hashed
- Returns:
- The returned Object[] holds the following elements:
- 0 ... TPM return code (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:
- 121
TpmSHA1Complete
public static java.lang.Object[] TpmSHA1Complete(TcIStreamDest dest,
TcBlobData hashData)
throws TcTddlException,
TcTpmException
- Parameters:
dest
- The destination where the byte stream is written to.hashData
- Final bytes to be hashed
- Returns:
- The returned Object[] holds the following elements:
- 0 ... TPM return code (Long)
- 1 ... The output of the SHA-1 hash. (TcTpmDigest)
- 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:
- 122
TpmSHA1CompleteExtend
public static java.lang.Object[] TpmSHA1CompleteExtend(TcIStreamDest dest,
long pcrNum,
TcBlobData hashData)
throws TcTddlException,
TcTpmException
- Parameters:
dest
- The destination where the byte stream is written to.pcrNum
- Index of the PCR to be modifiedhashData
- Final bytes to be hashed
- Returns:
- The returned Object[] holds the following elements:
- 0 ... TPM return code (Long)
- 1 ... The output of the SHA-1 hash. (TcTpmDigest)
- 2 ... The PCR value after execution of thecommand. (TcTpmDigest)
- 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:
- 123
TpmSign
public static java.lang.Object[] TpmSign(TcIStreamDest dest,
long keyHandle,
TcBlobData areaToSign,
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 digital signatures.areaToSign
- The value to sign
- 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 digital signature. (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:
- 125
TpmGetRandom
public static java.lang.Object[] TpmGetRandom(TcIStreamDest dest,
long bytesRequested)
throws TcTddlException,
TcTpmException
- Parameters:
dest
- The destination where the byte stream is written to.bytesRequested
- Number of bytes to return
- Returns:
- The returned Object[] holds the following elements:
- 0 ... TPM return code (Long)
- 1 ... The returned bytes (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:
- 127
TpmStirRandom
public static java.lang.Object[] TpmStirRandom(TcIStreamDest dest,
TcBlobData inData)
throws TcTddlException,
TcTpmException
- Parameters:
dest
- The destination where the byte stream is written to.inData
- Data to add entropy to RNG state
- Returns:
- The returned Object[] holds the following elements:
- 0 ... TPM return code (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:
- 128
TpmCertifyKey
public static java.lang.Object[] TpmCertifyKey(TcIStreamDest dest,
long certHandle,
long keyHandle,
TcTpmNonce antiReplay,
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.certHandle
- Handle of the key to be used to certify the key.keyHandle
- Handle of the key to be certified.antiReplay
- 160 bits of externally supplied data (typically a nonce provided to prevent
replay-attacks)
- 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 ... TPM_CERTIFY_INFO or TcTpmCertifyInfo2 structure that provides information
relative to keyhandle (TcTpmCertifyInfo or TcTpmCertifyInfo2)
- 4 ... The signature of certifyInfo (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:
- 129
TpmCertifyKey2
public static java.lang.Object[] TpmCertifyKey2(TcIStreamDest dest,
long keyHandle,
long certHandle,
TcTpmDigest migrationPubDigest,
TcTpmNonce antiReplay,
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.keyHandle
- Handle of the key to be certified.certHandle
- Handle of the key to be used to certify the key.migrationPubDigest
- The digest of a TcTpmMsaCompositestructure, containing at least one
public key of a Migration AuthorityantiReplay
- 160 bits of externally supplied data (typically a nonce provided to prevent
replay-attacks)
- 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 ... TcTpmCertifyInfo2 relative to keyHandle (TcTpmCertifyInfo2)
- 4 ... The signed public key. (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:
- 134