I am new to TPM and currently working on a project that involves generating and storing serveral key pairs using tpm. I would like to know how to find an available TPM handle that can be used to save a new key pair object. I have searched for information on this topic but haven't found a clear answer.Here are some specific questions I have:
How can I programmatically determine if a TPM handle points to an empty area and is free to be used for saving a new key pair object?
Are there any specific functions or methods in the Go-TPM package that can help me with this task?
Are there any considerations or best practices I should be aware of when selecting a TPM handle for storing key pairs?
I would greatly appreciate any guidance, code examples, or references to relevant documentation that can help me understand how to find an available TPM handle for saving a new key pair object in tpm.Thank you in advance for your assistance.
Here is what I have tried:
Manually creating key pairs using specific handles like 0x81010001 or 0x81010002.
Attempting to save the key pairs in TPM persistent memory.