Access to ECC X and Y

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux