<div dir="ltr">02 indicates y bit is 0<div>03 indicates y bit is 1</div><div><br></div><div><a href="http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.202.2977&rep=rep1&type=pdf">http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.202.2977&rep=rep1&type=pdf</a>  <br></div><div><br></div><div>Thanks,</div><div>Thulasi.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 25 Oct 2019 at 16:50, Luca Di Mauro <<a href="mailto:luca.dimauro@cnit.it">luca.dimauro@cnit.it</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
Mh, maybe I didn't understand.<br>
<br>
If I have an x-point which follows this representation  <br>
<a href="https://tools.ietf.org/id/draft-jivsov-ecc-compact-05.html" rel="noreferrer" target="_blank">https://tools.ietf.org/id/draft-jivsov-ecc-compact-05.html</a> (so it is  <br>
composed by 33 byte and first byte is '0x02') and I use  <br>
'EC_POINT_set_compressed_coordinates_GFp' function, it will be  <br>
considered as compressed-y-0 or compressed-y-1? Or it is correctly  <br>
considered as the x coordinate?<br>
<br>
Luca<br>
<br>
Billy Brumley <<a href="mailto:bbrumley@gmail.com" target="_blank">bbrumley@gmail.com</a>> ha scritto:<br>
<br>
>> Thank you! I thought they were the same.<br>
>><br>
>> And given an x-only coordinate, how can I find the y coordinate? I<br>
>> don't find the relative functions on the documentation.<br>
><br>
> Well it depends on what you mean. Internally,<br>
> EC_POINT_set_compressed_coordinates_GFp will internally automatically<br>
> compute the y coordinate based on the y_bit argument.<br>
><br>
> EC_POINT_set_compressed_coordinates_GFp(group, p, x, 0, ...<br>
> EC_POINT_get_affine_coordinates_GFp(group, p, X0, Y0 ...<br>
><br>
> That will get you one of the points in X0, Y0.<br>
><br>
> EC_POINT_set_compressed_coordinates_GFp(group, p, x, 1, ...<br>
> EC_POINT_get_affine_coordinates_GFp(group, p, X1, Y1 ...<br>
><br>
> That will get you the other point in X1, Y1. (Where X0 = X1 = x.)<br>
><br>
> (But you are probably looking to do something cryptographically<br>
> interesting between set/get, which is application specific.)<br>
><br>
> Generally, in addition to the man pages which you seem to have found,<br>
> check the "tests" folder if you are looking for examples to get<br>
> started.<br>
><br>
> BBB<br>
<br>
<br>
<br>
</blockquote></div>