diff options
author | MITSUNARI Shigeo <herumi@nifty.com> | 2018-08-18 16:32:00 +0800 |
---|---|---|
committer | MITSUNARI Shigeo <herumi@nifty.com> | 2018-08-18 16:32:00 +0800 |
commit | 7e09cd576289322dcc5176d1f25c42e1f68f8016 (patch) | |
tree | 03302dcffad6783c4c453955eebc25e8893392cc /include | |
parent | b985a6a27a3fe1612db76f27a793ada001df0ed9 (diff) | |
download | tangerine-mcl-7e09cd576289322dcc5176d1f25c42e1f68f8016.tar.gz tangerine-mcl-7e09cd576289322dcc5176d1f25c42e1f68f8016.tar.zst tangerine-mcl-7e09cd576289322dcc5176d1f25c42e1f68f8016.zip |
add BN160 for low level test
Diffstat (limited to 'include')
-rw-r--r-- | include/mcl/bn.hpp | 2 | ||||
-rw-r--r-- | include/mcl/curve_type.h | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/include/mcl/bn.hpp b/include/mcl/bn.hpp index e3758e5..aebff2e 100644 --- a/include/mcl/bn.hpp +++ b/include/mcl/bn.hpp @@ -57,6 +57,7 @@ const CurveParam BN381_2 = { "-0x400040090001000000000001", 2, 1, false, MCL_BN3 const CurveParam BN462 = { "0x4001fffffffffffffffffffffbfff", 5, 2, false, MCL_BN462 }; // 2^114 + 2^101 - 2^14 - 1 // https://eprint.iacr.org/2017/334 const CurveParam BN_SNARK1 = { "4965661367192848881", 3, 9, false, MCL_BN_SNARK1 }; const CurveParam BLS12_381 = { "-0xd201000000010000", 4, 1, true, MCL_BLS12_381 }; +const CurveParam BN160 = { "0x4000000031", 3, 4, false, MCL_BN160 }; inline const CurveParam& getCurveParam(int type) { @@ -67,6 +68,7 @@ inline const CurveParam& getCurveParam(int type) case MCL_BN462: return mcl::BN462; case MCL_BN_SNARK1: return mcl::BN_SNARK1; case MCL_BLS12_381: return mcl::BLS12_381; + case MCL_BN160: return mcl::BN160; default: assert(0); return mcl::BN254; diff --git a/include/mcl/curve_type.h b/include/mcl/curve_type.h index 537ce11..5957d1a 100644 --- a/include/mcl/curve_type.h +++ b/include/mcl/curve_type.h @@ -13,5 +13,6 @@ enum { MCL_BN381_2 = 2, MCL_BN462 = 3, MCL_BN_SNARK1 = 4, - MCL_BLS12_381 = 5 + MCL_BLS12_381 = 5, + MCL_BN160 = 6 }; |