tpm2-software / tpm2-tss-engine

OpenSSL Engine for TPM2 devices
https://tpm2-software.github.io
BSD 3-Clause "New" or "Revised" License
149 stars 99 forks source link

Question: is there a way to test if a key handle (generated by tpm2tss-genkey) belongs to this TPM? #180

Closed danielwangksu closed 4 years ago

danielwangksu commented 4 years ago

I created a key handle using tpm2tss-genkey, is there a way (e.g. a command) to test if a key handle (generated by tpm2tss-genkey) belongs to a certain TPM? Thanks!

AndreasFuchsTPM commented 4 years ago

Unfortuantely not. If the TPM can load it, it belongs to the TPM, if not, then not.

danielwangksu commented 4 years ago

@AndreasFuchsSIT This is probably a stupid question. Do you mean use tpm2_load command? I'm not sure how to use tpm2_load with a key handle (e.g. key.tss) generated by tpm2tss-genkey

AndreasFuchsTPM commented 4 years ago

Sorry, no, loading is a part of using with the engine. So this means you have to perform an operation with the key in order to know if it fits to the TPM.