Skip to content

Redundant arguments in point_add(a, b, p, x0, y0, x1, y1)? #3

@ralienpp

Description

@ralienpp

Hello, I would like to ask about the reasoning for having

  1. a and b in 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 and p). Is this to perform a sanity check and verify whether the points are on the curve before attempting to add them?

  2. p is 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 no mod p component 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions