From 38694eab8985c742f6f39c1b4e99ced729fd519a Mon Sep 17 00:00:00 2001 From: Bas Westerbaan Date: Sun, 17 Jun 2018 00:09:54 +0200 Subject: [PATCH] FieldElement.Inverse: remove useless loop --- edwards25519/field.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/edwards25519/field.go b/edwards25519/field.go index 69405f9..580817d 100644 --- a/edwards25519/field.go +++ b/edwards25519/field.go @@ -468,9 +468,7 @@ func (fe *FieldElement) Inverse(a *FieldElement) *FieldElement { t0.Square(a) t1.Square(&t0) - for i = 1; i < 2; i++ { - t1.Square(&t1) - } + t1.Square(&t1) t1.Mul(a, &t1) t0.Mul(&t0, &t1) t2.Square(&t0)