From fbfe49cfc2edf9d8ae6383cb4f005b6d8c43257d Mon Sep 17 00:00:00 2001 From: Youssef El Housni Date: Fri, 3 Mar 2023 10:17:30 +0100 Subject: [PATCH] perf(stark-curve): no subgroup check on prime-order curve --- ecc/stark-curve/g1.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ecc/stark-curve/g1.go b/ecc/stark-curve/g1.go index dd806bd9dc..848c036ef9 100644 --- a/ecc/stark-curve/g1.go +++ b/ecc/stark-curve/g1.go @@ -393,10 +393,7 @@ func (p *G1Jac) IsOnCurve() bool { // IsInSubGroup returns true if p is on the r-torsion, false otherwise. func (p *G1Jac) IsInSubGroup() bool { - var res G1Jac - res.ScalarMultiplication(&res, fr.Modulus()) - - return res.IsOnCurve() && res.Z.IsZero() + return p.IsOnCurve() }