|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectiaik.tc.tss.impl.java.tsp.TcAttributes
iaik.tc.tss.impl.java.tsp.TcWorkingObject
iaik.tc.tss.impl.java.tsp.TcAuthObject
iaik.tc.tss.impl.java.tsp.TcRsaKey
public class TcRsaKey
Method Summary | |
---|---|
TcTssValidation |
certifyKey(TcIRsaKey certifyingKey,
TcTssValidation validation)
This method signs a public key inside the TPM using TcTssConstants.TSS_SS_RSASSAPKCS1V15_SHA1 ). |
void |
changeAuth(TcIAuthObject parentObject,
TcIPolicy newPolicy)
This method changes the authorization data (secret) of an entity (object) and assigns the object to the newPolicy object. |
void |
CMKConvertMigration(TcIRsaKey parentKey,
TcIMigData migrationData,
TcBlobData random)
This method completes the migration of a certified migration process. |
TcBlobData |
CMKCreateBlob(TcIRsaKey parentKey,
TcIMigData migrationData)
This method implements the first step in the process of moving a certified-migrateable-key to a new parent platform. |
void |
convertMigrationBlob(TcIRsaKey parent,
TcBlobData random,
TcBlobData migrationBlob)
This method takes the migration blob built by Tspi_Key_CreateMigrationBlob using the migration scheme TSS_MS_MIGRATE and creates a normal wrapped key. |
void |
createKey(TcIRsaKey wrappingKey,
TcIPcrComposite pcrComposite)
This method creates a key pair within the TPM and wraps it with the key addressed by wrappingKey. If the internal key structure is a 1.1 TPM key, the provided PcrComposite must be a TcTssConstants.TSS_PCRS_STRUCT_INFO . |
TcBlobData[] |
createMigrationBlob(TcIRsaKey parent,
TcTpmMigrationkeyAuth migTicket)
This method creates a migration blob of the key. |
TcBlobData |
getAttribCmkInfo(long subFlag)
This method returns CMK information as defined for TcTssConstants.TSS_TSPATTRIB_KEY_CMKINFO . |
TcBlobData |
getAttribKeyBlob(long subFlag)
This method returns key blobs as defined for TcTssConstants.TSS_TSPATTRIB_KEY_BLOB . |
TcBlobData |
getAttribKeyInfo(long subFlag)
This method returns key version information as defined for TcTssConstants.TSS_TSPATTRIB_KEY_INFO . |
long |
getAttribKeyInfoUINT32(long subFlag)
This method returns information about the key. |
TcTssVersion |
getAttribKeyInfoVersion()
This method returns the version of the key. |
TcBlobData |
getAttribKeyPcr(long subFlag)
This method returns PCR_INFO information as defined for TcTssConstants.TSS_TSPATTRIB_KEY_PCR . |
TcBlobData |
getAttribKeyPcrLong(long subFlag)
This method returns PCR_LONG information as defined for TcTssConstants.TSS_TSPATTRIB_KEY_PCR_LONG . |
long |
getAttribKeyPcrLongUINT32(long subFlag)
This method returns locality information as defined for TcTssConstants.TSS_TSPATTRIB_KEY_PCR_LONG . |
long |
getAttribKeyRegister(long subFlag)
This method returns the register the key is registered in. |
TcBlobData |
getAttribRsaKeyInfo(long subFlag)
This method returns RSA key information as defined for TcTssConstants.TSS_TSPATTRIB_RSAKEY_INFO . |
long |
getAttribRsaKeyInfoUINT32(long subFlag)
This method returns RSA key information as defined for TcTssConstants.TSS_TSPATTRIB_RSAKEY_INFO . |
TcTssUuid |
getAttribUuid()
This method returns the UUID of the key. |
TcIPolicy |
getMigrationPolicyObject()
This method returns a policy object representing the migration policy currently assigned to the object. |
TcIPolicy |
getPolicyObject(long policyType)
Note: Policy objects are returned by reference. |
TcBlobData |
getPubKey()
This method returns the public key of the key object. |
void |
loadKey(TcIRsaKey unwrappingKey)
This method loads the key blob into the TPM. |
void |
migrateKey(TcIRsaKey publicKey,
TcIRsaKey migData)
This method decrypts with assistance of the TPM the input package (e.g. |
void |
setAttribCmkInfo(long subFlag,
TcBlobData attrib)
This method sets CMK information as defined for TcTssConstants.TSS_TSPATTRIB_KEY_CMKINFO . |
void |
setAttribKeyBlob(long subFlag,
TcBlobData attrib)
This method sets RSA key information as defined for TcTssConstants.TSS_TSPATTRIB_KEY_BLOB . |
void |
setAttribKeyInfo(long subFlag,
long attrib)
This method sets key information as defined for TcTssConstants.TSS_TSPATTRIB_KEY_INFO . |
void |
setAttribRsaKeyInfo(long subFlag,
TcBlobData attrib)
This method sets RSA key information as defined for TcTssConstants.TSS_TSPATTRIB_RSAKEY_INFO . |
void |
setAttribRsaKeyInfoUINT32(long subFlag,
long attrib)
This method sets RSA key information as defined for TcTssConstants.TSS_TSPATTRIB_RSAKEY_INFO . |
void |
setAttribUuid(TcTssUuid uuid)
This method sets the UUID of the key. |
void |
unloadKey()
This method unloads the key from the TPM. |
void |
wrapKey(TcIRsaKey wrappingKey,
TcIPcrComposite pcrComposite)
This method wraps a key (created externally) with the key addressed by wrappingKey. |
Methods inherited from class iaik.tc.tss.impl.java.tsp.TcAuthObject |
---|
changeAuthAsym, getUsagePolicyObject |
Methods inherited from class iaik.tc.tss.impl.java.tsp.TcAttributes |
---|
getAttribData, getAttribUint32, setAttribData, setAttribUint32 |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface iaik.tc.tss.api.tspi.TcIAttributes |
---|
getAttribData, getAttribUint32, setAttribData, setAttribUint32 |
Methods inherited from interface iaik.tc.tss.api.tspi.TcIAuthObject |
---|
changeAuthAsym, getUsagePolicyObject |
Method Detail |
---|
public TcTssValidation certifyKey(TcIRsaKey certifyingKey, TcTssValidation validation) throws TcTssException
TcIRsaKey
TcTssConstants.TSS_SS_RSASSAPKCS1V15_SHA1
).
certifyKey
in interface TcIRsaKey
certifyingKey
- Certifying key used to sign the key.validation
- Structure of the type TcTssValidation
. After successful completion
of the call the validationData field of this structure contains the signature data of
the command. The data field of the structure contains an instance of
TcTpmCertifyInfo
or TcTpmCertifyInfo2
.
TcTssException
public void convertMigrationBlob(TcIRsaKey parent, TcBlobData random, TcBlobData migrationBlob) throws TcTssException
TcIRsaKey
convertMigrationBlob
in interface TcIRsaKey
parent
- Parent key related to the key.random
- Random data as returned together with the migration blob by the method
CreateMigrationBlob.migrationBlob
- Migration blob data as returned by a previously called method
CreateMigrationBlob.
TcTssException
public void migrateKey(TcIRsaKey publicKey, TcIRsaKey migData) throws TcTssException
TcIRsaKey
migrateKey
in interface TcIRsaKey
publicKey
- Public key to which the blob is to be migratedmigData
- Migration data key object to transfer the input and output data blob during the
migration process. The input data blob is from the previous call of the function
Tspi_CreateMigrationBlob() or Tspi_CMK_CreateBlob().
TcTssException
public void CMKConvertMigration(TcIRsaKey parentKey, TcIMigData migrationData, TcBlobData random) throws TcTssException
TcIRsaKey
CMKConvertMigration
in interface TcIRsaKey
parentKey
- The parent key related to this key object.migrationData
- Migration data key object to transfer the input and output data blob during the
migration process.random
- The random data as returned together with the migration blob by the method
Tspi_CMKCreateBlob().
TcTssException
public TcBlobData CMKCreateBlob(TcIRsaKey parentKey, TcIMigData migrationData) throws TcTssException
TcIRsaKey
CMKCreateBlob
in interface TcIRsaKey
parentKey
- The parent key related to this key object.migrationData
- Migration data key object to transfer the input and output data blob during the
migration process.
TcTssException
public void createKey(TcIRsaKey wrappingKey, TcIPcrComposite pcrComposite) throws TcTssException
TcIRsaKey
TcTssConstants.TSS_PCRS_STRUCT_INFO
. If the key is a 1.2 TPM key, the PcrComposite
must be a TcTssConstants.TSS_PCRS_STRUCT_INFO_LONG
. If a wrong combination is used, a
TcTssException
with error code TcTssErrors.TSS_E_INVALID_OBJ_ACCESS
is thrown.TcIAttributes.setAttribData(long, long, TcBlobData)
and
TcIAttributes.setAttribUint32(long, long, long)
.
createKey
in interface TcIRsaKey
wrappingKey
- The key used to wrap the newly created key.pcrComposite
- If this parameter is not omitted (i.e. set to null), the newly created key
will be bound to the PCR values described within this object.
TcTssException
public TcBlobData[] createMigrationBlob(TcIRsaKey parent, TcTpmMigrationkeyAuth migTicket) throws TcTssException
TcIRsaKey
createMigrationBlob
in interface TcIRsaKey
parent
- Parent key related to the key.migTicket
- Migration ticket (migration public key and its authorization digest). This
data previously has been returned by the method TPM.authorizeMigrationTicket()
TcTssException
public TcBlobData getPubKey() throws TcTssException
TcIRsaKey
getPubKey
in interface TcIRsaKey
TcTpmPubkey
.
TcTssException
public void loadKey(TcIRsaKey unwrappingKey) throws TcTssException
TcIRsaKey
loadKey
in interface TcIRsaKey
unwrappingKey
- The key which should be used for unwrapping.
TcTssException
public void unloadKey() throws TcTssException
TcIRsaKey
unloadKey
in interface TcIRsaKey
TcTssException
public void wrapKey(TcIRsaKey wrappingKey, TcIPcrComposite pcrComposite) throws TcTssException
TcIRsaKey
wrapKey
in interface TcIRsaKey
wrappingKey
- kKey used for wrapping.pcrComposite
- object of the type PcrComposite. If the value of the handle doesn't equal
to NULL, the key addressed by hKey will be bound to the PCR values described with this
object.
TcTssException
public TcIPolicy getPolicyObject(long policyType) throws TcTssException
TcAuthObject
TcIAuthObject.getPolicyObject(long)
.
getPolicyObject
in interface TcIAuthObject
getPolicyObject
in class TcAuthObject
policyType
- The policy type to be returned (TSS_POLICY_*)
TcTssException
public TcIPolicy getMigrationPolicyObject() throws TcTssException
getMigrationPolicyObject
in interface TcIRsaKey
TcTssException
public void changeAuth(TcIAuthObject parentObject, TcIPolicy newPolicy) throws TcTssException
TcIAuthObject
changeAuth
in interface TcIAuthObject
parentObject
- The parent object wrapping this object.newPolicy
- Policy object providing the new authorization data.
TcTssException
public TcTssVersion getAttribKeyInfoVersion() throws TcTssException
TcIRsaKey
getAttribKeyInfoVersion
in interface TcIRsaKey
TcTssException
public TcTssUuid getAttribUuid() throws TcTssException
TcIRsaKey
getAttribUuid
in interface TcIRsaKey
TcTssException
public void setAttribUuid(TcTssUuid uuid) throws TcTssException
TcIRsaKey
setAttribUuid
in interface TcIRsaKey
TcTssException
public long getAttribKeyRegister(long subFlag) throws TcTspException
TcIAttributes.getAttribUint32(long, long)
using
TcTssConstants.TSS_TSPATTRIB_KEY_REGISTER
as flag.
subFlag
- Ignored (set to 0).
TcTssConstants.TSS_TSPATTRIB_KEYREGISTER_SYSTEM
or
TcTssConstants.TSS_TSPATTRIB_KEYREGISTER_USER
or
TcTssConstants.TSS_TSPATTRIB_KEYREGISTER_NO
TcTspException
public long getAttribKeyInfoUINT32(long subFlag) throws TcTssException
TcIAttributes.getAttribUint32(long, long)
with
TcTssConstants.TSS_TSPATTRIB_KEY_INFO
as flag.
subFlag
- Valid subFlags are:
TcTssConstants.TSS_TSPATTRIB_KEYINFO_USAGE
; returns TSS_KEY_USAGE_XX
TcTssConstants.TSS_TSPATTRIB_KEYINFO_MIGRATABLE
; returns boolean vale
TcTssConstants.TSS_TSPATTRIB_KEYINFO_CMK
; returns boolean vale
TcTssConstants.TSS_TSPATTRIB_KEYINFO_REDIRECTED
; returns boolean vale
TcTssConstants.TSS_TSPATTRIB_KEYINFO_VOLATILE
; returns boolean vale
TcTssConstants.TSS_TSPATTRIB_KEYINFO_AUTHDATAUSAGE
; returns boolean vale
TcTssConstants.TSS_TSPATTRIB_KEYINFO_ALGORITHM
; returns TSS_ALG_XX
TcTssConstants.TSS_TSPATTRIB_KEYINFO_ENCSCHEME
; returns TSS_ES_XX
TcTssConstants.TSS_TSPATTRIB_KEYINFO_SIGSCHEME
; returns TSS_SS_XX
TcTssConstants.TSS_TSPATTRIB_KEYINFO_KEYFLAGS
; returns keyFlags
TcTssConstants.TSS_TSPATTRIB_KEYINFO_AUTHUSAGE
; returns authDataUsage
TcTssConstants.TSS_TSPATTRIB_KEYINFO_KEYSTRUCT
; returns
TSS_KEY_STRUCT_XX
TcTssConstants.TSS_TSPATTRIB_KEYINFO_SIZE
; returns key size in bits
TcTssException
public void setAttribKeyInfo(long subFlag, long attrib) throws TcTssException
TcTssConstants.TSS_TSPATTRIB_KEY_INFO
.
This method is an alternative to using TcIAttributes.setAttribUint32(long, long, long)
.
Note that this method is not standardized as part of the TSP Interface (TSPI).
subFlag
- Valid subFlags are:
TcTssConstants.TSS_TSPATTRIB_KEYINFO_USAGE
TcTssConstants.TSS_TSPATTRIB_KEYINFO_MIGRATABLE
TcTssConstants.TSS_TSPATTRIB_KEYINFO_REDIRECTED
TcTssConstants.TSS_TSPATTRIB_KEYINFO_VOLATILE
TcTssConstants.TSS_TSPATTRIB_KEYINFO_AUTHDATAUSAGE
TcTssConstants.TSS_TSPATTRIB_KEYINFO_ALGORITHM
TcTssConstants.TSS_TSPATTRIB_KEYINFO_ENCSCHEME
TcTssConstants.TSS_TSPATTRIB_KEYINFO_SIGSCHEME
TcTssConstants.TSS_TSPATTRIB_KEYINFO_SIZE
TcTssConstants.TSS_TSPATTRIB_KEYINFO_KEYFLAGS
TcTssConstants.TSS_TSPATTRIB_KEYINFO_AUTHUSAGE
TcTssConstants.TSS_TSPATTRIB_KEYINFO_KEYSTRUCT
attrib
- The attribute value corresponding to the given subFlag.
TcTssException
public void setAttribRsaKeyInfoUINT32(long subFlag, long attrib) throws TcTssException
TcTssConstants.TSS_TSPATTRIB_RSAKEY_INFO
. This method is an alternative to using
TcIAttributes.setAttribUint32(long, long, long)
with
Constants#TSS_TSPATTRIB_RSAKEY_INFO} as flag.
subFlag
- Valid subFlags are:
attrib
- The attribute value corresponding to the given subFlag.
TcTssException
public long getAttribRsaKeyInfoUINT32(long subFlag) throws TcTssException
TcTssConstants.TSS_TSPATTRIB_RSAKEY_INFO
. This method is an alternative to using
TcIAttributes.getAttribUint32(long, long)
with
TcTssConstants.TSS_TSPATTRIB_RSAKEY_INFO
as flag.
subFlag
- Valid subFlags are:
TcTssException
public long getAttribKeyPcrLongUINT32(long subFlag) throws TcTssException
TcTssConstants.TSS_TSPATTRIB_KEY_PCR_LONG
. This method is an alternative to using
TcIAttributes.getAttribUint32(long, long)
with Constants#TSS_TSPATTRIB_KEY_PCR_LONG} as
flag.
subFlag
- Valid subFlags are:
TcTssException
public void setAttribRsaKeyInfo(long subFlag, TcBlobData attrib) throws TcTssException
TcTssConstants.TSS_TSPATTRIB_RSAKEY_INFO
. This method is an alternative to using
TcIAttributes.setAttribData(long, long, TcBlobData)
with
TcTssConstants.TSS_TSPATTRIB_RSAKEY_INFO
as flag.
subFlag
- Valid subFlags are:
attrib
- The attribute value corresponding to the given subFlag.
TcTssException
public TcBlobData getAttribRsaKeyInfo(long subFlag) throws TcTssException
TcTssConstants.TSS_TSPATTRIB_RSAKEY_INFO
. This method is an alternative to using
TcIAttributes.getAttribData(long, long)
with
TcTssConstants.TSS_TSPATTRIB_RSAKEY_INFO
as subFlag.
subFlag
- Valid subFlags are:
TcTssException
public void setAttribKeyBlob(long subFlag, TcBlobData attrib) throws TcTssException
TcTssConstants.TSS_TSPATTRIB_KEY_BLOB
. This method is an alternative to using
TcIAttributes.setAttribData(long, long, TcBlobData)
with
TcTssConstants.TSS_TSPATTRIB_KEY_BLOB
as flag.
subFlag
- Valid subFlags are:
TcTssConstants.TSS_TSPATTRIB_KEYBLOB_BLOB
Note: When setting the key
blob, it is assumed that it is of the same structure type (1.1 vs. 1.2) as specified
in the initFlags of the key object.
TcTssConstants.TSS_TSPATTRIB_KEYBLOB_PUBLIC_KEY
TcTssConstants.TSS_TSPATTRIB_KEYBLOB_PRIVATE_KEY
attrib
- The attribute value corresponding to the given subFlag.
TcTssException
public TcBlobData getAttribKeyBlob(long subFlag) throws TcTssException
TcTssConstants.TSS_TSPATTRIB_KEY_BLOB
.
This method is an alternative to using TcIAttributes.getAttribData(long, long)
with
TcTssConstants.TSS_TSPATTRIB_KEY_BLOB
as flag.
subFlag
- Valid subFlags are:
TcTssException
public TcBlobData getAttribKeyInfo(long subFlag) throws TcTssException
TcTssConstants.TSS_TSPATTRIB_KEY_INFO
. The data returned by this method is a
TcTpmVersion struct, not a TcTssVersion struct. To get the key version field as a TcTssVersion
us getAttribKeyInfoVersion()
. This method is an alternative to using
TcIAttributes.getAttribData(long, long)
with
TcTssConstants.TSS_TSPATTRIB_KEY_INFO
as flag.
subFlag
- Valid subFlags are:
TcTssException
public TcBlobData getAttribKeyPcrLong(long subFlag) throws TcTssException
TcTssConstants.TSS_TSPATTRIB_KEY_PCR_LONG
. This method is an alternative to using
TcIAttributes.getAttribData(long, long)
with
TcTssConstants.TSS_TSPATTRIB_KEY_PCR_LONG
as flag.
subFlag
- Valid subFlags are:
TcTssException
public TcBlobData getAttribKeyPcr(long subFlag) throws TcTssException
TcTssConstants.TSS_TSPATTRIB_KEY_PCR
. This method is an alternative to using
TcIAttributes.getAttribData(long, long)
with
TcTssConstants.TSS_TSPATTRIB_KEY_PCR
as flag.
subFlag
- Valid subFlags are:
TcTssException
public void setAttribCmkInfo(long subFlag, TcBlobData attrib) throws TcTssException
TcTssConstants.TSS_TSPATTRIB_KEY_CMKINFO
. This method is an alternative to using
TcIAttributes.setAttribData(long, long, TcBlobData)
with
TcTssConstants.TSS_TSPATTRIB_KEY_CMKINFO
as flag.
subFlag
- Valid subFlags are:
TcTssConstants.TSS_TSPATTRIB_KEYINFO_CMK_MA_APPROVAL
TcTssConstants.TSS_TSPATTRIB_KEYINFO_CMK_MA_DIGEST
attrib
- The attribute value corresponding to the given subFlag.
TcTssException
public TcBlobData getAttribCmkInfo(long subFlag) throws TcTssException
TcTssConstants.TSS_TSPATTRIB_KEY_CMKINFO
. This method is an alternative to using
TcIAttributes.getAttribData(long, long)
with
TcTssConstants.TSS_TSPATTRIB_KEY_CMKINFO
as subFlag.
subFlag
- Valid subFlags are:
TcTssException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |