Redundant arguments in point_add(a, b, p, x0, y0, x1, y1)?
Hello, I would like to ask about the reasoning for having
-
aandbin the function's prototype, when the formula for calculating the sum of two points does not require them (it only needs the coordinates of both points andp). Is this to perform a sanity check and verify whether the points are on the curve before attempting to add them? -
pis required, according to the formula in the function's docstring, and hence the function expects this parameter as well. However, if I look into various sources that explain how this works (e.g. https://en.wikipedia.org/wiki/Elliptic_curve_point_multiplication#Point_addition) then there is nomod pcomponent there. Why is it required here?
This is the function I refer to: https://github.com/gdanezis/PET-Exercises/blob/master/Lab01Basics/Lab01Code.py#L91