Re: Compute EC_KEY starting from X or Y coordinate only

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

 



But the y bit is indicated by the foutth parameter of 'EC_POINT_set_compressed_coordinates_GFp' function. Isn't the representation you linked different by that that I linked previously?

Luca

Thulasi Goriparthi <thulasi.goriparthi@xxxxxxxxx> ha scritto:

02 indicates y bit is 0
03 indicates y bit is 1

http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.202.2977&rep=rep1&type=pdf


Thanks,
Thulasi.

On Fri, 25 Oct 2019 at 16:50, Luca Di Mauro <luca.dimauro@xxxxxxx> wrote:


Mh, maybe I didn't understand.

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?

Luca

Billy Brumley <bbrumley@xxxxxxxxx> ha scritto:

>> Thank you! I thought they were the same.
>>
>> And given an x-only coordinate, how can I find the y coordinate? I
>> don't find the relative functions on the documentation.
>
> Well it depends on what you mean. Internally,
> EC_POINT_set_compressed_coordinates_GFp will internally automatically
> compute the y coordinate based on the y_bit argument.
>
> EC_POINT_set_compressed_coordinates_GFp(group, p, x, 0, ...
> EC_POINT_get_affine_coordinates_GFp(group, p, X0, Y0 ...
>
> That will get you one of the points in X0, Y0.
>
> EC_POINT_set_compressed_coordinates_GFp(group, p, x, 1, ...
> EC_POINT_get_affine_coordinates_GFp(group, p, X1, Y1 ...
>
> That will get you the other point in X1, Y1. (Where X0 = X1 = x.)
>
> (But you are probably looking to do something cryptographically
> interesting between set/get, which is application specific.)
>
> Generally, in addition to the man pages which you seem to have found,
> check the "tests" folder if you are looking for examples to get
> started.
>
> BBB










[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