EC_POINT_get_affine_coordinates replacement in 3.0

Chris Bare chris.bare at gmail.com
Tue May 3 18:12:42 UTC 2022


I'm converting some openssl 1.0 code to 3.0 and I don't know how to get the
coordinates
in a 3.0 way.
The old code is:
BN_CTX *ctx = BN_CTX_new ();
BIGNUM *X = NULL, *Y = NULL;
const EC_POINT *pubkey;
const EC_GROUP *group;
BN_CTX_start (ctx);
X = BN_CTX_get (ctx);
Y = BN_CTX_get (ctx);
pubkey = EC_KEY_get0_public_key ((EC_KEY *) EVP_PKEY_get0 (pkey));
group = EC_KEY_get0_group ((EC_KEY *) EVP_PKEY_get0 (cvr->sm_pkey));
EC_POINT_get_affine_coordinates_GFp (group, pubkey, X, Y, ctx)

What would be the 3.0 way to get X and Y without using deprecated functions?
-- 
Chris Bare
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mta.openssl.org/pipermail/openssl-users/attachments/20220503/f49a55e0/attachment-0001.htm>


More information about the openssl-users mailing list