aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMITSUNARI Shigeo <herumi@nifty.com>2018-07-30 06:25:33 +0800
committerMITSUNARI Shigeo <herumi@nifty.com>2018-07-30 06:25:33 +0800
commitea9c169f999a81b59befd9c803587a13a8e2edf8 (patch)
tree428d54dbc28ead1a51d390f05c4d57a24edc8e10
parentb071e0f5e072197712756444916aafe15fffb608 (diff)
downloadtangerine-mcl-ea9c169f999a81b59befd9c803587a13a8e2edf8.tar.gz
tangerine-mcl-ea9c169f999a81b59befd9c803587a13a8e2edf8.tar.zst
tangerine-mcl-ea9c169f999a81b59befd9c803587a13a8e2edf8.zip
disable affine test
-rw-r--r--include/mcl/ec.hpp6
-rw-r--r--test/ec_test.cpp2
2 files changed, 6 insertions, 2 deletions
diff --git a/include/mcl/ec.hpp b/include/mcl/ec.hpp
index 7635eb0..276aea7 100644
--- a/include/mcl/ec.hpp
+++ b/include/mcl/ec.hpp
@@ -128,6 +128,7 @@ private:
y2 *= z;
return y2 == t;
}
+#endif
// y^2 == (x^2 + a)x + b
static inline bool isValid(const Fp& _x, const Fp& _y)
{
@@ -140,7 +141,6 @@ private:
return y2 == t;
}
public:
-#endif
void normalize()
{
#ifndef MCL_EC_USE_AFFINE
@@ -674,7 +674,9 @@ public:
cybozu::writeChar(pb, os, sep);
if (!*pb) return;
}
+#ifndef MCL_EC_USE_AFFINE
z.save(pb, os, ioMode);
+#endif
return;
}
EcT P(*this);
@@ -796,7 +798,9 @@ public:
if (!*pb) return;
} else if (c == '4') {
y.load(pb, is, ioMode); if (!*pb) return;
+#ifndef MCL_EC_USE_AFFINE
z.load(pb, is, ioMode); if (!*pb) return;
+#endif
} else {
*pb = false;
return;
diff --git a/test/ec_test.cpp b/test/ec_test.cpp
index be4767e..ae42c67 100644
--- a/test/ec_test.cpp
+++ b/test/ec_test.cpp
@@ -1,4 +1,4 @@
-#define MCL_EC_USE_AFFINE
+//#define MCL_EC_USE_AFFINE
#define PUT(x) std::cout << #x "=" << (x) << std::endl
#define CYBOZU_TEST_DISABLE_AUTO_RUN
#include <cybozu/test.hpp>