Next: Key generation, Up: Trusted Platform Module [Contents][Index]
The RSA keys in the TPM module may either be stored in a flash memory within TPM or stored in a file in disk. In the former case the key can provide operations as with PKCS #11 and is identified by a URL. The URL is described in [TPMURI] and is of the following form.
tpmkey:uuid=42309df8-d101-11e1-a89a-97bb33c23ad1;storage=user
It consists from a unique identifier of the key as well as the part of the flash memory the key is stored at. The two options for the storage field are ‘user’ and ‘system’. The user keys are typically only available to the generating user and the system keys to all users. The stored in TPM keys are called registered keys.
The keys that are stored in the disk are exported from the TPM but in an encrypted form. To access them two passwords are required. The first is the TPM Storage Root Key (SRK), and the other is a key-specific password. Also those keys are identified by a URL of the form:
tpmkey:file=/path/to/file
When objects require a PIN to be accessed the same callbacks as with PKCS #11 objects are expected (see Accessing objects that require a PIN). Note that the PIN function may be called multiple times to unlock the SRK and the specific key in use. The label in the key function will then be set to ‘SRK’ when unlocking the SRK key, or to ‘TPM’ when unlocking any other key.