In this link, EC_POINT_add refers to add() function. Can anyone tell me where add() function is defined in this library? I need to understand how OpenSSL performs point addition in Projective coordinates.
Asked
Active
Viewed 16 times
0
-
There is no `add()` function. There is an `add` _field_ in an EC_METHOD struct which _points_ to a function; you tagged secp256k1 which normally uses one of two EC_METHODs (from EC_GFp_mont_method in ecp_mont.c or EC_GFp_nist_method in ecp_nist.c) both of which have `add` pointing to [`ossl_ec_GFp_simple_add` in ecp_smpl.c](https://github.com/openssl/openssl/blob/a024ab984e540bff65d25407496c34b3567b55a7/crypto/ec/ecp_smpl.c#L613) but other curves may (and GF2m curves _must_) be different. – dave_thompson_085 Jul 18 '23 at 13:25
-
@dave_thompson_085 Thank you for that. I will check it out.. Point addition is openssl is very fast. Compared to code which i wrote following this [link](https://www.nayuki.io/page/elliptic-curve-point-addition-in-projective-coordinates#:~:text=Affine%20coordinates%20are%20the%20conventional,concise%20and%20easy%20to%20follow), my code was very slow. – Nikhil Srinivas Jul 18 '23 at 17:21