From 99afb4312e8b78b70c7f0495c922cc9defa97e08 Mon Sep 17 00:00:00 2001 From: Jordi Baylina Date: Mon, 27 Apr 2020 11:57:32 +0200 Subject: [PATCH] Fix negative short composition --- ports/c/builder.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/c/builder.js b/ports/c/builder.js index 6ffbdce..e8460a9 100644 --- a/ports/c/builder.js +++ b/ports/c/builder.js @@ -504,7 +504,7 @@ class BuilderC { function addShortMontgomeryNegative(a) { - const b = a.minus(self.header.P); + const b = self.F.neg(a); return `${b.toString()}, 0x40000000, { ${getLongString(toMontgomery(a))} }`; }