aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMITSUNARI Shigeo <herumi@nifty.com>2018-03-04 04:56:20 +0800
committerMITSUNARI Shigeo <herumi@nifty.com>2018-03-04 04:56:20 +0800
commit36b810043738acfb067cd792fda5ccf0d77539b8 (patch)
tree8a8154f4e292ef6a23dc34754a0bef03203df3e9 /include
parent1b33dcd8f042e3245fd673c7feb34d640cca6dc8 (diff)
downloaddexon-mcl-36b810043738acfb067cd792fda5ccf0d77539b8.tar.gz
dexon-mcl-36b810043738acfb067cd792fda5ccf0d77539b8.tar.zst
dexon-mcl-36b810043738acfb067cd792fda5ccf0d77539b8.zip
BLS12::addLine is ok
Diffstat (limited to 'include')
-rw-r--r--include/mcl/bn.hpp3
-rw-r--r--include/mcl/op.hpp2
-rw-r--r--include/mcl/pairing_util.hpp9
3 files changed, 11 insertions, 3 deletions
diff --git a/include/mcl/bn.hpp b/include/mcl/bn.hpp
index 280469b..d0283ac 100644
--- a/include/mcl/bn.hpp
+++ b/include/mcl/bn.hpp
@@ -6,9 +6,8 @@
@license modified new BSD license
http://opensource.org/licenses/BSD-3-Clause
*/
-#include <mcl/pairing_util.hpp>
-
//#define MCL_DEV
+#include <mcl/pairing_util.hpp>
namespace mcl { namespace bn {
diff --git a/include/mcl/op.hpp b/include/mcl/op.hpp
index a72944e..64db7e4 100644
--- a/include/mcl/op.hpp
+++ b/include/mcl/op.hpp
@@ -315,7 +315,7 @@ void arrayToStr(std::string& str, const Unit *x, size_t n, int ioMode);
inline const char* getIoSeparator(int ioMode)
{
- return (ioMode & (IoArray | IoArrayRaw | IoSerialize)) ? "" : " ";
+ return (ioMode & (IoArray | IoArrayRaw | IoSerialize)) ? "" : "\n";
}
int detectIoMode(int ioMode, const std::ios_base& ios);
diff --git a/include/mcl/pairing_util.hpp b/include/mcl/pairing_util.hpp
index fcd3f7c..3b9fe65 100644
--- a/include/mcl/pairing_util.hpp
+++ b/include/mcl/pairing_util.hpp
@@ -214,10 +214,19 @@ void convertFp6toFp12(Fp12& y, const Fp6& x)
{
y.clear();
#ifdef MCL_DEV
+ // (a, b, c) -> (a, c, 0, 0, b, 0)
+ y.a.a = x.a;
+ y.a.b = x.c;
+ y.b.b = x.b;
+#ifdef MCL_MTYPE
+#else
+ // (a, b, c) -> (b, 0, 0, c, a, 0)
y.a.a = x.b;
y.b.a = x.c;
y.b.b = x.a;
+#endif
#else
+ // (a, b, c) -> (a, 0, c, 0, b, 0)
y.a.a = x.a;
y.a.c = x.c;
y.b.b = x.b;