diff options
author | MITSUNARI Shigeo <herumi@nifty.com> | 2019-09-06 21:17:58 +0800 |
---|---|---|
committer | MITSUNARI Shigeo <herumi@nifty.com> | 2019-09-06 21:17:58 +0800 |
commit | 13d9500f3f9ac721fe186abdd7d74da5fb1dec9b (patch) | |
tree | 037e5302b704f0ce7bdcbd4848dae48bff5c0d23 | |
parent | 846b4ff8f6e0436eb417be7d8d91cf4db20a8cb1 (diff) | |
download | tangerine-mcl-13d9500f3f9ac721fe186abdd7d74da5fb1dec9b.tar.gz tangerine-mcl-13d9500f3f9ac721fe186abdd7d74da5fb1dec9b.tar.zst tangerine-mcl-13d9500f3f9ac721fe186abdd7d74da5fb1dec9b.zip |
Ec::mulSmallInt errors if negative
-rw-r--r-- | include/mcl/ec.hpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/mcl/ec.hpp b/include/mcl/ec.hpp index 7ff7e8a..708b854 100644 --- a/include/mcl/ec.hpp +++ b/include/mcl/ec.hpp @@ -994,7 +994,7 @@ public: bool operator<=(const EcT& rhs) const { return !operator>(rhs); } static inline void mulArray(EcT& z, const EcT& x, const fp::Unit *y, size_t yn, bool isNegative, bool constTime = false) { - if (!constTime && yn == 1 && *y <= 16) { + if (!constTime && yn == 1 && *y <= 16 && !isNegative) { if (mulSmallInt(z, x, static_cast<int>(*y), isNegative)) return; } if (mulArrayGLV && (constTime || yn > 1)) { |