0

Lets say we have a key hierarchy as follows:

SRK -> SK1 -> SK2 -> BK

With the public part of BK, I decrypt a symmetric AES key. For a proper decryption, the private key of SK2 is needed in the TPM. To obtain the private key SK2 the private key of SK1 is needed and for SK1 the private key of SRK is needed.

Tspi_Key_LoadKey() is used to load a key into the TPM and takes the key itself and its parent as its arguments.

Let's say I would load BK and its parent SK2 into the TPM. The TPM wouldn't be able to decrypt BK because for that the private key of SK2 is needed. SK2 can only be decrypted if SK1 is known to the TPM which is not.

How is the procedure for this example to decrypt BK in the TPM?

Idea 1:

  1. Load SK1 with parent SRK into TPM (SK1 can be decrypted with SRK)
  2. Load SK2 with parent SK1 into TPM (SK2 can be decrypted with SK1)
  3. (optional) Unload SK1 because it's not needed anymore
  4. Load BK with parent SK2 into TPM (BK can be decrypted with SK2)
  5. (optional) Unload SK2 because it's not needed anymore

Idea 2 (whole chain must be in TPM at once):

  1. Load BK with parent SK2 into TPM
  2. Load SK2 with parent SK1 into TPM
  3. Load SK1 with parent SRK into TPM
Vilican
  • 2,703
  • 8
  • 21
  • 35
fliX
  • 153
  • 6

1 Answers1

0

I wrote some code in order to get an answer to my question. The general logic of the TPM is as as simple as follows:

  • The parent key always has to be loaded in the TPM in order to load a child key.

That means that Idea 1 is completely valid (including the optional steps) and Idea 2 is not. BK with parent SK2 cannot be loaded as SK2 hasnt been loaded previously.

So basically the TPM needs only 3 slots in order to build endless key hierarchies. Generally a TPM still owns more than 3 slots (e.g. my TPM has 32 slots).

fliX
  • 153
  • 6