diff options
author | Özgür Kesim <oec@codeblau.de> | 2024-03-21 19:20:36 +0100 |
---|---|---|
committer | Özgür Kesim <oec@codeblau.de> | 2024-03-21 19:20:36 +0100 |
commit | 8eeb35615f0483e21dc48f96877a2681cf48b1ec (patch) | |
tree | 46a1d6f92cca10cc5d7585e5fa85fedfaaece119 /curve/curve.go | |
parent | 00c59198893ba034fda5dda167bed495a7d4649f (diff) |
curve: simplify interface - no additive formulation
Diffstat (limited to 'curve/curve.go')
-rw-r--r-- | curve/curve.go | 10 |
1 files changed, 6 insertions, 4 deletions
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 |