From 851af4f1bc079e6da87197fe603a40982230c1e6 Mon Sep 17 00:00:00 2001 From: Paul Miller Date: Sat, 8 Apr 2023 19:23:35 +0000 Subject: [PATCH] weierstrass: adjust 1 line --- src/abstract/weierstrass.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/abstract/weierstrass.ts b/src/abstract/weierstrass.ts index dfaf975..82ef77b 100644 --- a/src/abstract/weierstrass.ts +++ b/src/abstract/weierstrass.ts @@ -1118,7 +1118,7 @@ export function SWUFpSqrtRatio(Fp: mod.IField, Z: T) { tv3 = Fp.cmov(tv2, tv3, isQR); // 15. tv3 = CMOV(tv2, tv3, isQR) tv4 = Fp.cmov(tv5, tv4, isQR); // 16. tv4 = CMOV(tv5, tv4, isQR) // 17. for i in (c1, c1 - 1, ..., 2): - for (let i = c1; i > 1; i--) { + for (let i = c1; i > _1n; i--) { let tv5 = _2n ** (i - _2n); // 18. tv5 = i - 2; 19. tv5 = 2^tv5 let tvv5 = Fp.pow(tv4, tv5); // 20. tv5 = tv4^tv5 const e1 = Fp.eql(tvv5, Fp.ONE); // 21. e1 = tv5 == 1