0

I am trying to write a SageMath script that multiplies two coordinates on Elliptic Curves into one common coordinate.

SageMath Elliptic curves over finite fields documentation

p = Number

M1 = EllipticCurve (GF (p), [0,7])

C1 = M1 ([x1, y1]) C2 = M1 ([x2, y2]) C3 = C1 * C2

Somewhere they wrote that using sets of the SageMath function it is possible to do this. How to do it?

Dew Debra
  • 1
  • 4
  • 2
    Before computing something, one must have a clear picture of what it is. We can add two points on an Elliptic Curve. We can multiply a point on an Elliptic curve by an integer (that's mathematically defined by repeated addition, and well-defined since addition is associative). But there is no common definition of the multiplication of two points on an Elliptic Curve, unless we also mention a generator $G$, in which case we can define that $C_1=c_1⋅G$ and $C_2=c_2⋅G$ implies by definition that $C_1*C_2=(c_1×c_2)⋅G$ where $×$ is modular multiplication modulo the order $n$ of $G$. – fgrieu Oct 20 '21 at 05:09
  • 1
    If you're trying to find an implementation of the elliptic curve group law in sagemath, it uses the "+" operator. In other words, C3=C1+C2 will set C3 equal to the combination of C1 and C2 under the elliptic curve group law. – Daniel S Oct 20 '21 at 09:38
  • @DanielS
    How do I write " + "operator and this whole formula in SageMath?
    – Dew Debra Oct 20 '21 at 09:43
  • 2
    For addition: C3 = C1 + C2 this works since you defined C1 and C1 as points. For multiplication: Does this answer your question? How do I multiply two points on an elliptic curve?, If not, please indicate your actual aim. – kelalaka Oct 20 '21 at 10:04
  • You can always [edit] your document and comment below to get it reopened, assuming of course that there is then enough information to distinguish it from the other Q/A. – Maarten Bodewes Oct 20 '21 at 13:33

0 Answers0