Wouldn't it have been simpler to name these function pointers just projective instead of Jprojective?
This way, EC methods that use different projective system than jacobian could have their own implementation to set/get projective co-ordinates and use these function pointers without confusion. Another reason for this is, new EC methods that get implemented would take existing simple EC method as reference and steal as much code (as many functions) as possible from it. In simple EC method, set_affine_coordinates would internally call set_projective_coordinates with Z as 1. One cannot stick to this code, and leave set_projective function unset at the same time. Here, change is necessary to call the internal function instead of the function pointer that sets x, y, 1 to X, Y, Z. On Wed, Jul 16, 2014 at 4:48 PM, Bodo Moeller <bmoel...@acm.org> wrote: > balaji marisetti <balajimarise...@gmail.com>: > > > >> In the EC_METHOD structure, the pointers to methods for converting >> between affine and projective coordinates are named: >> >> `point_set_Jprojective_coordinates_GFp` and >> `point_get_Jprojective_coordinates_GFp` >> >> Does that mean any implementation of EC_METHOD (for prime curves) can >> only use Jacobian coordinates? Is it not possible to use some other >> coordinate system (may be homogeneous)? > > > This method name just means that the EC_METHOD implementation should > support setting points based on Jacobian coordinates. Internally, it might > convert them to something else. (Or, the EC_METHOD could entirely omit > support for this method. Typical usage of the ECC library won't depend on > this.) > > Bodo > >