Skip to content

Be more explicit with the curve in arithmetic operations #126

@tuxxy

Description

@tuxxy

What's the issue?

  1. When performing arithmetic operations on curve dependent variables (e.g. Point.__mul__), we assume that the curve is the whatever the first variable is.
  2. OpenSSL already checks that the inputs are valid for the given curve when performing curve arithmetic, but we should be much more explicit.

How to resolve?

  1. Check the curve (via its curve_nid) for each variable in the arithmetic before performing the operation. If the curves do not match, do not perform the operation and raise a TypeError (or other more related error).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions