Open jingkang99 opened 2 years ago
creates an ECDSA key using the TPM, signs a data file using the TPM and validates the signature:
tpm2tss-genkey -a ecdsa mykey OK
openssl pkeyutl -engine tpm2tss -keyform engine -inkey mykey -sign -in mydata -out mysig engine "tpm2tss" set. Public Key operation error 140354988619072:error:8007806B:tpm2-tss-engine:ecdsa_sign:Unknown padding scheme requested:src/tpm2-tss-engine-ecc.c:374: 140354988619072:error:8007406F:tpm2-tss-engine:esys_ctx_free:Some unknown error occurred:src/tpm2-tss-engine-common.c:106:
cat mykey
-----BEGIN TSS2 PRIVATE KEY----- MIHwBgZngQUKAQOgAwEB/wIEQAAAAQRYAFYAIwALAAQEcgAAABAAEAADABAAIJHe XjpJJKTrljljplP8NPh5CKZ6EKVJ1sfAg9R32sF2ACDoGKhJO/bqlnh0wbzcaboG xM88611ygDykygksLdfuiASBgAB+ACDRA99DXQ6ndEbXTrl3arAkrtAyPSZeH9F8 gHQd9Juz2gAQmYWAEacFreB2AKGL5DivZNUVl8jiiP9lLwn1EO7jlEelb6eySEgl LTNJlEAY0kmxFGv8q4+7Xa9ksPKmI7owM7oDx+llIULzMB2Ps3rDYBUhra1b6HpE 4l4g
This is weird. P.S. the key you posted is incomplete. Would you mind sending the complete key so I can decode it and have a look ?
creates an ECDSA key using the TPM, signs a data file using the TPM and validates the signature:
tpm2tss-genkey -a ecdsa mykey OK
openssl pkeyutl -engine tpm2tss -keyform engine -inkey mykey -sign -in mydata -out mysig engine "tpm2tss" set. Public Key operation error 140354988619072:error:8007806B:tpm2-tss-engine:ecdsa_sign:Unknown padding scheme requested:src/tpm2-tss-engine-ecc.c:374: 140354988619072:error:8007406F:tpm2-tss-engine:esys_ctx_free:Some unknown error occurred:src/tpm2-tss-engine-common.c:106:
cat mykey
-----BEGIN TSS2 PRIVATE KEY----- MIHwBgZngQUKAQOgAwEB/wIEQAAAAQRYAFYAIwALAAQEcgAAABAAEAADABAAIJHe XjpJJKTrljljplP8NPh5CKZ6EKVJ1sfAg9R32sF2ACDoGKhJO/bqlnh0wbzcaboG xM88611ygDykygksLdfuiASBgAB+ACDRA99DXQ6ndEbXTrl3arAkrtAyPSZeH9F8 gHQd9Juz2gAQmYWAEacFreB2AKGL5DivZNUVl8jiiP9lLwn1EO7jlEelb6eySEgl LTNJlEAY0kmxFGv8q4+7Xa9ksPKmI7owM7oDx+llIULzMB2Ps3rDYBUhra1b6HpE 4l4g