From 8eeb35615f0483e21dc48f96877a2681cf48b1ec Mon Sep 17 00:00:00 2001 From: Özgür Kesim Date: Thu, 21 Mar 2024 19:20:36 +0100 Subject: curve: simplify interface - no additive formulation --- curve/curve.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'curve/curve.go') diff --git a/curve/curve.go b/curve/curve.go index a194cde..75626bd 100644 --- a/curve/curve.go +++ b/curve/curve.go @@ -26,7 +26,7 @@ type ScalarReader[S any] interface { ScalarFromBytes([]byte) (S, error) } -type MultiplicativeCurve[S SomeScalar[s], s Data, P MPoint[S, s, p], p Data] interface { +type SomeCurve[S SomeScalar[s], s Data, P SomePoint[S, s, p], p Data] interface { ScalarReader[S] Identity() P @@ -35,7 +35,7 @@ type MultiplicativeCurve[S SomeScalar[s], s Data, P MPoint[S, s, p], p Data] int Exp(S) P } -type MPoint[S SomeScalar[s], s Data, P Data] interface { +type SomePoint[S SomeScalar[s], s Data, P Data] interface { Mult(P) P Div(P) P Inv() P @@ -43,7 +43,8 @@ type MPoint[S SomeScalar[s], s Data, P Data] interface { Equal(P) bool } -// For additive formulation of the curve, use these interfaces: +/* Additive fomulation of a curve is not needed for now. + type AdditiveCurve[S SomeScalar[s], s Data, P APoint[S, s, p], p Data] interface { ScalarReader[S] Zero() P @@ -58,4 +59,5 @@ type APoint[S SomeScalar[s], s Data, P Data] interface { Neg(P) P ScalarMult(S) P Equal(P) bool -} \ No newline at end of file +} +*/ \ No newline at end of file -- cgit v1.2.3