|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
public interface TssHighLevel
A high level interface to the TPM.
| Method Summary | |
|---|---|
byte[] |
activateAik(TCPAIdentityCredential cred,
int keyHandle,
java.lang.String keyPass,
java.lang.String ownerPass)
Read the response of an ca. |
byte[] |
attestPcr(int[] pcrs,
byte[] nounce,
int keyHandle,
java.lang.String keyAuth)
Attests the current state of your pcrs. |
void |
changeAuth(java.lang.String ownerKey,
int selectPassword,
java.lang.String newPass)
This will change a password on the TPM. |
byte[] |
computeSha1(java.io.InputStream is)
Reads all available data and computes the sha1sum over this data. |
byte[] |
computeSha1ToPcr(int pcrId,
java.io.InputStream is)
Reads all available data and computes the sha1sum over this data. |
int |
createAndStoreKey(int parentKeyHandle,
java.lang.String parentAuth,
java.lang.String keyAuth)
Generate a new key and store it inside the tpm. |
TPMKeyWrapper |
createKey(int parentKeyHandle,
java.lang.String parentAuth,
java.lang.String keyAuth)
Generate a key. |
void |
decryptFile(int parentKeyHandle,
java.lang.String parentAuth,
java.lang.String keyAuth,
java.io.InputStream fileIn,
java.io.OutputStream fileOut)
Decrypt a file which was encrypted using encryptFile. |
void |
dropKey(int keyId)
Delete a key from the TPM. |
void |
encryptFile(int parentKeyHandle,
java.lang.String parentAuth,
java.lang.String keyAuth,
java.io.InputStream fileIn,
java.io.OutputStream fileOut)
Encrypt a file, or any kind of InputStream. |
int |
generateAIK(byte[] caId,
java.lang.String caLabel,
java.lang.String ownerPass,
java.lang.String srkPass,
java.lang.String newKeyPass,
java.security.PublicKey caPubKey,
java.io.OutputStream reqestStream,
byte[] ek,
byte[] pc,
byte[] cc)
Generate a new AIK. |
java.util.Random |
getTpmRandom()
|
int |
storeKey(int parentKeyHandle,
java.lang.String parentAuth,
TPMKeyWrapper myKey)
Store a previously generated key inside the tpm. |
TPMKeyWrapper |
takeOwnership(java.lang.String ownerKey,
java.lang.String srkKey)
Take the ownership of the TPM. |
| Method Detail |
|---|
byte[] computeSha1(java.io.InputStream is)
throws java.io.IOException,
TPMException
is - An InputStream to read data from. The stream will not
be closed, when EOF is reached.
java.io.IOException - If reading from is fails.
TPMException - If something on the tpm goes wrong.
byte[] computeSha1ToPcr(int pcrId,
java.io.InputStream is)
throws java.io.IOException,
TPMException
pcrId - The id of the pcr where the hash will be stored.is - An InputStream to read data from. The stream will not
be closed, when EOF is reached.
java.io.IOException - If reading from is fails.
TPMException - If something on the tpm goes wrong.java.util.Random getTpmRandom()
TPMKeyWrapper takeOwnership(java.lang.String ownerKey,
java.lang.String srkKey)
ownerKey - The owner auth secret.srkKey - The storage root key. This can be null too.
void changeAuth(java.lang.String ownerKey,
int selectPassword,
java.lang.String newPass)
ownerKey - The old password.selectPassword - 1 for ownerAuth, 2 for srkAuth.newPass - The new password.
void encryptFile(int parentKeyHandle,
java.lang.String parentAuth,
java.lang.String keyAuth,
java.io.InputStream fileIn,
java.io.OutputStream fileOut)
parentKeyHandle - A handle of a key to use as a parent key.parentAuth - The secret which was used to protect the parent key.keyAuth - A secret which will be used to protect the key for the file.fileIn - A InputStream to read the data to be encrypted from.fileOut - Where to write the encrypted data.
void decryptFile(int parentKeyHandle,
java.lang.String parentAuth,
java.lang.String keyAuth,
java.io.InputStream fileIn,
java.io.OutputStream fileOut)
parentKeyHandle - A handle of a key to use as a parent key.parentAuth - The secret which was used to protect the parent key.keyAuth - A secret which will be used to protect the key for the file.fileIn - A InputStream to read the data to be encrypted from.fileOut - Where to write the encrypted data.void dropKey(int keyId)
keyId - the keyhandle of the key.
int createAndStoreKey(int parentKeyHandle,
java.lang.String parentAuth,
java.lang.String keyAuth)
parentKeyHandle - The parent key handle, this kan be the SRK too.parentAuth - The authentication data of the parent key.keyAuth - The authentication data for the new key.
TPMKeyWrapper createKey(int parentKeyHandle,
java.lang.String parentAuth,
java.lang.String keyAuth)
parentKeyHandle - The parent key handle, this kan be the SRK too.parentAuth - The authentication data of the parent key.keyAuth - The authentication data for the new key.
int storeKey(int parentKeyHandle,
java.lang.String parentAuth,
TPMKeyWrapper myKey)
parentKeyHandle - The parent key handle, this kan be the SRK too.parentAuth - The authentication data of the parent key.myKey - The key to tore.
byte[] attestPcr(int[] pcrs,
byte[] nounce,
int keyHandle,
java.lang.String keyAuth)
pcrs - The pcrs to use int the attestion.nounce - The nounce from the remote side.keyHandle - The key to use, this should be an aik.keyAuth - The password for the key.
int generateAIK(byte[] caId,
java.lang.String caLabel,
java.lang.String ownerPass,
java.lang.String srkPass,
java.lang.String newKeyPass,
java.security.PublicKey caPubKey,
java.io.OutputStream reqestStream,
byte[] ek,
byte[] pc,
byte[] cc)
caId - The id of the ca, which should sign it.caLabel - The label of the ca, which should sign it.ownerPass - Your owner password.srkPass - Your srk password.newKeyPass - The password to protect the new aik.caPubKey - The public key of the ca.reqestStream - A Stream where the request will be written to.ek - The endorsement credential.pc - The plattform credential.cc - The conformance credential.
byte[] activateAik(TCPAIdentityCredential cred,
int keyHandle,
java.lang.String keyPass,
java.lang.String ownerPass)
cred - The credentials, send from the ca.keyHandle - The keyhandle of the AIK which was used to generate
the request.keyPass - The password of the AIK.ownerPass - The owner password.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||