disable useMont for NIST_P192

dev
MITSUNARI Shigeo 10 years ago
parent 0ec107d304
commit 4f61d3360d
  1. 5
      src/fp.cpp

@ -289,8 +289,9 @@ void Op::init(const std::string& mstr, int base, size_t maxBitSize, Mode mode)
throw cybozu::Exception("Op::init:not:support") << mstr;
}
#ifdef MCL_USE_LLVM
if (mp == mpz_class("0xfffffffffffffffffffffffffffffffeffffffffffffffff")) {
mul = &mcl_fp_mul_NIST_P192; // slower than MontFp192
if (mode == FP_AUTO && mp == mpz_class("0xfffffffffffffffffffffffffffffffeffffffffffffffff")) {
mul = &mcl_fp_mul_NIST_P192;
useMont = false;
}
#endif
if (useMont) {

Loading…
Cancel
Save