From e2202e1ee495053827266a00fe5870a1987ae141 Mon Sep 17 00:00:00 2001 From: Jack Lloyd Date: Sun, 8 Apr 2018 20:19:17 -0400 Subject: Square is always positive --- src/lib/math/bigint/big_ops2.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/lib/math/bigint/big_ops2.cpp b/src/lib/math/bigint/big_ops2.cpp index eea6a8590..212a44fa0 100644 --- a/src/lib/math/bigint/big_ops2.cpp +++ b/src/lib/math/bigint/big_ops2.cpp @@ -189,6 +189,7 @@ BigInt& BigInt::square(secure_vector& ws) ws.data(), ws.size()); swap_reg(z); + set_sign(BigInt::Positive); return (*this); } -- cgit v1.2.3