What does EC_KEY_get0_public_key deliver?

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

 



Thanks Matt, i just assumed the BIGNUMs were the coordinates without any projection - obviously that assumption was wrong - mislead by the funtions name.

However, we're operating on brainpool curves, so the latter function should do the job. I'll lookup the parameters and try tomorrow.

MfG
-- Chris

Am 08.01.2015 um 22:43 schrieb Matt Caswell <matt at openssl.org>:

> 
> 
> On 08/01/15 17:16, Christian Weber wrote:
>> Dear OpenSSL-Users,
>> 
>> recently i found a pitfall using EC_KEY_get0_public_key(key->pkey.ec).
>> The function just returns a copy to a pointer to key->pub_key which is a
>> EC_POINT pointer.
>> The key itself is taken from a certificate using EVP_PKEY *key =
>> X509_get_pubkey(cert);
>> 
>> Fine, i assumed, these must be coordinates of the publich key in the
>> elements X and Y!
>> Both are BIGNUMS as expected.
> 
> How are you accessing the elements X and Y? The internal representation
> could be transformed and you should make sure you are using the correct
> functions to access them, i.e. one of:
> 
> EC_POINT_get_affine_coordinates_GFp
> or
> EC_POINT_get_affine_coordinates_GF2m
> 
> Which one to use depends on whether you are using a prime or binary curve.
> 
> Matt
> _______________________________________________
> openssl-users mailing list
> openssl-users at openssl.org
> https://mta.openssl.org/mailman/listinfo/openssl-users


[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