add remark for mulCT, powCT

dev
MITSUNARI Shigeo 8 years ago
parent cc38f9c517
commit 0501225186
  1. 2
      include/mcl/ec.hpp
  2. 2
      include/mcl/operator.hpp

@ -594,6 +594,7 @@ public:
{
mulArray(z, x, gmp::getUnit(y), abs(y.get_mpz_t()->_mp_size), y < 0);
}
// @note time is depend on bitlength of y
template<class tag, size_t maxBitSize, template<class _tag, size_t _maxBitSize>class FpT>
static inline void mulCT(EcT& z, const EcT& x, const FpT<tag, maxBitSize>& y)
{
@ -601,6 +602,7 @@ public:
y.getBlock(b);
mulArray(z, x, b.p, b.n, false, true);
}
// @note time is depend on bitlength of y
static inline void mulCT(EcT& z, const EcT& x, const mpz_class& y)
{
mulArray(z, x, gmp::getUnit(y), abs(y.get_mpz_t()->_mp_size), y < 0, true);

@ -47,6 +47,7 @@ struct Operator : E {
y.getBlock(b);
powArray(z, x, b.p, b.n, false, false);
}
// @note time is depend on bitlength of y
template<class tag2, size_t maxBitSize2, template<class _tag, size_t _maxBitSize> class FpT>
static void powCT(T& z, const T& x, const FpT<tag2, maxBitSize2>& y)
{
@ -63,6 +64,7 @@ struct Operator : E {
{
powArray(z, x, gmp::getUnit(y), abs(y.get_mpz_t()->_mp_size), y < 0, false);
}
// @note time is depend on bitlength of y
static void powCT(T& z, const T& x, const mpz_class& y)
{
powArray(z, x, gmp::getUnit(y), abs(y.get_mpz_t()->_mp_size), y < 0, true);

Loading…
Cancel
Save