Re: Regarding "ec_GFp_simple_add" implementation

2022-08-28 Thread ChenGuang Sun
Found it! Thank you for the context info and pointer, Billy!

Charlie

On Sun, Aug 28, 2022 at 12:35 AM Billy Brumley  wrote:

> > I'm new to the ECC area and trying to understand the point addition
> here. I noticed the implementation of "ec_GFp_simple_add" is different from
> the algorithm described at Wikipedia. Does the function
> > "ec_GFp_simple_add" implement the algorithm in Wiki? Is there any
> doc/paper explaining the implementation of "ec_GFp_simple_add"?
>
> That ECC code pre-dates Wikipedia, so the answer is "no" :)
>
> I believe it is A.10.5 from P1363 or extremely similar. (A crypto standard
> from the late 90s---you'll have to do your own digging.)
>
> At a high level, it is Jacobian projective coordinates with codepath
> optimizations for mixed projective-affine inputs (if applicable).
>
> Please keep in mind the fact that this particular code uses (any form of)
> projective coordinates is only internally relevant for OpenSSL. In the
> public API, all getters / setters / etc related to projective coordinates
> were deprecated as of OpenSSL 3.0.
>
> Hope it helps,
>
> BBB


Re: Regarding "ec_GFp_simple_add" implementation

2022-08-28 Thread Billy Brumley

I'm new to the ECC area and trying to understand the point addition here. I noticed the 
implementation of "ec_GFp_simple_add" is different from the algorithm described 
at Wikipedia. Does the function
"ec_GFp_simple_add" implement the algorithm in Wiki? Is there any doc/paper explaining 
the implementation of "ec_GFp_simple_add"?


That ECC code pre-dates Wikipedia, so the answer is "no" :)

I believe it is A.10.5 from P1363 or extremely similar. (A crypto standard 
from the late 90s---you'll have to do your own digging.)


At a high level, it is Jacobian projective coordinates with codepath 
optimizations for mixed projective-affine inputs (if applicable).


Please keep in mind the fact that this particular code uses (any form of) 
projective coordinates is only internally relevant for OpenSSL. In the 
public API, all getters / setters / etc related to projective coordinates 
were deprecated as of OpenSSL 3.0.


Hope it helps,

BBB