ec subtract

Sree Harsha Totakura sreeharsha at totakura.in
Thu Jul 10 21:12:05 CEST 2014


On 07/10/2014 07:35 PM, Christian Grothoff wrote:
>> for the ECBD I need to subtract two points on the curve (Z_{i+1} - Z_{i-1}). I
>> found out[0], that I have to invert the y value of the second point to achieve
>> this. However in libgcrypt (1.6.1) there seems to be no function, which achieves
>> that easily[1]. Do I really have to use gcry_mpi_point_get, gcry_mpi_sub and
>> gcry_mpi_point_set to invert the point?

Or, you can add point B to point at infinity, (0, 1, 0) in jacobian
coordinates, and then add the result to A to get A - B.

So, this could be done as: A + B + INFINITY.

Note that simply inverting the affine y value won't be correct for some
curves.

Sree



More information about the Gcrypt-devel mailing list