Compute EC_KEY starting from X or Y coordinate only

Luca Di Mauro luca.dimauro at cnit.it
Sat Oct 26 07:50:37 UTC 2019


I checked the 'test' folder but I didn't found any tests that help me  
in this case.

However the only doubt is how I can use the API offered by openssl library.
I understand how retreive a point (and consequently to assign it to a  
public key) starting from a compressed-y representation (which belongs  
to this standard  
https://tools.ietf.org/id/draft-jivsov-ecc-compact-05.html).

My doubt now is how to obtain a point (x,y) given the coordinate,  
which means resolve the equation y^2= x^3 + ax + b.
Can you give me some tips to found a solution?

Luca

Billy Brumley <bbrumley at gmail.com> ha scritto:

>> If I have an x-point which follows this representation
>> https://tools.ietf.org/id/draft-jivsov-ecc-compact-05.html (so it is
>> composed by 33 byte and first byte is '0x02') and I use
>> 'EC_POINT_set_compressed_coordinates_GFp' function, it will be
>> considered as compressed-y-0 or compressed-y-1? Or it is correctly
>> considered as the x coordinate?
>
> What you are saying and what you are doing are two different things.
>
> Your code is at a very low level.
>
> Above this there is some encoding of points, depending on any number
> of standards. OpenSSL implements some of them, but at a higher level.
>
> The low level API you're talking about provides maximum flexibility to
> map that high level encoding in to the API's "x-coord + y-bit"
> concept. It's up to you to figure out the details. (Including
> determining if the encoding in OpenSSL matches what's expected in your
> spec.)
>
> You need to play around a bit with the lib -- you can't expect this
> list to interpret the standard for you. Check the "test" folder for
> sample code.
>
> BBB





More information about the openssl-users mailing list