
Infineon lifts the veto on 9678 and I added back the information to our PQC Readiness page in our TPMdev tutorials - https://github.com/tpm2dev/tpm.dev.tutorials/blob/master/PQC/pqc-ready-tpm.md
Hi everyone,
I was wondering, if it is possible to pass an encrypted data to TPM when using createprimary() or create() commands? (assuming that the decryption key for the encrypted data is already in TPM.)

Comments
Start the Conversation
Hey Varun Deshpande , commands that have first parameter of type TPM2B, like CreatePrimary and Create, can have their sensitive data and response encrypted. This is done by using Parameter Encryption. There is a key exchange between the stack and the TPM. Can you elaborate on your use case? What type of data you need encrypted and how do you use it?
Dimitar Tomov I want to pass an encrypted seed to the TPM, then it is decrypted within TPM and then used for primary key generation. :) Do you think I can pass this encrypted seed? If yes, how do I β¦more
From Imran Desai :
https://github.com/tpm2-software/tpm2-tools project @ tip of master
tpm2 createprimary -c primary.ctx
β¦more
Varun Deshpande session encryption is a generic thing. It just encrypts (session flag decrypt) the first parameter of the command and the tpm response (session flag encrypt).
β¦more
I was a bit curious, so I tried using a primary key for an encrypted session and then used that session to encrypt the secret when creating a keyedhash object, seems to work for me, code: https://pastebin.com/09fmk0b8
Imran Desai This sounds similar to sealing a secret using TPM2_Create. The secret is not used in the KDF, but it becomes part of the generated key. Or inSensitive.sensitive.data is exactly that?
Erik Larsson Primary Keys can be used as a salt when creating a TPM salted session. That session could be a parameter encryption session by settings the TPMA_SESSION_decrypt/encrypt flag :)
Yes, that's exactly what my example code does :-)