Simarizing what the test does: tpm2tss-genkey -a ecdsa -s 2048 mykey openssl ec -engine tpm2tss -inform engine -in mykey -pubout -outform pem -out mykey.pub the 2nd command fails with: Engine "tpm2tss" set. read EC key unable to enable public key encoding 4027EA812D7F0000:error:030000A3:digital envelope routines:EVP_PKEY_set_params:invalid key:crypto/evp/p_lib.c:2353: