In pre-3.0.0, I used this, omitting the error checking, malloc, ...

        ecPoint = EC_KEY_get0_public_key(ecKey);
        ecGroup = EC_KEY_get0_group(ecKey);
        EC_POINT_point2oct(ecGroup, ecPoint,
                           POINT_CONVERSION_UNCOMPRESSED,
                           *modulusBin, *modulusBytes, NULL);

In 3.0.0, I tried this, expecting to get a BIGNUM and then convert

            irc = EVP_PKEY_get_bn_param(eccKey, OSSL_PKEY_PARAM_PUB_KEY, 
(BIGNUM **)pub);

It returns 0.

What's the correct way to get the uncompressed ECC public key?

Reply via email to