The latest tpm2-tools 5.8 release addresses three GitHub security advisories. One is a heap overflow in tpm2_getekcertificate, and the other is an out-of-bounds write that happens when too many sessions are in use. I donโt have information on the third advisory. Beyond the fixes, 5.8 extends EK certificate handling. It adds the option to read EK certificates from NV RAM, introduces new EK templates and supports a marshaled quote format. https://github.com/tpm2-software/tpm2-tools/releases/tag/5.8
Hi everyone, does anyone know if it is somehow possible to use same key for ECDSA and ECDH? I tried using...
Hi everyone,
does anyone know if it is somehow possible to use same key for ECDSA and ECDH? I tried using attributes (TPMA_OBJECT_SIGN_ENCRYPT | TPMA_OBJECT_DECRYPT) together but I am getting an error saying "tpm:parameter(2):unsupported or incompatible scheme" during primary key generation.
Here are my object attributes used for primary key generation:
.objectAttributes = (TPMA_OBJECT_USERWITHAUTH |
TPMA_OBJECT_DECRYPT |
TPMA_OBJECT_SIGN_ENCRYPT |
TPMA_OBJECT_FIXEDTPM |
TPMA_OBJECT_FIXEDPARENT |
TPMA_OBJECT_SENSITIVEDATAORIGIN),
Here is the scheme details:
parameters.eccDetail.scheme = {
.scheme = (TPM2_ALG_ECDH| TPM2_ALG_ECDSA),
.details = {.ecdsa = {.hashAlg = TPM2_ALG_SHA256}}},
๐
2โค๏ธ
๐
๐ก
๐
๐



Comments
Start the Conversation
Here is the key attributes matrix for reference.
I don't think you can OR two different schemes, have you tried using TPM2_ALG_NULL to not enforce any specific scheme?
I will try this
I am not sure if a Primary Key can be both singing and decrypting key. I know a Child Key can be both, but it is not a good idea cc: William Roberts
The key just needs to be a non-restricted key. So the key won't be able to be a parent key.
Erik Larsson How did you do it?
I will test it again on C ESAPI.
Query is resolved!
Erik Larsson Dimitar Tomov Thank you so much!
I confirm that If I use TPM2_ALG_NULL in the scheme for key generation, I can use this primary key for zpoint (ECDH) and also in sign (ECDSA). The only caveat is that I need to pass TPM2_ALG_ECDSA in the inScheme of sign()
Here is the code for your reference:
https://github.com/UNIRIS/tpm-core/blob/main/examples/ecdh.c
Kudos go to Erik Larsson He did the heavy lifting and testing. I was just asking questions to confirm :)