I have some private keys stored in the HSM but without public keys. I want to get the corresponding public key using PKCS11 interface.
If the private key is a RSA key, I can extract the modulus from CKA_MODULUS and exponent from CKA_PUBLIC_EXPONENT, and then construct the public key with these two numbers.
However, when it comes to ECDSA(or DSA) keys, how can I achieve the same goal?
CKA_EC_POINT attribute is not available for private keys.
I think the only useful information I can get is its curve parameters from CKA_EC_PARAMS, which is not enough to get the public point.