On 31/05/16 20:46, Chris Bare wrote:
> Is there a public interface to access the X and Y elements of an Ecc
> public key?
> I tried:
> 
> EC_KEY *ecc;
> 
> BN_num_bytes (ecc->pub_key->X);
> 
> but get the compiler error:
> 
> error: dereferencing pointer to incomplete type ‘EC_KEY {aka struct
> ec_key_st}’

You can obtain the public key using EC_KEY_get0_public_key() and then
you can access the x and y co-ords using
EC_POINT_get_affine_coordinates_GFp() (or
EC_POINT_get_affine_coordinates_GF2m() if using a binary curve).

Matt
-- 
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users

Reply via email to