Hello Till,
Till Bentz wrote:
> Hello,
>
> I create a new key with the following code based on the examples:
>
> --
> TcIRsaKey signingKey =
> context.createRsaKeyObject(TcTssConstants.TSS_KEY_SIZE_2048 |
> TcTssConstants.TSS_KEY_TYPE_SIGNING
> | TcTssConstants.TSS_KEY_MIGRATABLE);
> keyUsagePolicy.assignToObject(signingKey);
> keyMigrationPolicy.assignToObject(signingKey);
> signingKey.createKey(srk, null);
> signingKey.loadKey(srk);
> --
>
> This seems to work. But how can I make this key to appear in the list
> of loaded keys of my TPM. Also this key always has the Uuid
> 00000000-0000-0000-0000-000000000000. Is that correct? It seems
> somehow strange...
> --
> MfG
> Till
At the creation of a TcIRsaKey object, no UUID is generated.
In general, UUIDs are only needed when using persistent storage. For
instance (see the code below for an example), when you register a key in
the PS, you need to provide an UUID.
TcTssUuid keyUUID = TcUuidFactory.getInstance().generateRandomUuid();
context.registerKey(key, TcTssConstants.TSS_PS_TYPE_SYSTEM, keyUuid,
TcTssConstants.TSS_PS_TYPE_SYSTEM,
See also the example code from jTpmTools, in iaik/tc/apps/jtt/keys/*,java.
Regards, Ronald
--
Ronald Toegl
IAIK, TU Graz
|