diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 27986c90..4995b754 100755 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,5 +1,3 @@ -include_directories(.) - set(FF_EXTRASRCS) set(FF_EXTRALIBS) if(${CURVE} STREQUAL "BN128") @@ -129,4 +127,4 @@ add_test( add_dependencies(check algebra_bilinearity_test) add_dependencies(check algebra_groups_test) -add_dependencies(check algebra_fields_test) \ No newline at end of file +add_dependencies(check algebra_fields_test) diff --git a/src/algebra/curves/alt_bn128/alt_bn128_g1.cpp b/src/algebra/curves/alt_bn128/alt_bn128_g1.cpp index 37c119a4..9ec82d36 100755 --- a/src/algebra/curves/alt_bn128/alt_bn128_g1.cpp +++ b/src/algebra/curves/alt_bn128/alt_bn128_g1.cpp @@ -5,7 +5,7 @@ * @copyright MIT license (see LICENSE file) *****************************************************************************/ -#include "algebra/curves/alt_bn128/alt_bn128_g1.hpp" +#include "alt_bn128_g1.hpp" namespace libff { diff --git a/src/algebra/curves/alt_bn128/alt_bn128_g1.hpp b/src/algebra/curves/alt_bn128/alt_bn128_g1.hpp index 1199cc7b..53ba6290 100755 --- a/src/algebra/curves/alt_bn128/alt_bn128_g1.hpp +++ b/src/algebra/curves/alt_bn128/alt_bn128_g1.hpp @@ -8,8 +8,8 @@ #ifndef ALT_BN128_G1_HPP_ #define ALT_BN128_G1_HPP_ #include -#include "algebra/curves/alt_bn128/alt_bn128_init.hpp" -#include "algebra/curves/curve_utils.hpp" +#include "alt_bn128_init.hpp" +#include "../curve_utils.hpp" namespace libff { diff --git a/src/algebra/curves/alt_bn128/alt_bn128_g2.cpp b/src/algebra/curves/alt_bn128/alt_bn128_g2.cpp index 7c3035c3..d7f873da 100755 --- a/src/algebra/curves/alt_bn128/alt_bn128_g2.cpp +++ b/src/algebra/curves/alt_bn128/alt_bn128_g2.cpp @@ -5,7 +5,7 @@ * @copyright MIT license (see LICENSE file) *****************************************************************************/ -#include "algebra/curves/alt_bn128/alt_bn128_g2.hpp" +#include "alt_bn128_g2.hpp" namespace libff { diff --git a/src/algebra/curves/alt_bn128/alt_bn128_g2.hpp b/src/algebra/curves/alt_bn128/alt_bn128_g2.hpp index b3b58984..0701bc1f 100755 --- a/src/algebra/curves/alt_bn128/alt_bn128_g2.hpp +++ b/src/algebra/curves/alt_bn128/alt_bn128_g2.hpp @@ -8,8 +8,8 @@ #ifndef ALT_BN128_G2_HPP_ #define ALT_BN128_G2_HPP_ #include -#include "algebra/curves/alt_bn128/alt_bn128_init.hpp" -#include "algebra/curves/curve_utils.hpp" +#include "alt_bn128_init.hpp" +#include "../curve_utils.hpp" namespace libff { diff --git a/src/algebra/curves/alt_bn128/alt_bn128_init.cpp b/src/algebra/curves/alt_bn128/alt_bn128_init.cpp index af554643..b4343225 100755 --- a/src/algebra/curves/alt_bn128/alt_bn128_init.cpp +++ b/src/algebra/curves/alt_bn128/alt_bn128_init.cpp @@ -5,9 +5,9 @@ * @copyright MIT license (see LICENSE file) *****************************************************************************/ -#include "algebra/curves/alt_bn128/alt_bn128_init.hpp" -#include "algebra/curves/alt_bn128/alt_bn128_g1.hpp" -#include "algebra/curves/alt_bn128/alt_bn128_g2.hpp" +#include "alt_bn128_init.hpp" +#include "alt_bn128_g1.hpp" +#include "alt_bn128_g2.hpp" namespace libff { diff --git a/src/algebra/curves/alt_bn128/alt_bn128_init.hpp b/src/algebra/curves/alt_bn128/alt_bn128_init.hpp index 92e85b34..ca09f35e 100755 --- a/src/algebra/curves/alt_bn128/alt_bn128_init.hpp +++ b/src/algebra/curves/alt_bn128/alt_bn128_init.hpp @@ -7,11 +7,11 @@ #ifndef ALT_BN128_INIT_HPP_ #define ALT_BN128_INIT_HPP_ -#include "algebra/curves/public_params.hpp" -#include "algebra/fields/fp.hpp" -#include "algebra/fields/fp2.hpp" -#include "algebra/fields/fp6_3over2.hpp" -#include "algebra/fields/fp12_2over3over2.hpp" +#include "../public_params.hpp" +#include "../../fields/fp.hpp" +#include "../../fields/fp2.hpp" +#include "../../fields/fp6_3over2.hpp" +#include "../../fields/fp12_2over3over2.hpp" namespace libff { diff --git a/src/algebra/curves/alt_bn128/alt_bn128_pairing.cpp b/src/algebra/curves/alt_bn128/alt_bn128_pairing.cpp index b1434de7..466ececf 100755 --- a/src/algebra/curves/alt_bn128/alt_bn128_pairing.cpp +++ b/src/algebra/curves/alt_bn128/alt_bn128_pairing.cpp @@ -5,12 +5,12 @@ * @copyright MIT license (see LICENSE file) *****************************************************************************/ -#include "algebra/curves/alt_bn128/alt_bn128_pairing.hpp" -#include "algebra/curves/alt_bn128/alt_bn128_init.hpp" -#include "algebra/curves/alt_bn128/alt_bn128_g1.hpp" -#include "algebra/curves/alt_bn128/alt_bn128_g2.hpp" +#include "alt_bn128_pairing.hpp" +#include "alt_bn128_init.hpp" +#include "alt_bn128_g1.hpp" +#include "alt_bn128_g2.hpp" #include -#include "common/profiling.hpp" +#include "../../../common/profiling.hpp" namespace libff { diff --git a/src/algebra/curves/alt_bn128/alt_bn128_pairing.hpp b/src/algebra/curves/alt_bn128/alt_bn128_pairing.hpp index 687d0c67..71e2fa75 100755 --- a/src/algebra/curves/alt_bn128/alt_bn128_pairing.hpp +++ b/src/algebra/curves/alt_bn128/alt_bn128_pairing.hpp @@ -8,7 +8,7 @@ #ifndef ALT_BN128_PAIRING_HPP_ #define ALT_BN128_PAIRING_HPP_ #include -#include "algebra/curves/alt_bn128/alt_bn128_init.hpp" +#include "alt_bn128_init.hpp" namespace libff { diff --git a/src/algebra/curves/alt_bn128/alt_bn128_pp.cpp b/src/algebra/curves/alt_bn128/alt_bn128_pp.cpp index 3bc8eb50..afd9eaeb 100755 --- a/src/algebra/curves/alt_bn128/alt_bn128_pp.cpp +++ b/src/algebra/curves/alt_bn128/alt_bn128_pp.cpp @@ -5,7 +5,7 @@ * @copyright MIT license (see LICENSE file) *****************************************************************************/ -#include "algebra/curves/alt_bn128/alt_bn128_pp.hpp" +#include "alt_bn128_pp.hpp" namespace libff { diff --git a/src/algebra/curves/alt_bn128/alt_bn128_pp.hpp b/src/algebra/curves/alt_bn128/alt_bn128_pp.hpp index 2024ca26..badd6f42 100755 --- a/src/algebra/curves/alt_bn128/alt_bn128_pp.hpp +++ b/src/algebra/curves/alt_bn128/alt_bn128_pp.hpp @@ -7,11 +7,11 @@ #ifndef ALT_BN128_PP_HPP_ #define ALT_BN128_PP_HPP_ -#include "algebra/curves/public_params.hpp" -#include "algebra/curves/alt_bn128/alt_bn128_init.hpp" -#include "algebra/curves/alt_bn128/alt_bn128_g1.hpp" -#include "algebra/curves/alt_bn128/alt_bn128_g2.hpp" -#include "algebra/curves/alt_bn128/alt_bn128_pairing.hpp" +#include "../public_params.hpp" +#include "alt_bn128_init.hpp" +#include "alt_bn128_g1.hpp" +#include "alt_bn128_g2.hpp" +#include "alt_bn128_pairing.hpp" namespace libff { diff --git a/src/algebra/curves/bn128/bn128_g1.cpp b/src/algebra/curves/bn128/bn128_g1.cpp index f0e96469..09825e6b 100755 --- a/src/algebra/curves/bn128/bn128_g1.cpp +++ b/src/algebra/curves/bn128/bn128_g1.cpp @@ -5,8 +5,8 @@ * @copyright MIT license (see LICENSE file) *****************************************************************************/ -#include "algebra/curves/bn128/bn128_g1.hpp" -#include "algebra/curves/bn128/bn_utils.hpp" +#include "bn128_g1.hpp" +#include "bn_utils.hpp" namespace libff { diff --git a/src/algebra/curves/bn128/bn128_g1.hpp b/src/algebra/curves/bn128/bn128_g1.hpp index d022df3a..6c609762 100755 --- a/src/algebra/curves/bn128/bn128_g1.hpp +++ b/src/algebra/curves/bn128/bn128_g1.hpp @@ -8,8 +8,8 @@ #ifndef BN128_G1_HPP_ #define BN128_G1_HPP_ #include -#include "algebra/curves/bn128/bn128_init.hpp" -#include "algebra/curves/curve_utils.hpp" +#include "bn128_init.hpp" +#include "../curve_utils.hpp" #include "third_party/ate-pairing/include/bn.h" namespace libff { diff --git a/src/algebra/curves/bn128/bn128_g2.cpp b/src/algebra/curves/bn128/bn128_g2.cpp index e90ece19..e62ef096 100755 --- a/src/algebra/curves/bn128/bn128_g2.cpp +++ b/src/algebra/curves/bn128/bn128_g2.cpp @@ -5,8 +5,8 @@ * @copyright MIT license (see LICENSE file) *****************************************************************************/ -#include "algebra/curves/bn128/bn128_g2.hpp" -#include "algebra/curves/bn128/bn_utils.hpp" +#include "bn128_g2.hpp" +#include "bn_utils.hpp" namespace libff { diff --git a/src/algebra/curves/bn128/bn128_g2.hpp b/src/algebra/curves/bn128/bn128_g2.hpp index 98d9420c..ffbb847e 100755 --- a/src/algebra/curves/bn128/bn128_g2.hpp +++ b/src/algebra/curves/bn128/bn128_g2.hpp @@ -9,8 +9,8 @@ #define BN128_G2_HPP_ #include #include -#include "algebra/curves/bn128/bn128_init.hpp" -#include "algebra/curves/curve_utils.hpp" +#include "bn128_init.hpp" +#include "../curve_utils.hpp" #include "third_party/ate-pairing/include/bn.h" namespace libff { diff --git a/src/algebra/curves/bn128/bn128_gt.cpp b/src/algebra/curves/bn128/bn128_gt.cpp index 586430e0..77a2c9ab 100755 --- a/src/algebra/curves/bn128/bn128_gt.cpp +++ b/src/algebra/curves/bn128/bn128_gt.cpp @@ -5,7 +5,7 @@ * @copyright MIT license (see LICENSE file) *****************************************************************************/ -#include "algebra/curves/bn128/bn128_gt.hpp" +#include "bn128_gt.hpp" namespace libff { diff --git a/src/algebra/curves/bn128/bn128_gt.hpp b/src/algebra/curves/bn128/bn128_gt.hpp index 3423ec9c..86b04168 100755 --- a/src/algebra/curves/bn128/bn128_gt.hpp +++ b/src/algebra/curves/bn128/bn128_gt.hpp @@ -7,8 +7,8 @@ #ifndef BN128_GT_HPP_ #define BN128_GT_HPP_ -#include "algebra/fields/fp.hpp" -#include "algebra/fields/field_utils.hpp" +#include "../../fields/fp.hpp" +#include "../../fields/field_utils.hpp" #include #include "third_party/ate-pairing/include/bn.h" diff --git a/src/algebra/curves/bn128/bn128_init.cpp b/src/algebra/curves/bn128/bn128_init.cpp index 88054699..3b7ae870 100755 --- a/src/algebra/curves/bn128/bn128_init.cpp +++ b/src/algebra/curves/bn128/bn128_init.cpp @@ -5,10 +5,10 @@ * @copyright MIT license (see LICENSE file) *****************************************************************************/ -#include "algebra/curves/bn128/bn128_init.hpp" -#include "algebra/curves/bn128/bn128_g1.hpp" -#include "algebra/curves/bn128/bn128_g2.hpp" -#include "algebra/curves/bn128/bn128_gt.hpp" +#include "bn128_init.hpp" +#include "bn128_g1.hpp" +#include "bn128_g2.hpp" +#include "bn128_gt.hpp" namespace libff { diff --git a/src/algebra/curves/bn128/bn128_init.hpp b/src/algebra/curves/bn128/bn128_init.hpp index 3706d410..79a6db56 100755 --- a/src/algebra/curves/bn128/bn128_init.hpp +++ b/src/algebra/curves/bn128/bn128_init.hpp @@ -7,8 +7,8 @@ #ifndef BN128_INIT_HPP_ #define BN128_INIT_HPP_ -#include "algebra/curves/public_params.hpp" -#include "algebra/fields/fp.hpp" +#include "../public_params.hpp" +#include "../../fields/fp.hpp" #include "third_party/ate-pairing/include/bn.h" namespace libff { diff --git a/src/algebra/curves/bn128/bn128_pairing.cpp b/src/algebra/curves/bn128/bn128_pairing.cpp index c7dcf84e..d4c96167 100755 --- a/src/algebra/curves/bn128/bn128_pairing.cpp +++ b/src/algebra/curves/bn128/bn128_pairing.cpp @@ -10,12 +10,12 @@ #include -#include "algebra/curves/bn128/bn128_pairing.hpp" -#include "common/profiling.hpp" -#include "algebra/curves/bn128/bn128_init.hpp" -#include "algebra/curves/bn128/bn128_g1.hpp" -#include "algebra/curves/bn128/bn128_g2.hpp" -#include "algebra/curves/bn128/bn128_gt.hpp" +#include "bn128_pairing.hpp" +#include "../../../common/profiling.hpp" +#include "bn128_init.hpp" +#include "bn128_g1.hpp" +#include "bn128_g2.hpp" +#include "bn128_gt.hpp" namespace libff { diff --git a/src/algebra/curves/bn128/bn128_pairing.hpp b/src/algebra/curves/bn128/bn128_pairing.hpp index 206d4b1e..545c6579 100755 --- a/src/algebra/curves/bn128/bn128_pairing.hpp +++ b/src/algebra/curves/bn128/bn128_pairing.hpp @@ -10,9 +10,9 @@ #ifndef BN128_PAIRING_HPP_ #define BN128_PAIRING_HPP_ -#include "algebra/curves/bn128/bn128_g1.hpp" -#include "algebra/curves/bn128/bn128_g2.hpp" -#include "algebra/curves/bn128/bn128_gt.hpp" +#include "bn128_g1.hpp" +#include "bn128_g2.hpp" +#include "bn128_gt.hpp" #include "third_party/ate-pairing/include/bn.h" namespace libff { diff --git a/src/algebra/curves/bn128/bn128_pp.cpp b/src/algebra/curves/bn128/bn128_pp.cpp index 0c5785fc..b1c5d3ce 100755 --- a/src/algebra/curves/bn128/bn128_pp.cpp +++ b/src/algebra/curves/bn128/bn128_pp.cpp @@ -5,8 +5,8 @@ * @copyright MIT license (see LICENSE file) *****************************************************************************/ -#include "algebra/curves/bn128/bn128_pp.hpp" -#include "common/profiling.hpp" +#include "bn128_pp.hpp" +#include "../../../common/profiling.hpp" namespace libff { diff --git a/src/algebra/curves/bn128/bn128_pp.hpp b/src/algebra/curves/bn128/bn128_pp.hpp index 2f7f7bc1..1b0800c3 100755 --- a/src/algebra/curves/bn128/bn128_pp.hpp +++ b/src/algebra/curves/bn128/bn128_pp.hpp @@ -7,12 +7,12 @@ #ifndef BN128_PP_HPP_ #define BN128_PP_HPP_ -#include "algebra/curves/public_params.hpp" -#include "algebra/curves/bn128/bn128_init.hpp" -#include "algebra/curves/bn128/bn128_g1.hpp" -#include "algebra/curves/bn128/bn128_g2.hpp" -#include "algebra/curves/bn128/bn128_gt.hpp" -#include "algebra/curves/bn128/bn128_pairing.hpp" +#include "../public_params.hpp" +#include "bn128_init.hpp" +#include "bn128_g1.hpp" +#include "bn128_g2.hpp" +#include "bn128_gt.hpp" +#include "bn128_pairing.hpp" namespace libff { diff --git a/src/algebra/curves/bn128/bn_utils.hpp b/src/algebra/curves/bn128/bn_utils.hpp index 00b9d028..2557fcb1 100755 --- a/src/algebra/curves/bn128/bn_utils.hpp +++ b/src/algebra/curves/bn128/bn_utils.hpp @@ -17,6 +17,6 @@ void bn_batch_invert(std::vector &vec); } // libff -#include "algebra/curves/bn128/bn_utils.tcc" +#include "bn_utils.tcc" #endif // BN_UTILS_HPP_ diff --git a/src/algebra/curves/curve_utils.hpp b/src/algebra/curves/curve_utils.hpp index 841c9090..b389f040 100755 --- a/src/algebra/curves/curve_utils.hpp +++ b/src/algebra/curves/curve_utils.hpp @@ -9,7 +9,7 @@ #define CURVE_UTILS_HPP_ #include -#include "algebra/fields/bigint.hpp" +#include "../fields/bigint.hpp" namespace libff { @@ -17,6 +17,6 @@ template GroupT scalar_mul(const GroupT &base, const bigint &scalar); } // libff -#include "algebra/curves/curve_utils.tcc" +#include "curve_utils.tcc" #endif // CURVE_UTILS_HPP_ diff --git a/src/algebra/curves/edwards/edwards_g1.cpp b/src/algebra/curves/edwards/edwards_g1.cpp index b007081f..78d7ebb0 100755 --- a/src/algebra/curves/edwards/edwards_g1.cpp +++ b/src/algebra/curves/edwards/edwards_g1.cpp @@ -5,7 +5,7 @@ * @copyright MIT license (see LICENSE file) *****************************************************************************/ -#include "algebra/curves/edwards/edwards_g1.hpp" +#include "edwards_g1.hpp" namespace libff { diff --git a/src/algebra/curves/edwards/edwards_g1.hpp b/src/algebra/curves/edwards/edwards_g1.hpp index 8cca442c..89df29b6 100755 --- a/src/algebra/curves/edwards/edwards_g1.hpp +++ b/src/algebra/curves/edwards/edwards_g1.hpp @@ -8,8 +8,8 @@ #ifndef EDWARDS_G1_HPP_ #define EDWARDS_G1_HPP_ #include -#include "algebra/curves/edwards/edwards_init.hpp" -#include "algebra/curves/curve_utils.hpp" +#include "edwards_init.hpp" +#include "../curve_utils.hpp" namespace libff { diff --git a/src/algebra/curves/edwards/edwards_g2.cpp b/src/algebra/curves/edwards/edwards_g2.cpp index 28f110b0..13177b56 100755 --- a/src/algebra/curves/edwards/edwards_g2.cpp +++ b/src/algebra/curves/edwards/edwards_g2.cpp @@ -5,7 +5,7 @@ * @copyright MIT license (see LICENSE file) *****************************************************************************/ -#include "algebra/curves/edwards/edwards_g2.hpp" +#include "edwards_g2.hpp" namespace libff { diff --git a/src/algebra/curves/edwards/edwards_g2.hpp b/src/algebra/curves/edwards/edwards_g2.hpp index 562bacc0..477a06af 100755 --- a/src/algebra/curves/edwards/edwards_g2.hpp +++ b/src/algebra/curves/edwards/edwards_g2.hpp @@ -9,8 +9,8 @@ #define EDWARDS_G2_HPP_ #include #include -#include "algebra/curves/edwards/edwards_init.hpp" -#include "algebra/curves/curve_utils.hpp" +#include "edwards_init.hpp" +#include "../curve_utils.hpp" namespace libff { diff --git a/src/algebra/curves/edwards/edwards_init.cpp b/src/algebra/curves/edwards/edwards_init.cpp index f12b2f96..520adad1 100755 --- a/src/algebra/curves/edwards/edwards_init.cpp +++ b/src/algebra/curves/edwards/edwards_init.cpp @@ -5,9 +5,9 @@ * @copyright MIT license (see LICENSE file) *****************************************************************************/ -#include "algebra/curves/edwards/edwards_init.hpp" -#include "algebra/curves/edwards/edwards_g1.hpp" -#include "algebra/curves/edwards/edwards_g2.hpp" +#include "edwards_init.hpp" +#include "edwards_g1.hpp" +#include "edwards_g2.hpp" namespace libff { diff --git a/src/algebra/curves/edwards/edwards_init.hpp b/src/algebra/curves/edwards/edwards_init.hpp index 6189e5f4..50a7f21a 100755 --- a/src/algebra/curves/edwards/edwards_init.hpp +++ b/src/algebra/curves/edwards/edwards_init.hpp @@ -7,10 +7,10 @@ #ifndef EDWARDS_INIT_HPP_ #define EDWARDS_INIT_HPP_ -#include "algebra/curves/public_params.hpp" -#include "algebra/fields/fp.hpp" -#include "algebra/fields/fp3.hpp" -#include "algebra/fields/fp6_2over3.hpp" +#include "../public_params.hpp" +#include "../../fields/fp.hpp" +#include "../../fields/fp3.hpp" +#include "../../fields/fp6_2over3.hpp" namespace libff { diff --git a/src/algebra/curves/edwards/edwards_pairing.cpp b/src/algebra/curves/edwards/edwards_pairing.cpp index a25ad0f5..3abdfd6b 100755 --- a/src/algebra/curves/edwards/edwards_pairing.cpp +++ b/src/algebra/curves/edwards/edwards_pairing.cpp @@ -5,12 +5,12 @@ * @copyright MIT license (see LICENSE file) *****************************************************************************/ -#include "algebra/curves/edwards/edwards_pairing.hpp" -#include "algebra/curves/edwards/edwards_init.hpp" +#include "edwards_pairing.hpp" +#include "edwards_init.hpp" #include -#include "algebra/curves/edwards/edwards_g1.hpp" -#include "algebra/curves/edwards/edwards_g2.hpp" -#include "common/profiling.hpp" +#include "edwards_g1.hpp" +#include "edwards_g2.hpp" +#include "../../../common/profiling.hpp" namespace libff { diff --git a/src/algebra/curves/edwards/edwards_pairing.hpp b/src/algebra/curves/edwards/edwards_pairing.hpp index 4a0c8c45..f41a7a27 100755 --- a/src/algebra/curves/edwards/edwards_pairing.hpp +++ b/src/algebra/curves/edwards/edwards_pairing.hpp @@ -8,7 +8,7 @@ #ifndef EDWARDS_PAIRING_HPP_ #define EDWARDS_PAIRING_HPP_ #include -#include "algebra/curves/edwards/edwards_init.hpp" +#include "edwards_init.hpp" namespace libff { diff --git a/src/algebra/curves/edwards/edwards_pp.cpp b/src/algebra/curves/edwards/edwards_pp.cpp index a1f7b9a4..659d142f 100755 --- a/src/algebra/curves/edwards/edwards_pp.cpp +++ b/src/algebra/curves/edwards/edwards_pp.cpp @@ -5,7 +5,7 @@ * @copyright MIT license (see LICENSE file) *****************************************************************************/ -#include "algebra/curves/edwards/edwards_pp.hpp" +#include "edwards_pp.hpp" namespace libff { diff --git a/src/algebra/curves/edwards/edwards_pp.hpp b/src/algebra/curves/edwards/edwards_pp.hpp index ae275d22..b2013bd2 100755 --- a/src/algebra/curves/edwards/edwards_pp.hpp +++ b/src/algebra/curves/edwards/edwards_pp.hpp @@ -7,11 +7,11 @@ #ifndef EDWARDS_PP_HPP_ #define EDWARDS_PP_HPP_ -#include "algebra/curves/public_params.hpp" -#include "algebra/curves/edwards/edwards_init.hpp" -#include "algebra/curves/edwards/edwards_g1.hpp" -#include "algebra/curves/edwards/edwards_g2.hpp" -#include "algebra/curves/edwards/edwards_pairing.hpp" +#include "../public_params.hpp" +#include "edwards_init.hpp" +#include "edwards_g1.hpp" +#include "edwards_g2.hpp" +#include "edwards_pairing.hpp" namespace libff { diff --git a/src/algebra/curves/mnt/mnt4/mnt4_g1.cpp b/src/algebra/curves/mnt/mnt4/mnt4_g1.cpp index 5c65002a..8f64d778 100755 --- a/src/algebra/curves/mnt/mnt4/mnt4_g1.cpp +++ b/src/algebra/curves/mnt/mnt4/mnt4_g1.cpp @@ -11,7 +11,7 @@ * @copyright MIT license (see LICENSE file) *****************************************************************************/ -#include "algebra/curves/mnt/mnt4/mnt4_g1.hpp" +#include "mnt4_g1.hpp" namespace libff { diff --git a/src/algebra/curves/mnt/mnt4/mnt4_g1.hpp b/src/algebra/curves/mnt/mnt4/mnt4_g1.hpp index 194118c1..09d66baf 100755 --- a/src/algebra/curves/mnt/mnt4/mnt4_g1.hpp +++ b/src/algebra/curves/mnt/mnt4/mnt4_g1.hpp @@ -14,8 +14,8 @@ #include -#include "algebra/curves/curve_utils.hpp" -#include "algebra/curves/mnt/mnt4/mnt4_init.hpp" +#include "../../curve_utils.hpp" +#include "mnt4_init.hpp" namespace libff { diff --git a/src/algebra/curves/mnt/mnt4/mnt4_g2.cpp b/src/algebra/curves/mnt/mnt4/mnt4_g2.cpp index ca30c59e..ecc4eeb0 100755 --- a/src/algebra/curves/mnt/mnt4/mnt4_g2.cpp +++ b/src/algebra/curves/mnt/mnt4/mnt4_g2.cpp @@ -11,7 +11,7 @@ * @copyright MIT license (see LICENSE file) *****************************************************************************/ -#include "algebra/curves/mnt/mnt4/mnt4_g2.hpp" +#include "mnt4_g2.hpp" namespace libff { diff --git a/src/algebra/curves/mnt/mnt4/mnt4_g2.hpp b/src/algebra/curves/mnt/mnt4/mnt4_g2.hpp index 33546e91..0a17939d 100755 --- a/src/algebra/curves/mnt/mnt4/mnt4_g2.hpp +++ b/src/algebra/curves/mnt/mnt4/mnt4_g2.hpp @@ -14,8 +14,8 @@ #include -#include "algebra/curves/curve_utils.hpp" -#include "algebra/curves/mnt/mnt4/mnt4_init.hpp" +#include "../../curve_utils.hpp" +#include "mnt4_init.hpp" namespace libff { diff --git a/src/algebra/curves/mnt/mnt4/mnt4_init.cpp b/src/algebra/curves/mnt/mnt4/mnt4_init.cpp index 96cffb66..613a65da 100755 --- a/src/algebra/curves/mnt/mnt4/mnt4_init.cpp +++ b/src/algebra/curves/mnt/mnt4/mnt4_init.cpp @@ -11,9 +11,9 @@ * @copyright MIT license (see LICENSE file) *****************************************************************************/ -#include "algebra/curves/mnt/mnt4/mnt4_init.hpp" -#include "algebra/curves/mnt/mnt4/mnt4_g1.hpp" -#include "algebra/curves/mnt/mnt4/mnt4_g2.hpp" +#include "mnt4_init.hpp" +#include "mnt4_g1.hpp" +#include "mnt4_g2.hpp" namespace libff { diff --git a/src/algebra/curves/mnt/mnt4/mnt4_init.hpp b/src/algebra/curves/mnt/mnt4/mnt4_init.hpp index 848748f3..59d6f5cf 100755 --- a/src/algebra/curves/mnt/mnt4/mnt4_init.hpp +++ b/src/algebra/curves/mnt/mnt4/mnt4_init.hpp @@ -12,11 +12,11 @@ #ifndef MNT4_INIT_HPP_ #define MNT4_INIT_HPP_ -#include "algebra/curves/public_params.hpp" -#include "algebra/curves/mnt/mnt46_common.hpp" -#include "algebra/fields/fp.hpp" -#include "algebra/fields/fp2.hpp" -#include "algebra/fields/fp4.hpp" +#include "../../public_params.hpp" +#include "../mnt46_common.hpp" +#include "../../../fields/fp.hpp" +#include "../../../fields/fp2.hpp" +#include "../../../fields/fp4.hpp" namespace libff { diff --git a/src/algebra/curves/mnt/mnt4/mnt4_pairing.cpp b/src/algebra/curves/mnt/mnt4/mnt4_pairing.cpp index 62242b3e..45ca2746 100755 --- a/src/algebra/curves/mnt/mnt4/mnt4_pairing.cpp +++ b/src/algebra/curves/mnt/mnt4/mnt4_pairing.cpp @@ -13,13 +13,13 @@ #include -#include "algebra/curves/mnt/mnt4/mnt4_pairing.hpp" +#include "mnt4_pairing.hpp" -#include "algebra/curves/mnt/mnt4/mnt4_init.hpp" -#include "algebra/curves/mnt/mnt4/mnt4_g1.hpp" -#include "algebra/curves/mnt/mnt4/mnt4_g2.hpp" -#include "algebra/scalar_multiplication/wnaf.hpp" -#include "common/profiling.hpp" +#include "mnt4_init.hpp" +#include "mnt4_g1.hpp" +#include "mnt4_g2.hpp" +#include "../../../scalar_multiplication/wnaf.hpp" +#include "../../../../common/profiling.hpp" namespace libff { diff --git a/src/algebra/curves/mnt/mnt4/mnt4_pairing.hpp b/src/algebra/curves/mnt/mnt4/mnt4_pairing.hpp index 12f51b36..98cdece1 100755 --- a/src/algebra/curves/mnt/mnt4/mnt4_pairing.hpp +++ b/src/algebra/curves/mnt/mnt4/mnt4_pairing.hpp @@ -14,7 +14,7 @@ #include -#include "algebra/curves/mnt/mnt4/mnt4_init.hpp" +#include "mnt4_init.hpp" namespace libff { diff --git a/src/algebra/curves/mnt/mnt4/mnt4_pp.cpp b/src/algebra/curves/mnt/mnt4/mnt4_pp.cpp index 825cfc68..23076a25 100755 --- a/src/algebra/curves/mnt/mnt4/mnt4_pp.cpp +++ b/src/algebra/curves/mnt/mnt4/mnt4_pp.cpp @@ -11,7 +11,7 @@ * @copyright MIT license (see LICENSE file) *****************************************************************************/ -#include "algebra/curves/mnt/mnt4/mnt4_pp.hpp" +#include "mnt4_pp.hpp" namespace libff { diff --git a/src/algebra/curves/mnt/mnt4/mnt4_pp.hpp b/src/algebra/curves/mnt/mnt4/mnt4_pp.hpp index 22d9e3e7..3d8a86e9 100755 --- a/src/algebra/curves/mnt/mnt4/mnt4_pp.hpp +++ b/src/algebra/curves/mnt/mnt4/mnt4_pp.hpp @@ -12,11 +12,11 @@ #ifndef MNT4_PP_HPP_ #define MNT4_PP_HPP_ -#include "algebra/curves/public_params.hpp" -#include "algebra/curves/mnt/mnt4/mnt4_init.hpp" -#include "algebra/curves/mnt/mnt4/mnt4_g1.hpp" -#include "algebra/curves/mnt/mnt4/mnt4_g2.hpp" -#include "algebra/curves/mnt/mnt4/mnt4_pairing.hpp" +#include "../../public_params.hpp" +#include "mnt4_init.hpp" +#include "mnt4_g1.hpp" +#include "mnt4_g2.hpp" +#include "mnt4_pairing.hpp" namespace libff { diff --git a/src/algebra/curves/mnt/mnt46_common.cpp b/src/algebra/curves/mnt/mnt46_common.cpp index 752365cb..c88efcc6 100755 --- a/src/algebra/curves/mnt/mnt46_common.cpp +++ b/src/algebra/curves/mnt/mnt46_common.cpp @@ -11,7 +11,7 @@ * @copyright MIT license (see LICENSE file) *****************************************************************************/ -#include "algebra/curves/mnt/mnt46_common.hpp" +#include "mnt46_common.hpp" namespace libff { diff --git a/src/algebra/curves/mnt/mnt46_common.hpp b/src/algebra/curves/mnt/mnt46_common.hpp index 2e466e59..3e2315f1 100755 --- a/src/algebra/curves/mnt/mnt46_common.hpp +++ b/src/algebra/curves/mnt/mnt46_common.hpp @@ -12,7 +12,7 @@ #ifndef MNT46_COMMON_HPP_ #define MNT46_COMMON_HPP_ -#include "algebra/fields/bigint.hpp" +#include "../../fields/bigint.hpp" namespace libff { diff --git a/src/algebra/curves/mnt/mnt6/mnt6_g1.cpp b/src/algebra/curves/mnt/mnt6/mnt6_g1.cpp index 15944d92..4550d36f 100755 --- a/src/algebra/curves/mnt/mnt6/mnt6_g1.cpp +++ b/src/algebra/curves/mnt/mnt6/mnt6_g1.cpp @@ -11,7 +11,7 @@ * @copyright MIT license (see LICENSE file) *****************************************************************************/ -#include "algebra/curves/mnt/mnt6/mnt6_g1.hpp" +#include "mnt6_g1.hpp" namespace libff { diff --git a/src/algebra/curves/mnt/mnt6/mnt6_g1.hpp b/src/algebra/curves/mnt/mnt6/mnt6_g1.hpp index 187fd306..448489a7 100755 --- a/src/algebra/curves/mnt/mnt6/mnt6_g1.hpp +++ b/src/algebra/curves/mnt/mnt6/mnt6_g1.hpp @@ -14,8 +14,8 @@ #include -#include "algebra/curves/curve_utils.hpp" -#include "algebra/curves/mnt/mnt6/mnt6_init.hpp" +#include "../../curve_utils.hpp" +#include "mnt6_init.hpp" namespace libff { diff --git a/src/algebra/curves/mnt/mnt6/mnt6_g2.cpp b/src/algebra/curves/mnt/mnt6/mnt6_g2.cpp index 9d758054..25d798c3 100755 --- a/src/algebra/curves/mnt/mnt6/mnt6_g2.cpp +++ b/src/algebra/curves/mnt/mnt6/mnt6_g2.cpp @@ -11,7 +11,7 @@ * @copyright MIT license (see LICENSE file) *****************************************************************************/ -#include "algebra/curves/mnt/mnt6/mnt6_g2.hpp" +#include "mnt6_g2.hpp" namespace libff { diff --git a/src/algebra/curves/mnt/mnt6/mnt6_g2.hpp b/src/algebra/curves/mnt/mnt6/mnt6_g2.hpp index 052c9fe3..1a9af3cc 100755 --- a/src/algebra/curves/mnt/mnt6/mnt6_g2.hpp +++ b/src/algebra/curves/mnt/mnt6/mnt6_g2.hpp @@ -14,8 +14,8 @@ #include -#include "algebra/curves/curve_utils.hpp" -#include "algebra/curves/mnt/mnt6/mnt6_init.hpp" +#include "../../curve_utils.hpp" +#include "mnt6_init.hpp" namespace libff { diff --git a/src/algebra/curves/mnt/mnt6/mnt6_init.cpp b/src/algebra/curves/mnt/mnt6/mnt6_init.cpp index 46316293..d037e11e 100755 --- a/src/algebra/curves/mnt/mnt6/mnt6_init.cpp +++ b/src/algebra/curves/mnt/mnt6/mnt6_init.cpp @@ -11,9 +11,9 @@ * @copyright MIT license (see LICENSE file) *****************************************************************************/ -#include "algebra/curves/mnt/mnt6/mnt6_init.hpp" -#include "algebra/curves/mnt/mnt6/mnt6_g1.hpp" -#include "algebra/curves/mnt/mnt6/mnt6_g2.hpp" +#include "mnt6_init.hpp" +#include "mnt6_g1.hpp" +#include "mnt6_g2.hpp" namespace libff { diff --git a/src/algebra/curves/mnt/mnt6/mnt6_init.hpp b/src/algebra/curves/mnt/mnt6/mnt6_init.hpp index 6f5fc66d..fef51c8b 100755 --- a/src/algebra/curves/mnt/mnt6/mnt6_init.hpp +++ b/src/algebra/curves/mnt/mnt6/mnt6_init.hpp @@ -12,11 +12,11 @@ #ifndef MNT6_INIT_HPP_ #define MNT6_INIT_HPP_ -#include "algebra/curves/public_params.hpp" -#include "algebra/curves/mnt/mnt46_common.hpp" -#include "algebra/fields/fp.hpp" -#include "algebra/fields/fp3.hpp" -#include "algebra/fields/fp6_2over3.hpp" +#include "../../public_params.hpp" +#include "../mnt46_common.hpp" +#include "../../../fields/fp.hpp" +#include "../../../fields/fp3.hpp" +#include "../../../fields/fp6_2over3.hpp" namespace libff { diff --git a/src/algebra/curves/mnt/mnt6/mnt6_pairing.cpp b/src/algebra/curves/mnt/mnt6/mnt6_pairing.cpp index d039d86c..ff191276 100755 --- a/src/algebra/curves/mnt/mnt6/mnt6_pairing.cpp +++ b/src/algebra/curves/mnt/mnt6/mnt6_pairing.cpp @@ -13,12 +13,12 @@ #include -#include "algebra/curves/mnt/mnt6/mnt6_pairing.hpp" -#include "algebra/curves/mnt/mnt6/mnt6_init.hpp" -#include "algebra/curves/mnt/mnt6/mnt6_g1.hpp" -#include "algebra/curves/mnt/mnt6/mnt6_g2.hpp" -#include "algebra/scalar_multiplication/wnaf.hpp" -#include "common/profiling.hpp" +#include "mnt6_pairing.hpp" +#include "mnt6_init.hpp" +#include "mnt6_g1.hpp" +#include "mnt6_g2.hpp" +#include "../../../scalar_multiplication/wnaf.hpp" +#include "../../../../common/profiling.hpp" namespace libff { diff --git a/src/algebra/curves/mnt/mnt6/mnt6_pairing.hpp b/src/algebra/curves/mnt/mnt6/mnt6_pairing.hpp index 45f21de5..1c97639d 100755 --- a/src/algebra/curves/mnt/mnt6/mnt6_pairing.hpp +++ b/src/algebra/curves/mnt/mnt6/mnt6_pairing.hpp @@ -14,7 +14,7 @@ #include -#include "algebra/curves/mnt/mnt6/mnt6_init.hpp" +#include "mnt6_init.hpp" namespace libff { diff --git a/src/algebra/curves/mnt/mnt6/mnt6_pp.cpp b/src/algebra/curves/mnt/mnt6/mnt6_pp.cpp index a9065474..2fe2f0df 100755 --- a/src/algebra/curves/mnt/mnt6/mnt6_pp.cpp +++ b/src/algebra/curves/mnt/mnt6/mnt6_pp.cpp @@ -11,7 +11,7 @@ * @copyright MIT license (see LICENSE file) *****************************************************************************/ -#include "algebra/curves/mnt/mnt6/mnt6_pp.hpp" +#include "mnt6_pp.hpp" namespace libff { diff --git a/src/algebra/curves/mnt/mnt6/mnt6_pp.hpp b/src/algebra/curves/mnt/mnt6/mnt6_pp.hpp index 46f6b26d..1afe945d 100755 --- a/src/algebra/curves/mnt/mnt6/mnt6_pp.hpp +++ b/src/algebra/curves/mnt/mnt6/mnt6_pp.hpp @@ -12,11 +12,11 @@ #ifndef MNT6_PP_HPP_ #define MNT6_PP_HPP_ -#include "algebra/curves/public_params.hpp" -#include "algebra/curves/mnt/mnt6/mnt6_init.hpp" -#include "algebra/curves/mnt/mnt6/mnt6_g1.hpp" -#include "algebra/curves/mnt/mnt6/mnt6_g2.hpp" -#include "algebra/curves/mnt/mnt6/mnt6_pairing.hpp" +#include "../../public_params.hpp" +#include "mnt6_init.hpp" +#include "mnt6_g1.hpp" +#include "mnt6_g2.hpp" +#include "mnt6_pairing.hpp" namespace libff { diff --git a/src/algebra/curves/tests/test_bilinearity.cpp b/src/algebra/curves/tests/test_bilinearity.cpp index 8231bb56..def5d8ad 100755 --- a/src/algebra/curves/tests/test_bilinearity.cpp +++ b/src/algebra/curves/tests/test_bilinearity.cpp @@ -4,14 +4,14 @@ * and contributors (see AUTHORS). * @copyright MIT license (see LICENSE file) *****************************************************************************/ -#include "common/profiling.hpp" -#include "algebra/curves/edwards/edwards_pp.hpp" +#include "../../../common/profiling.hpp" +#include "../edwards/edwards_pp.hpp" #ifdef CURVE_BN128 -#include "algebra/curves/bn128/bn128_pp.hpp" +#include "../bn128/bn128_pp.hpp" #endif -#include "algebra/curves/alt_bn128/alt_bn128_pp.hpp" -#include "algebra/curves/mnt/mnt4/mnt4_pp.hpp" -#include "algebra/curves/mnt/mnt6/mnt6_pp.hpp" +#include "../alt_bn128/alt_bn128_pp.hpp" +#include "../mnt/mnt4/mnt4_pp.hpp" +#include "../mnt/mnt6/mnt6_pp.hpp" using namespace libff; diff --git a/src/algebra/curves/tests/test_groups.cpp b/src/algebra/curves/tests/test_groups.cpp index 22c3e1cc..3b80fa7e 100755 --- a/src/algebra/curves/tests/test_groups.cpp +++ b/src/algebra/curves/tests/test_groups.cpp @@ -4,14 +4,14 @@ * and contributors (see AUTHORS). * @copyright MIT license (see LICENSE file) *****************************************************************************/ -#include "common/profiling.hpp" -#include "algebra/curves/edwards/edwards_pp.hpp" -#include "algebra/curves/mnt/mnt4/mnt4_pp.hpp" -#include "algebra/curves/mnt/mnt6/mnt6_pp.hpp" +#include "../../../common/profiling.hpp" +#include "../edwards/edwards_pp.hpp" +#include "../mnt/mnt4/mnt4_pp.hpp" +#include "../mnt/mnt6/mnt6_pp.hpp" #ifdef CURVE_BN128 -#include "algebra/curves/bn128/bn128_pp.hpp" +#include "../bn128/bn128_pp.hpp" #endif -#include "algebra/curves/alt_bn128/alt_bn128_pp.hpp" +#include "../alt_bn128/alt_bn128_pp.hpp" #include using namespace libff; diff --git a/src/algebra/exponentiation/exponentiation.hpp b/src/algebra/exponentiation/exponentiation.hpp index 6f512789..27ea5cb6 100755 --- a/src/algebra/exponentiation/exponentiation.hpp +++ b/src/algebra/exponentiation/exponentiation.hpp @@ -14,7 +14,7 @@ #include -#include "algebra/fields/bigint.hpp" +#include "../fields/bigint.hpp" namespace libff { @@ -26,6 +26,6 @@ FieldT power(const FieldT &base, const unsigned long exponent); } // libff -#include "algebra/exponentiation/exponentiation.tcc" +#include "exponentiation.tcc" #endif // EXPONENTIATION_HPP_ diff --git a/src/algebra/exponentiation/exponentiation.tcc b/src/algebra/exponentiation/exponentiation.tcc index 87bcd1c2..243ab833 100755 --- a/src/algebra/exponentiation/exponentiation.tcc +++ b/src/algebra/exponentiation/exponentiation.tcc @@ -14,7 +14,7 @@ #ifndef EXPONENTIATION_TCC_ #define EXPONENTIATION_TCC_ -#include "common/utils.hpp" +#include "../../common/utils.hpp" namespace libff { diff --git a/src/algebra/fields/bigint.hpp b/src/algebra/fields/bigint.hpp index 2155f1cd..c018fb61 100755 --- a/src/algebra/fields/bigint.hpp +++ b/src/algebra/fields/bigint.hpp @@ -12,7 +12,7 @@ #include #include #include -#include "common/serialization.hpp" +#include "../../common/serialization.hpp" namespace libff { @@ -57,5 +57,5 @@ class bigint { }; } // libff -#include "algebra/fields/bigint.tcc" +#include "bigint.tcc" #endif diff --git a/src/algebra/fields/field_utils.hpp b/src/algebra/fields/field_utils.hpp index 1bc194b7..c6f1a702 100755 --- a/src/algebra/fields/field_utils.hpp +++ b/src/algebra/fields/field_utils.hpp @@ -9,9 +9,9 @@ #define FIELD_UTILS_HPP_ #include -#include "algebra/fields/bigint.hpp" -#include "common/double.hpp" -#include "common/utils.hpp" +#include "bigint.hpp" +#include "../../common/double.hpp" +#include "../../common/utils.hpp" namespace libff { @@ -52,6 +52,6 @@ template void batch_invert(std::vector &vec); } // libff -#include "algebra/fields/field_utils.tcc" +#include "field_utils.tcc" #endif // FIELD_UTILS_HPP_ diff --git a/src/algebra/fields/field_utils.tcc b/src/algebra/fields/field_utils.tcc index 573512c9..33feef13 100755 --- a/src/algebra/fields/field_utils.tcc +++ b/src/algebra/fields/field_utils.tcc @@ -13,8 +13,8 @@ #include #include -#include "common/double.hpp" -#include "common/utils.hpp" +#include "../../common/double.hpp" +#include "../../common/utils.hpp" namespace libff { diff --git a/src/algebra/fields/fp.hpp b/src/algebra/fields/fp.hpp index 188e2002..e855cbf1 100755 --- a/src/algebra/fields/fp.hpp +++ b/src/algebra/fields/fp.hpp @@ -10,8 +10,8 @@ #ifndef FP_HPP_ #define FP_HPP_ -#include "algebra/fields/bigint.hpp" -#include "algebra/exponentiation/exponentiation.hpp" +#include "bigint.hpp" +#include "../exponentiation/exponentiation.hpp" namespace libff { @@ -179,6 +179,6 @@ template& modulus> bigint Fp_model::Rcubed; } // libff -#include "algebra/fields/fp.tcc" +#include "fp.tcc" #endif // FP_HPP_ diff --git a/src/algebra/fields/fp.tcc b/src/algebra/fields/fp.tcc index 4224b97a..eec08f62 100755 --- a/src/algebra/fields/fp.tcc +++ b/src/algebra/fields/fp.tcc @@ -14,8 +14,8 @@ #include #include -#include "algebra/fields/fp_aux.tcc" -#include "algebra/fields/field_utils.hpp" +#include "fp_aux.tcc" +#include "field_utils.hpp" namespace libff { diff --git a/src/algebra/fields/fp12_2over3over2.hpp b/src/algebra/fields/fp12_2over3over2.hpp index bcaa41fe..81fc7d9c 100755 --- a/src/algebra/fields/fp12_2over3over2.hpp +++ b/src/algebra/fields/fp12_2over3over2.hpp @@ -9,9 +9,9 @@ #ifndef FP12_2OVER3OVER2_HPP_ #define FP12_2OVER3OVER2_HPP_ -#include "algebra/fields/fp.hpp" -#include "algebra/fields/fp2.hpp" -#include "algebra/fields/fp6_3over2.hpp" +#include "fp.hpp" +#include "fp2.hpp" +#include "fp6_3over2.hpp" #include namespace libff { @@ -112,5 +112,5 @@ template& modulus> Fp2_model Fp12_2over3over2_model::Frobenius_coeffs_c1[12]; } // libff -#include "algebra/fields/fp12_2over3over2.tcc" +#include "fp12_2over3over2.tcc" #endif // FP12_2OVER3OVER2_HPP_ diff --git a/src/algebra/fields/fp2.hpp b/src/algebra/fields/fp2.hpp index 8bb5afcc..50dc7ab3 100755 --- a/src/algebra/fields/fp2.hpp +++ b/src/algebra/fields/fp2.hpp @@ -9,7 +9,7 @@ #ifndef FP2_HPP_ #define FP2_HPP_ -#include "algebra/fields/fp.hpp" +#include "fp.hpp" #include namespace libff { @@ -115,6 +115,6 @@ template& modulus> Fp_model Fp2_model::Frobenius_coeffs_c1[2]; } // libff -#include "algebra/fields/fp2.tcc" +#include "fp2.tcc" #endif // FP2_HPP_ diff --git a/src/algebra/fields/fp2.tcc b/src/algebra/fields/fp2.tcc index a2f42a9b..6c07811f 100755 --- a/src/algebra/fields/fp2.tcc +++ b/src/algebra/fields/fp2.tcc @@ -10,7 +10,7 @@ #ifndef FP2_TCC_ #define FP2_TCC_ -#include "algebra/fields/field_utils.hpp" +#include "field_utils.hpp" namespace libff { diff --git a/src/algebra/fields/fp3.hpp b/src/algebra/fields/fp3.hpp index b665b495..63cace2e 100755 --- a/src/algebra/fields/fp3.hpp +++ b/src/algebra/fields/fp3.hpp @@ -9,7 +9,7 @@ #ifndef FP3_HPP_ #define FP3_HPP_ -#include "algebra/fields/fp.hpp" +#include "fp.hpp" #include namespace libff { @@ -117,6 +117,6 @@ template& modulus> Fp_model Fp3_model::Frobenius_coeffs_c2[3]; } // libff -#include "algebra/fields/fp3.tcc" +#include "fp3.tcc" #endif // FP3_HPP_ diff --git a/src/algebra/fields/fp3.tcc b/src/algebra/fields/fp3.tcc index d635b0ac..30695676 100755 --- a/src/algebra/fields/fp3.tcc +++ b/src/algebra/fields/fp3.tcc @@ -10,7 +10,7 @@ #ifndef FP3_TCC_ #define FP3_TCC_ -#include "algebra/fields/field_utils.hpp" +#include "field_utils.hpp" namespace libff { diff --git a/src/algebra/fields/fp4.hpp b/src/algebra/fields/fp4.hpp index fbfebb79..aa2b6e02 100755 --- a/src/algebra/fields/fp4.hpp +++ b/src/algebra/fields/fp4.hpp @@ -16,8 +16,8 @@ #ifndef FP4_HPP_ #define FP4_HPP_ -#include "algebra/fields/fp.hpp" -#include "algebra/fields/fp2.hpp" +#include "fp.hpp" +#include "fp2.hpp" namespace libff { @@ -99,6 +99,6 @@ Fp_model Fp4_model::Frobenius_coeffs_c1[4]; } // libff -#include "algebra/fields/fp4.tcc" +#include "fp4.tcc" #endif // FP4_HPP_ diff --git a/src/algebra/fields/fp4.tcc b/src/algebra/fields/fp4.tcc index 8f6ef56b..a7a293da 100755 --- a/src/algebra/fields/fp4.tcc +++ b/src/algebra/fields/fp4.tcc @@ -14,8 +14,8 @@ #ifndef FP4_TCC_ #define FP4_TCC_ -#include "algebra/fields/field_utils.hpp" -#include "algebra/scalar_multiplication/wnaf.hpp" +#include "field_utils.hpp" +#include "../scalar_multiplication/wnaf.hpp" namespace libff { diff --git a/src/algebra/fields/fp6_2over3.hpp b/src/algebra/fields/fp6_2over3.hpp index 9bdc9e23..1fd95585 100755 --- a/src/algebra/fields/fp6_2over3.hpp +++ b/src/algebra/fields/fp6_2over3.hpp @@ -9,9 +9,9 @@ #ifndef FP6_2OVER3_HPP_ #define FP6_2OVER3_HPP_ -#include "algebra/fields/fp.hpp" -#include "algebra/fields/fp2.hpp" -#include "algebra/fields/fp3.hpp" +#include "fp.hpp" +#include "fp2.hpp" +#include "fp3.hpp" namespace libff { @@ -103,6 +103,6 @@ template& modulus> Fp_model Fp6_2over3_model::Frobenius_coeffs_c1[6]; } // libff -#include "algebra/fields/fp6_2over3.tcc" +#include "fp6_2over3.tcc" #endif // FP6_2OVER3_HPP_ diff --git a/src/algebra/fields/fp6_2over3.tcc b/src/algebra/fields/fp6_2over3.tcc index 297e5d97..2d2be67d 100755 --- a/src/algebra/fields/fp6_2over3.tcc +++ b/src/algebra/fields/fp6_2over3.tcc @@ -9,8 +9,8 @@ #ifndef FP6_2OVER3_TCC_ #define FP6_2OVER3_TCC_ -#include "algebra/fields/field_utils.hpp" -#include "algebra/scalar_multiplication/wnaf.hpp" +#include "field_utils.hpp" +#include "../scalar_multiplication/wnaf.hpp" namespace libff { diff --git a/src/algebra/fields/fp6_3over2.hpp b/src/algebra/fields/fp6_3over2.hpp index b368f698..2a08320d 100755 --- a/src/algebra/fields/fp6_3over2.hpp +++ b/src/algebra/fields/fp6_3over2.hpp @@ -9,8 +9,8 @@ #ifndef FP6_3OVER2_HPP_ #define FP6_3OVER2_HPP_ -#include "algebra/fields/fp.hpp" -#include "algebra/fields/fp2.hpp" +#include "fp.hpp" +#include "fp2.hpp" #include namespace libff { @@ -99,6 +99,6 @@ template& modulus> Fp2_model Fp6_3over2_model::Frobenius_coeffs_c2[6]; } // libff -#include "algebra/fields/fp6_3over2.tcc" +#include "fp6_3over2.tcc" #endif // FP6_3OVER2_HPP_ diff --git a/src/algebra/fields/fp6_3over2.tcc b/src/algebra/fields/fp6_3over2.tcc index c1f7f261..b9993736 100755 --- a/src/algebra/fields/fp6_3over2.tcc +++ b/src/algebra/fields/fp6_3over2.tcc @@ -9,7 +9,7 @@ #ifndef FP6_3OVER2_TCC_ #define FP6_3OVER2_TCC_ -#include "algebra/fields/field_utils.hpp" +#include "field_utils.hpp" namespace libff { diff --git a/src/algebra/fields/tests/test_fields.cpp b/src/algebra/fields/tests/test_fields.cpp index 49fc98bd..dd51203a 100755 --- a/src/algebra/fields/tests/test_fields.cpp +++ b/src/algebra/fields/tests/test_fields.cpp @@ -4,16 +4,16 @@ * and contributors (see AUTHORS). * @copyright MIT license (see LICENSE file) *****************************************************************************/ -#include "common/profiling.hpp" -#include "algebra/curves/edwards/edwards_pp.hpp" -#include "algebra/curves/mnt/mnt4/mnt4_pp.hpp" -#include "algebra/curves/mnt/mnt6/mnt6_pp.hpp" +#include "../../../common/profiling.hpp" +#include "../../curves/edwards/edwards_pp.hpp" +#include "../../curves/mnt/mnt4/mnt4_pp.hpp" +#include "../../curves/mnt/mnt6/mnt6_pp.hpp" #ifdef CURVE_BN128 -#include "algebra/curves/bn128/bn128_pp.hpp" +#include "../../curves/bn128/bn128_pp.hpp" #endif -#include "algebra/curves/alt_bn128/alt_bn128_pp.hpp" -#include "algebra/fields/fp6_3over2.hpp" -#include "algebra/fields/fp12_2over3over2.hpp" +#include "../../curves/alt_bn128/alt_bn128_pp.hpp" +#include "../fp6_3over2.hpp" +#include "../fp12_2over3over2.hpp" using namespace libff; diff --git a/src/algebra/scalar_multiplication/multiexp.hpp b/src/algebra/scalar_multiplication/multiexp.hpp index ca08f96c..a92e6865 100755 --- a/src/algebra/scalar_multiplication/multiexp.hpp +++ b/src/algebra/scalar_multiplication/multiexp.hpp @@ -105,6 +105,6 @@ void batch_to_special(std::vector &vec); } // libff -#include "algebra/scalar_multiplication/multiexp.tcc" +#include "multiexp.tcc" #endif // MULTIEXP_HPP_ diff --git a/src/algebra/scalar_multiplication/multiexp.tcc b/src/algebra/scalar_multiplication/multiexp.tcc index a3bfa601..f1058899 100755 --- a/src/algebra/scalar_multiplication/multiexp.tcc +++ b/src/algebra/scalar_multiplication/multiexp.tcc @@ -14,15 +14,15 @@ #ifndef MULTIEXP_TCC_ #define MULTIEXP_TCC_ -#include "algebra/fields/fp_aux.tcc" +#include "../fields/fp_aux.tcc" #include #include #include -#include "common/profiling.hpp" -#include "common/utils.hpp" -#include "algebra/scalar_multiplication/wnaf.hpp" +#include "../../common/profiling.hpp" +#include "../../common/utils.hpp" +#include "wnaf.hpp" namespace libff { diff --git a/src/algebra/scalar_multiplication/wnaf.hpp b/src/algebra/scalar_multiplication/wnaf.hpp index 316ea54c..45a9e865 100755 --- a/src/algebra/scalar_multiplication/wnaf.hpp +++ b/src/algebra/scalar_multiplication/wnaf.hpp @@ -34,6 +34,6 @@ T opt_window_wnaf_exp(const T &base, const bigint &scalar, const size_t scala } // libff -#include "algebra/scalar_multiplication/wnaf.tcc" +#include "wnaf.tcc" #endif // WNAF_HPP_ diff --git a/src/common/default_types/ec_pp.hpp b/src/common/default_types/ec_pp.hpp index 31d91681..c875a027 100755 --- a/src/common/default_types/ec_pp.hpp +++ b/src/common/default_types/ec_pp.hpp @@ -16,35 +16,35 @@ /************************ Pick the elliptic curve ****************************/ #ifdef CURVE_ALT_BN128 -#include "algebra/curves/alt_bn128/alt_bn128_pp.hpp" +#include "../../algebra/curves/alt_bn128/alt_bn128_pp.hpp" namespace libff { typedef alt_bn128_pp default_ec_pp; } // libff #endif #ifdef CURVE_BN128 -#include "algebra/curves/bn128/bn128_pp.hpp" +#include "../../algebra/curves/bn128/bn128_pp.hpp" namespace libff { typedef bn128_pp default_ec_pp; } // libff #endif #ifdef CURVE_EDWARDS -#include "algebra/curves/edwards/edwards_pp.hpp" +#include "../../algebra/curves/edwards/edwards_pp.hpp" namespace libff { typedef edwards_pp default_ec_pp; } // libff #endif #ifdef CURVE_MNT4 -#include "algebra/curves/mnt/mnt4/mnt4_pp.hpp" +#include "../../algebra/curves/mnt/mnt4/mnt4_pp.hpp" namespace libff { typedef mnt4_pp default_ec_pp; } // libff #endif #ifdef CURVE_MNT6 -#include "algebra/curves/mnt/mnt6/mnt6_pp.hpp" +#include "../../algebra/curves/mnt/mnt6/mnt6_pp.hpp" namespace libff { typedef mnt6_pp default_ec_pp; } // libff diff --git a/src/common/double.cpp b/src/common/double.cpp index a03959a3..ecae2163 100755 --- a/src/common/double.cpp +++ b/src/common/double.cpp @@ -1,195 +1,195 @@ -/** @file - ***************************************************************************** - - Implementation of complex domain data type. - - ***************************************************************************** - * @author This file is part of libff, developed by SCIPR Lab - * and contributors (see AUTHORS). - * @copyright MIT license (see LICENSE file) - *****************************************************************************/ - -#include -#include -#include - -#include "algebra/fields/bigint.hpp" - -#include "double.hpp" - -namespace libff { - - const double PI = 3.141592653589793238460264338328L; - - Double::Double() - { - val = std::complex(0, 0); - } - - Double::Double(double real) - { - val = std::complex(real, 0); - } - - Double::Double(double real, double imag) - { - val = std::complex(real, imag); - } - - Double::Double(std::complex num) - { - val = num; - } - - unsigned Double::add_cnt = 0; - unsigned Double::sub_cnt = 0; - unsigned Double::mul_cnt = 0; - unsigned Double::inv_cnt = 0; - - Double Double::operator+(const Double &other) const - { -#ifdef PROFILE_OP_COUNTS - ++add_cnt; -#endif - - return Double(val + other.val); - } - - Double Double::operator-(const Double &other) const - { -#ifdef PROFILE_OP_COUNTS - ++sub_cnt; -#endif - - return Double(val - other.val); - } - - Double Double::operator*(const Double &other) const - { -#ifdef PROFILE_OP_COUNTS - ++mul_cnt; -#endif - - return Double(val * other.val); - } - - Double Double::operator-() const - { - if (val.imag() == 0) return Double(-val.real()); - - return Double(-val.real(), -val.imag()); - } - - Double& Double::operator+=(const Double &other) - { -#ifdef PROFILE_OP_COUNTS - ++add_cnt; -#endif - - this->val = std::complex(val + other.val); - return *this; - } - - Double& Double::operator-=(const Double &other) - { -#ifdef PROFILE_OP_COUNTS - ++sub_cnt; -#endif - - this->val = std::complex(val - other.val); - return *this; - } - - Double& Double::operator*=(const Double &other) - { -#ifdef PROFILE_OP_COUNTS - ++mul_cnt; -#endif - - this->val *= std::complex(other.val); - return *this; - } - - bool Double::operator==(const Double &other) const - { - return (std::abs(val.real() - other.val.real()) < 0.000001) - && (std::abs(val.imag() - other.val.imag()) < 0.000001); - } - - bool Double::operator!=(const Double &other) const - { - return Double(val) == other ? 0 : 1; - } - - bool Double::operator<(const Double &other) const - { - return (val.real() < other.val.real()); - } - - bool Double::operator>(const Double &other) const - { - return (val.real() > other.val.real()); - } - - Double Double::operator^(const libff::bigint<1> power) const - { - return Double(pow(val, power.as_ulong())); - } - - Double Double::operator^(const size_t power) const - { - return Double(pow(val, power)); - } - - Double Double::inverse() const - { -#ifdef PROFILE_OP_COUNTS - ++inv_cnt; -#endif - - return Double(std::complex(1) / val); - } - - libff::bigint<1> Double::as_bigint() const - { - return libff::bigint<1>(val.real()); - } - - unsigned long Double::as_ulong() const - { - return round(val.real()); - } - - Double Double::squared() const - { - return Double(val * val); - } - - Double Double::one() - { - return Double(1); - } - - Double Double::zero() - { - return Double(0); - } - - Double Double::random_element() - { - return Double(std::rand() % 1001); - } - - Double Double::geometric_generator() - { - return Double(2); - } - - Double Double::arithmetic_generator() - { - return Double(1); - } - - Double Double::multiplicative_generator = Double(2); - -} // libff +/** @file + ***************************************************************************** + + Implementation of complex domain data type. + + ***************************************************************************** + * @author This file is part of libff, developed by SCIPR Lab + * and contributors (see AUTHORS). + * @copyright MIT license (see LICENSE file) + *****************************************************************************/ + +#include +#include +#include + +#include "../algebra/fields/bigint.hpp" + +#include "double.hpp" + +namespace libff { + + const double PI = 3.141592653589793238460264338328L; + + Double::Double() + { + val = std::complex(0, 0); + } + + Double::Double(double real) + { + val = std::complex(real, 0); + } + + Double::Double(double real, double imag) + { + val = std::complex(real, imag); + } + + Double::Double(std::complex num) + { + val = num; + } + + unsigned Double::add_cnt = 0; + unsigned Double::sub_cnt = 0; + unsigned Double::mul_cnt = 0; + unsigned Double::inv_cnt = 0; + + Double Double::operator+(const Double &other) const + { +#ifdef PROFILE_OP_COUNTS + ++add_cnt; +#endif + + return Double(val + other.val); + } + + Double Double::operator-(const Double &other) const + { +#ifdef PROFILE_OP_COUNTS + ++sub_cnt; +#endif + + return Double(val - other.val); + } + + Double Double::operator*(const Double &other) const + { +#ifdef PROFILE_OP_COUNTS + ++mul_cnt; +#endif + + return Double(val * other.val); + } + + Double Double::operator-() const + { + if (val.imag() == 0) return Double(-val.real()); + + return Double(-val.real(), -val.imag()); + } + + Double& Double::operator+=(const Double &other) + { +#ifdef PROFILE_OP_COUNTS + ++add_cnt; +#endif + + this->val = std::complex(val + other.val); + return *this; + } + + Double& Double::operator-=(const Double &other) + { +#ifdef PROFILE_OP_COUNTS + ++sub_cnt; +#endif + + this->val = std::complex(val - other.val); + return *this; + } + + Double& Double::operator*=(const Double &other) + { +#ifdef PROFILE_OP_COUNTS + ++mul_cnt; +#endif + + this->val *= std::complex(other.val); + return *this; + } + + bool Double::operator==(const Double &other) const + { + return (std::abs(val.real() - other.val.real()) < 0.000001) + && (std::abs(val.imag() - other.val.imag()) < 0.000001); + } + + bool Double::operator!=(const Double &other) const + { + return Double(val) == other ? 0 : 1; + } + + bool Double::operator<(const Double &other) const + { + return (val.real() < other.val.real()); + } + + bool Double::operator>(const Double &other) const + { + return (val.real() > other.val.real()); + } + + Double Double::operator^(const libff::bigint<1> power) const + { + return Double(pow(val, power.as_ulong())); + } + + Double Double::operator^(const size_t power) const + { + return Double(pow(val, power)); + } + + Double Double::inverse() const + { +#ifdef PROFILE_OP_COUNTS + ++inv_cnt; +#endif + + return Double(std::complex(1) / val); + } + + libff::bigint<1> Double::as_bigint() const + { + return libff::bigint<1>(val.real()); + } + + unsigned long Double::as_ulong() const + { + return round(val.real()); + } + + Double Double::squared() const + { + return Double(val * val); + } + + Double Double::one() + { + return Double(1); + } + + Double Double::zero() + { + return Double(0); + } + + Double Double::random_element() + { + return Double(std::rand() % 1001); + } + + Double Double::geometric_generator() + { + return Double(2); + } + + Double Double::arithmetic_generator() + { + return Double(1); + } + + Double Double::multiplicative_generator = Double(2); + +} // libff diff --git a/src/common/double.hpp b/src/common/double.hpp index 503b9c87..195c1118 100755 --- a/src/common/double.hpp +++ b/src/common/double.hpp @@ -1,73 +1,73 @@ -/** @file - ***************************************************************************** - - Declaration of complex domain data type. - - ***************************************************************************** - * @author This file is part of libff, developed by SCIPR Lab - * and contributors (see AUTHORS). - * @copyright MIT license (see LICENSE file) - *****************************************************************************/ - -#ifndef DOUBLE_HPP_ -#define DOUBLE_HPP_ - -#include -#include "algebra/fields/bigint.hpp" - -namespace libff { - - class Double - { - public: - std::complex val; - - Double(); - - Double(double real); - - Double(double real, double imag); - - Double(std::complex num); - - static unsigned add_cnt; - static unsigned sub_cnt; - static unsigned mul_cnt; - static unsigned inv_cnt; - - Double operator+(const Double &other) const; - Double operator-(const Double &other) const; - Double operator*(const Double &other) const; - Double operator-() const; - - Double& operator+=(const Double &other); - Double& operator-=(const Double &other); - Double& operator*=(const Double &other); - - bool operator==(const Double &other) const; - bool operator!=(const Double &other) const; - - bool operator<(const Double &other) const; - bool operator>(const Double &other) const; - - Double operator^(const libff::bigint<1> power) const; - Double operator^(const size_t power) const; - - libff::bigint<1> as_bigint() const; - unsigned long as_ulong() const; - Double inverse() const; - Double squared() const; - - static Double one(); - static Double zero(); - static Double random_element(); - static Double geometric_generator(); - static Double arithmetic_generator(); - - static Double multiplicative_generator; - static Double root_of_unity; // See get_root_of_unity() in field_utils - static size_t s; - }; -} // libff - -#endif // DOUBLE_HPP_ +/** @file + ***************************************************************************** + + Declaration of complex domain data type. + + ***************************************************************************** + * @author This file is part of libff, developed by SCIPR Lab + * and contributors (see AUTHORS). + * @copyright MIT license (see LICENSE file) + *****************************************************************************/ + +#ifndef DOUBLE_HPP_ +#define DOUBLE_HPP_ + +#include +#include "../algebra/fields/bigint.hpp" + +namespace libff { + + class Double + { + public: + std::complex val; + + Double(); + + Double(double real); + + Double(double real, double imag); + + Double(std::complex num); + + static unsigned add_cnt; + static unsigned sub_cnt; + static unsigned mul_cnt; + static unsigned inv_cnt; + + Double operator+(const Double &other) const; + Double operator-(const Double &other) const; + Double operator*(const Double &other) const; + Double operator-() const; + + Double& operator+=(const Double &other); + Double& operator-=(const Double &other); + Double& operator*=(const Double &other); + + bool operator==(const Double &other) const; + bool operator!=(const Double &other) const; + + bool operator<(const Double &other) const; + bool operator>(const Double &other) const; + + Double operator^(const libff::bigint<1> power) const; + Double operator^(const size_t power) const; + + libff::bigint<1> as_bigint() const; + unsigned long as_ulong() const; + Double inverse() const; + Double squared() const; + + static Double one(); + static Double zero(); + static Double random_element(); + static Double geometric_generator(); + static Double arithmetic_generator(); + + static Double multiplicative_generator; + static Double root_of_unity; // See get_root_of_unity() in field_utils + static size_t s; + }; +} // libff + +#endif // DOUBLE_HPP_ diff --git a/src/common/profiling.cpp b/src/common/profiling.cpp index 6c7032e1..764d8176 100755 --- a/src/common/profiling.cpp +++ b/src/common/profiling.cpp @@ -11,7 +11,7 @@ * @copyright MIT license (see LICENSE file) *****************************************************************************/ -#include "common/profiling.hpp" +#include "profiling.hpp" #include #include #include @@ -19,8 +19,8 @@ #include #include #include -#include "common/default_types/ec_pp.hpp" -#include "common/utils.hpp" +#include "default_types/ec_pp.hpp" +#include "utils.hpp" #ifndef NO_PROCPS #include diff --git a/src/common/rng.hpp b/src/common/rng.hpp index 50d9f1b4..1ebf700e 100755 --- a/src/common/rng.hpp +++ b/src/common/rng.hpp @@ -21,6 +21,6 @@ FieldT SHA512_rng(const uint64_t idx); } // libff -#include "common/rng.tcc" +#include "rng.tcc" #endif // RNG_HPP_ diff --git a/src/common/serialization.hpp b/src/common/serialization.hpp index f0ce4059..eabefab5 100755 --- a/src/common/serialization.hpp +++ b/src/common/serialization.hpp @@ -101,6 +101,6 @@ std::istream& operator>>(std::istream& in, std::set &s); } // libff -#include "common/serialization.tcc" +#include "serialization.tcc" #endif // SERIALIZATION_HPP_ diff --git a/src/common/serialization.tcc b/src/common/serialization.tcc index 322ef1c8..cc86b9b6 100755 --- a/src/common/serialization.tcc +++ b/src/common/serialization.tcc @@ -16,7 +16,7 @@ #include #include -#include "common/utils.hpp" +#include "utils.hpp" namespace libff { diff --git a/src/common/utils.cpp b/src/common/utils.cpp index 3830075b..f7059829 100755 --- a/src/common/utils.cpp +++ b/src/common/utils.cpp @@ -11,7 +11,7 @@ #include #include #include -#include "common/utils.hpp" +#include "utils.hpp" namespace libff { diff --git a/src/common/utils.hpp b/src/common/utils.hpp index 4cb05123..1d199f0f 100755 --- a/src/common/utils.hpp +++ b/src/common/utils.hpp @@ -58,5 +58,5 @@ size_t size_in_bits(const std::vector &v); } // libff -#include "common/utils.tcc" /* note that utils has a templatized part (utils.tcc) and non-templatized part (utils.cpp) */ +#include "utils.tcc" /* note that utils has a templatized part (utils.tcc) and non-templatized part (utils.cpp) */ #endif // UTILS_HPP_