When we run speed test for our engine code , we get:
EC key generation failure.
00C4C473627F0000:error:08000066:elliptic curve routines:ossl_ecx_key_op:invalid encoding:crypto/ec/ecx_backend.c:182:
ECDH key generation failure.
In ossl_ecx_key_op() function , ecx_key_op_t parameter may not be correct. The parameter should be KEY_OP_KEYGEN instead of KEY_OP_PUBLIC as this function is use for key generation.
Babassl branch:8.4-stable
When we run speed test for our engine code , we get: EC key generation failure. 00C4C473627F0000:error:08000066:elliptic curve routines:ossl_ecx_key_op:invalid encoding:crypto/ec/ecx_backend.c:182: ECDH key generation failure.
In ossl_ecx_key_op() function , ecx_key_op_t parameter may not be correct. The parameter should be KEY_OP_KEYGEN instead of KEY_OP_PUBLIC as this function is use for key generation.
There is a openssl ticket for similar issue: https://github.com/openssl/openssl/issues/19580
We need similar kind of fix in babassl to avoid this issue.