From cfe6eaf50ba186077564d36c4659b60dc90ab8b4 Mon Sep 17 00:00:00 2001 From: Aleksejs Popovs Date: Tue, 20 Jun 2017 16:30:09 -0400 Subject: [PATCH 1/2] Converting double.{cpp,hpp} to Unix line endings --- src/common/double.cpp | 390 +++++++++++++++++++++--------------------- src/common/double.hpp | 146 ++++++++-------- 2 files changed, 268 insertions(+), 268 deletions(-) diff --git a/src/common/double.cpp b/src/common/double.cpp index a03959a3..a9dd3fc5 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..95e8dece 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_ From 85cfc9aaa9d93c2c31b12ad5a78de8ba35fbf1a5 Mon Sep 17 00:00:00 2001 From: Aleksejs Popovs Date: Tue, 20 Jun 2017 19:56:49 -0400 Subject: [PATCH 2/2] Make local includes directory-qualified. This reduces ambiguity and lets other projects include libff without having it pollute the project's include path. --- CMakeLists.txt | 2 +- README.md | 6 +++--- {src => libff}/CMakeLists.txt | 4 +--- .../algebra/curves/alt_bn128/alt_bn128_g1.cpp | 2 +- .../algebra/curves/alt_bn128/alt_bn128_g1.hpp | 4 ++-- .../algebra/curves/alt_bn128/alt_bn128_g2.cpp | 2 +- .../algebra/curves/alt_bn128/alt_bn128_g2.hpp | 4 ++-- .../algebra/curves/alt_bn128/alt_bn128_init.cpp | 6 +++--- .../algebra/curves/alt_bn128/alt_bn128_init.hpp | 10 +++++----- .../curves/alt_bn128/alt_bn128_pairing.cpp | 10 +++++----- .../curves/alt_bn128/alt_bn128_pairing.hpp | 2 +- .../algebra/curves/alt_bn128/alt_bn128_pp.cpp | 2 +- .../algebra/curves/alt_bn128/alt_bn128_pp.hpp | 10 +++++----- {src => libff}/algebra/curves/bn128/bn128_g1.cpp | 4 ++-- {src => libff}/algebra/curves/bn128/bn128_g1.hpp | 4 ++-- {src => libff}/algebra/curves/bn128/bn128_g2.cpp | 4 ++-- {src => libff}/algebra/curves/bn128/bn128_g2.hpp | 4 ++-- {src => libff}/algebra/curves/bn128/bn128_gt.cpp | 2 +- {src => libff}/algebra/curves/bn128/bn128_gt.hpp | 4 ++-- .../algebra/curves/bn128/bn128_init.cpp | 8 ++++---- .../algebra/curves/bn128/bn128_init.hpp | 4 ++-- .../algebra/curves/bn128/bn128_pairing.cpp | 12 ++++++------ .../algebra/curves/bn128/bn128_pairing.hpp | 6 +++--- {src => libff}/algebra/curves/bn128/bn128_pp.cpp | 4 ++-- {src => libff}/algebra/curves/bn128/bn128_pp.hpp | 12 ++++++------ {src => libff}/algebra/curves/bn128/bn_utils.hpp | 2 +- {src => libff}/algebra/curves/bn128/bn_utils.tcc | 0 {src => libff}/algebra/curves/curve_utils.hpp | 4 ++-- {src => libff}/algebra/curves/curve_utils.tcc | 0 .../algebra/curves/edwards/edwards_g1.cpp | 2 +- .../algebra/curves/edwards/edwards_g1.hpp | 4 ++-- .../algebra/curves/edwards/edwards_g2.cpp | 2 +- .../algebra/curves/edwards/edwards_g2.hpp | 4 ++-- .../algebra/curves/edwards/edwards_init.cpp | 6 +++--- .../algebra/curves/edwards/edwards_init.hpp | 8 ++++---- .../algebra/curves/edwards/edwards_pairing.cpp | 10 +++++----- .../algebra/curves/edwards/edwards_pairing.hpp | 2 +- .../algebra/curves/edwards/edwards_pp.cpp | 2 +- .../algebra/curves/edwards/edwards_pp.hpp | 10 +++++----- .../algebra/curves/mnt/mnt4/mnt4_g1.cpp | 2 +- .../algebra/curves/mnt/mnt4/mnt4_g1.hpp | 4 ++-- .../algebra/curves/mnt/mnt4/mnt4_g2.cpp | 2 +- .../algebra/curves/mnt/mnt4/mnt4_g2.hpp | 4 ++-- .../algebra/curves/mnt/mnt4/mnt4_init.cpp | 6 +++--- .../algebra/curves/mnt/mnt4/mnt4_init.hpp | 10 +++++----- .../algebra/curves/mnt/mnt4/mnt4_pairing.cpp | 12 ++++++------ .../algebra/curves/mnt/mnt4/mnt4_pairing.hpp | 2 +- .../algebra/curves/mnt/mnt4/mnt4_pp.cpp | 2 +- .../algebra/curves/mnt/mnt4/mnt4_pp.hpp | 10 +++++----- .../algebra/curves/mnt/mnt46_common.cpp | 2 +- .../algebra/curves/mnt/mnt46_common.hpp | 2 +- .../algebra/curves/mnt/mnt6/mnt6_g1.cpp | 2 +- .../algebra/curves/mnt/mnt6/mnt6_g1.hpp | 4 ++-- .../algebra/curves/mnt/mnt6/mnt6_g2.cpp | 2 +- .../algebra/curves/mnt/mnt6/mnt6_g2.hpp | 4 ++-- .../algebra/curves/mnt/mnt6/mnt6_init.cpp | 6 +++--- .../algebra/curves/mnt/mnt6/mnt6_init.hpp | 10 +++++----- .../algebra/curves/mnt/mnt6/mnt6_pairing.cpp | 12 ++++++------ .../algebra/curves/mnt/mnt6/mnt6_pairing.hpp | 2 +- .../algebra/curves/mnt/mnt6/mnt6_pp.cpp | 2 +- .../algebra/curves/mnt/mnt6/mnt6_pp.hpp | 10 +++++----- {src => libff}/algebra/curves/public_params.hpp | 0 .../algebra/curves/tests/test_bilinearity.cpp | 12 ++++++------ .../algebra/curves/tests/test_groups.cpp | 12 ++++++------ .../algebra/exponentiation/exponentiation.hpp | 4 ++-- .../algebra/exponentiation/exponentiation.tcc | 2 +- {src => libff}/algebra/fields/bigint.hpp | 4 ++-- {src => libff}/algebra/fields/bigint.tcc | 0 {src => libff}/algebra/fields/field_utils.hpp | 8 ++++---- {src => libff}/algebra/fields/field_utils.tcc | 4 ++-- {src => libff}/algebra/fields/fp.hpp | 6 +++--- {src => libff}/algebra/fields/fp.tcc | 4 ++-- .../algebra/fields/fp12_2over3over2.hpp | 8 ++++---- .../algebra/fields/fp12_2over3over2.tcc | 0 {src => libff}/algebra/fields/fp2.hpp | 4 ++-- {src => libff}/algebra/fields/fp2.tcc | 2 +- {src => libff}/algebra/fields/fp3.hpp | 4 ++-- {src => libff}/algebra/fields/fp3.tcc | 2 +- {src => libff}/algebra/fields/fp4.hpp | 6 +++--- {src => libff}/algebra/fields/fp4.tcc | 4 ++-- {src => libff}/algebra/fields/fp6_2over3.hpp | 8 ++++---- {src => libff}/algebra/fields/fp6_2over3.tcc | 4 ++-- {src => libff}/algebra/fields/fp6_3over2.hpp | 6 +++--- {src => libff}/algebra/fields/fp6_3over2.tcc | 2 +- {src => libff}/algebra/fields/fp_aux.tcc | 0 .../algebra/fields/tests/test_fields.cpp | 16 ++++++++-------- .../algebra/scalar_multiplication/multiexp.hpp | 2 +- .../algebra/scalar_multiplication/multiexp.tcc | 8 ++++---- .../algebra/scalar_multiplication/wnaf.hpp | 2 +- .../algebra/scalar_multiplication/wnaf.tcc | 0 {src => libff}/common/default_types/ec_pp.hpp | 10 +++++----- {src => libff}/common/double.cpp | 4 ++-- {src => libff}/common/double.hpp | 2 +- {src => libff}/common/profiling.cpp | 6 +++--- {src => libff}/common/profiling.hpp | 0 {src => libff}/common/rng.hpp | 2 +- {src => libff}/common/rng.tcc | 0 {src => libff}/common/serialization.hpp | 2 +- {src => libff}/common/serialization.tcc | 2 +- {src => libff}/common/template_utils.hpp | 0 {src => libff}/common/utils.cpp | 2 +- {src => libff}/common/utils.hpp | 2 +- {src => libff}/common/utils.tcc | 0 103 files changed, 232 insertions(+), 234 deletions(-) rename {src => libff}/CMakeLists.txt (97%) rename {src => libff}/algebra/curves/alt_bn128/alt_bn128_g1.cpp (99%) rename {src => libff}/algebra/curves/alt_bn128/alt_bn128_g1.hpp (96%) rename {src => libff}/algebra/curves/alt_bn128/alt_bn128_g2.cpp (99%) rename {src => libff}/algebra/curves/alt_bn128/alt_bn128_g2.hpp (96%) rename {src => libff}/algebra/curves/alt_bn128/alt_bn128_init.cpp (99%) rename {src => libff}/algebra/curves/alt_bn128/alt_bn128_init.hpp (90%) rename {src => libff}/algebra/curves/alt_bn128/alt_bn128_pairing.cpp (98%) rename {src => libff}/algebra/curves/alt_bn128/alt_bn128_pairing.hpp (98%) rename {src => libff}/algebra/curves/alt_bn128/alt_bn128_pp.cpp (96%) rename {src => libff}/algebra/curves/alt_bn128/alt_bn128_pp.hpp (86%) rename {src => libff}/algebra/curves/bn128/bn128_g1.cpp (99%) rename {src => libff}/algebra/curves/bn128/bn128_g1.hpp (96%) rename {src => libff}/algebra/curves/bn128/bn128_g2.cpp (99%) rename {src => libff}/algebra/curves/bn128/bn128_g2.hpp (96%) rename {src => libff}/algebra/curves/bn128/bn128_gt.cpp (96%) rename {src => libff}/algebra/curves/bn128/bn128_gt.hpp (94%) rename {src => libff}/algebra/curves/bn128/bn128_init.cpp (98%) rename {src => libff}/algebra/curves/bn128/bn128_init.hpp (93%) rename {src => libff}/algebra/curves/bn128/bn128_pairing.cpp (95%) rename {src => libff}/algebra/curves/bn128/bn128_pairing.hpp (92%) rename {src => libff}/algebra/curves/bn128/bn128_pp.cpp (96%) rename {src => libff}/algebra/curves/bn128/bn128_pp.hpp (84%) rename {src => libff}/algebra/curves/bn128/bn_utils.hpp (91%) rename {src => libff}/algebra/curves/bn128/bn_utils.tcc (100%) rename {src => libff}/algebra/curves/curve_utils.hpp (86%) rename {src => libff}/algebra/curves/curve_utils.tcc (100%) rename {src => libff}/algebra/curves/edwards/edwards_g1.cpp (99%) rename {src => libff}/algebra/curves/edwards/edwards_g1.hpp (96%) rename {src => libff}/algebra/curves/edwards/edwards_g2.cpp (99%) rename {src => libff}/algebra/curves/edwards/edwards_g2.hpp (96%) rename {src => libff}/algebra/curves/edwards/edwards_init.cpp (98%) rename {src => libff}/algebra/curves/edwards/edwards_init.hpp (92%) rename {src => libff}/algebra/curves/edwards/edwards_pairing.cpp (99%) rename {src => libff}/algebra/curves/edwards/edwards_pairing.hpp (98%) rename {src => libff}/algebra/curves/edwards/edwards_pp.cpp (96%) rename {src => libff}/algebra/curves/edwards/edwards_pp.hpp (86%) rename {src => libff}/algebra/curves/mnt/mnt4/mnt4_g1.cpp (99%) rename {src => libff}/algebra/curves/mnt/mnt4/mnt4_g1.hpp (96%) rename {src => libff}/algebra/curves/mnt/mnt4/mnt4_g2.cpp (99%) rename {src => libff}/algebra/curves/mnt/mnt4/mnt4_g2.hpp (96%) rename {src => libff}/algebra/curves/mnt/mnt4/mnt4_init.cpp (98%) rename {src => libff}/algebra/curves/mnt/mnt4/mnt4_init.hpp (90%) rename {src => libff}/algebra/curves/mnt/mnt4/mnt4_pairing.cpp (98%) rename {src => libff}/algebra/curves/mnt/mnt4/mnt4_pairing.hpp (98%) rename {src => libff}/algebra/curves/mnt/mnt4/mnt4_pp.cpp (98%) rename {src => libff}/algebra/curves/mnt/mnt4/mnt4_pp.hpp (92%) rename {src => libff}/algebra/curves/mnt/mnt46_common.cpp (92%) rename {src => libff}/algebra/curves/mnt/mnt46_common.hpp (95%) rename {src => libff}/algebra/curves/mnt/mnt6/mnt6_g1.cpp (99%) rename {src => libff}/algebra/curves/mnt/mnt6/mnt6_g1.hpp (96%) rename {src => libff}/algebra/curves/mnt/mnt6/mnt6_g2.cpp (99%) rename {src => libff}/algebra/curves/mnt/mnt6/mnt6_g2.hpp (96%) rename {src => libff}/algebra/curves/mnt/mnt6/mnt6_init.cpp (99%) rename {src => libff}/algebra/curves/mnt/mnt6/mnt6_init.hpp (90%) rename {src => libff}/algebra/curves/mnt/mnt6/mnt6_pairing.cpp (98%) rename {src => libff}/algebra/curves/mnt/mnt6/mnt6_pairing.hpp (98%) rename {src => libff}/algebra/curves/mnt/mnt6/mnt6_pp.cpp (98%) rename {src => libff}/algebra/curves/mnt/mnt6/mnt6_pp.hpp (92%) rename {src => libff}/algebra/curves/public_params.hpp (100%) rename {src => libff}/algebra/curves/tests/test_bilinearity.cpp (92%) rename {src => libff}/algebra/curves/tests/test_groups.cpp (93%) rename {src => libff}/algebra/exponentiation/exponentiation.hpp (88%) rename {src => libff}/algebra/exponentiation/exponentiation.tcc (97%) rename {src => libff}/algebra/fields/bigint.hpp (96%) rename {src => libff}/algebra/fields/bigint.tcc (100%) rename {src => libff}/algebra/fields/field_utils.hpp (91%) rename {src => libff}/algebra/fields/field_utils.tcc (98%) rename {src => libff}/algebra/fields/fp.hpp (97%) rename {src => libff}/algebra/fields/fp.tcc (99%) rename {src => libff}/algebra/fields/fp12_2over3over2.hpp (96%) rename {src => libff}/algebra/fields/fp12_2over3over2.tcc (100%) rename {src => libff}/algebra/fields/fp2.hpp (98%) rename {src => libff}/algebra/fields/fp2.tcc (99%) rename {src => libff}/algebra/fields/fp3.hpp (98%) rename {src => libff}/algebra/fields/fp3.tcc (99%) rename {src => libff}/algebra/fields/fp4.hpp (96%) rename {src => libff}/algebra/fields/fp4.tcc (98%) rename {src => libff}/algebra/fields/fp6_2over3.hpp (96%) rename {src => libff}/algebra/fields/fp6_2over3.tcc (98%) rename {src => libff}/algebra/fields/fp6_3over2.hpp (96%) rename {src => libff}/algebra/fields/fp6_3over2.tcc (99%) rename {src => libff}/algebra/fields/fp_aux.tcc (100%) rename {src => libff}/algebra/fields/tests/test_fields.cpp (95%) rename {src => libff}/algebra/scalar_multiplication/multiexp.hpp (98%) rename {src => libff}/algebra/scalar_multiplication/multiexp.tcc (99%) rename {src => libff}/algebra/scalar_multiplication/wnaf.hpp (95%) rename {src => libff}/algebra/scalar_multiplication/wnaf.tcc (100%) rename {src => libff}/common/default_types/ec_pp.hpp (80%) rename {src => libff}/common/double.cpp (97%) rename {src => libff}/common/double.hpp (97%) rename {src => libff}/common/profiling.cpp (98%) rename {src => libff}/common/profiling.hpp (100%) rename {src => libff}/common/rng.hpp (95%) rename {src => libff}/common/rng.tcc (100%) rename {src => libff}/common/serialization.hpp (98%) rename {src => libff}/common/serialization.tcc (99%) rename {src => libff}/common/template_utils.hpp (100%) rename {src => libff}/common/utils.cpp (98%) rename {src => libff}/common/utils.hpp (93%) rename {src => libff}/common/utils.tcc (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 13cb40b2..9f8f155b 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -228,4 +228,4 @@ endif(CCACHE_FOUND) add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND}) add_subdirectory(third_party) -add_subdirectory(src) +add_subdirectory(libff) diff --git a/README.md b/README.md index 12543031..c7ca34cd 100755 --- a/README.md +++ b/README.md @@ -13,9 +13,9 @@ ___libff___ is a C++ library for finite fields and elliptic curves. The library The directory structure is as follows: -* [__src__](src): C++ source code, containing the following modules: - * [__algebra__](src/algebra): fields and elliptic curve groups - * [__common__](src/common): miscellaneous utilities +* [__libff__](libff): C++ source code, containing the following modules: + * [__algebra__](libff/algebra): fields and elliptic curve groups + * [__common__](libff/common): miscellaneous utilities * [__third\_party__](third_party): third party libraries ## Elliptic curve choices diff --git a/src/CMakeLists.txt b/libff/CMakeLists.txt similarity index 97% rename from src/CMakeLists.txt rename to libff/CMakeLists.txt index 27986c90..4995b754 100755 --- a/src/CMakeLists.txt +++ b/libff/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/libff/algebra/curves/alt_bn128/alt_bn128_g1.cpp similarity index 99% rename from src/algebra/curves/alt_bn128/alt_bn128_g1.cpp rename to libff/algebra/curves/alt_bn128/alt_bn128_g1.cpp index 37c119a4..cd5bb778 100755 --- a/src/algebra/curves/alt_bn128/alt_bn128_g1.cpp +++ b/libff/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 namespace libff { diff --git a/src/algebra/curves/alt_bn128/alt_bn128_g1.hpp b/libff/algebra/curves/alt_bn128/alt_bn128_g1.hpp similarity index 96% rename from src/algebra/curves/alt_bn128/alt_bn128_g1.hpp rename to libff/algebra/curves/alt_bn128/alt_bn128_g1.hpp index 1199cc7b..ea044deb 100755 --- a/src/algebra/curves/alt_bn128/alt_bn128_g1.hpp +++ b/libff/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 +#include namespace libff { diff --git a/src/algebra/curves/alt_bn128/alt_bn128_g2.cpp b/libff/algebra/curves/alt_bn128/alt_bn128_g2.cpp similarity index 99% rename from src/algebra/curves/alt_bn128/alt_bn128_g2.cpp rename to libff/algebra/curves/alt_bn128/alt_bn128_g2.cpp index 7c3035c3..8887347e 100755 --- a/src/algebra/curves/alt_bn128/alt_bn128_g2.cpp +++ b/libff/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 namespace libff { diff --git a/src/algebra/curves/alt_bn128/alt_bn128_g2.hpp b/libff/algebra/curves/alt_bn128/alt_bn128_g2.hpp similarity index 96% rename from src/algebra/curves/alt_bn128/alt_bn128_g2.hpp rename to libff/algebra/curves/alt_bn128/alt_bn128_g2.hpp index b3b58984..29441f0d 100755 --- a/src/algebra/curves/alt_bn128/alt_bn128_g2.hpp +++ b/libff/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 +#include namespace libff { diff --git a/src/algebra/curves/alt_bn128/alt_bn128_init.cpp b/libff/algebra/curves/alt_bn128/alt_bn128_init.cpp similarity index 99% rename from src/algebra/curves/alt_bn128/alt_bn128_init.cpp rename to libff/algebra/curves/alt_bn128/alt_bn128_init.cpp index af554643..a9bf336c 100755 --- a/src/algebra/curves/alt_bn128/alt_bn128_init.cpp +++ b/libff/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 +#include +#include namespace libff { diff --git a/src/algebra/curves/alt_bn128/alt_bn128_init.hpp b/libff/algebra/curves/alt_bn128/alt_bn128_init.hpp similarity index 90% rename from src/algebra/curves/alt_bn128/alt_bn128_init.hpp rename to libff/algebra/curves/alt_bn128/alt_bn128_init.hpp index 92e85b34..a8702261 100755 --- a/src/algebra/curves/alt_bn128/alt_bn128_init.hpp +++ b/libff/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 +#include +#include +#include +#include namespace libff { diff --git a/src/algebra/curves/alt_bn128/alt_bn128_pairing.cpp b/libff/algebra/curves/alt_bn128/alt_bn128_pairing.cpp similarity index 98% rename from src/algebra/curves/alt_bn128/alt_bn128_pairing.cpp rename to libff/algebra/curves/alt_bn128/alt_bn128_pairing.cpp index b1434de7..08536c1f 100755 --- a/src/algebra/curves/alt_bn128/alt_bn128_pairing.cpp +++ b/libff/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 +#include +#include +#include #include -#include "common/profiling.hpp" +#include namespace libff { diff --git a/src/algebra/curves/alt_bn128/alt_bn128_pairing.hpp b/libff/algebra/curves/alt_bn128/alt_bn128_pairing.hpp similarity index 98% rename from src/algebra/curves/alt_bn128/alt_bn128_pairing.hpp rename to libff/algebra/curves/alt_bn128/alt_bn128_pairing.hpp index 687d0c67..2ad4250a 100755 --- a/src/algebra/curves/alt_bn128/alt_bn128_pairing.hpp +++ b/libff/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 namespace libff { diff --git a/src/algebra/curves/alt_bn128/alt_bn128_pp.cpp b/libff/algebra/curves/alt_bn128/alt_bn128_pp.cpp similarity index 96% rename from src/algebra/curves/alt_bn128/alt_bn128_pp.cpp rename to libff/algebra/curves/alt_bn128/alt_bn128_pp.cpp index 3bc8eb50..a26f89c7 100755 --- a/src/algebra/curves/alt_bn128/alt_bn128_pp.cpp +++ b/libff/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 namespace libff { diff --git a/src/algebra/curves/alt_bn128/alt_bn128_pp.hpp b/libff/algebra/curves/alt_bn128/alt_bn128_pp.hpp similarity index 86% rename from src/algebra/curves/alt_bn128/alt_bn128_pp.hpp rename to libff/algebra/curves/alt_bn128/alt_bn128_pp.hpp index 2024ca26..c13672bd 100755 --- a/src/algebra/curves/alt_bn128/alt_bn128_pp.hpp +++ b/libff/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 +#include +#include +#include +#include namespace libff { diff --git a/src/algebra/curves/bn128/bn128_g1.cpp b/libff/algebra/curves/bn128/bn128_g1.cpp similarity index 99% rename from src/algebra/curves/bn128/bn128_g1.cpp rename to libff/algebra/curves/bn128/bn128_g1.cpp index f0e96469..44685782 100755 --- a/src/algebra/curves/bn128/bn128_g1.cpp +++ b/libff/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 +#include namespace libff { diff --git a/src/algebra/curves/bn128/bn128_g1.hpp b/libff/algebra/curves/bn128/bn128_g1.hpp similarity index 96% rename from src/algebra/curves/bn128/bn128_g1.hpp rename to libff/algebra/curves/bn128/bn128_g1.hpp index d022df3a..ca0d3dbc 100755 --- a/src/algebra/curves/bn128/bn128_g1.hpp +++ b/libff/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 +#include #include "third_party/ate-pairing/include/bn.h" namespace libff { diff --git a/src/algebra/curves/bn128/bn128_g2.cpp b/libff/algebra/curves/bn128/bn128_g2.cpp similarity index 99% rename from src/algebra/curves/bn128/bn128_g2.cpp rename to libff/algebra/curves/bn128/bn128_g2.cpp index e90ece19..7a6c3476 100755 --- a/src/algebra/curves/bn128/bn128_g2.cpp +++ b/libff/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 +#include namespace libff { diff --git a/src/algebra/curves/bn128/bn128_g2.hpp b/libff/algebra/curves/bn128/bn128_g2.hpp similarity index 96% rename from src/algebra/curves/bn128/bn128_g2.hpp rename to libff/algebra/curves/bn128/bn128_g2.hpp index 98d9420c..edad5064 100755 --- a/src/algebra/curves/bn128/bn128_g2.hpp +++ b/libff/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 +#include #include "third_party/ate-pairing/include/bn.h" namespace libff { diff --git a/src/algebra/curves/bn128/bn128_gt.cpp b/libff/algebra/curves/bn128/bn128_gt.cpp similarity index 96% rename from src/algebra/curves/bn128/bn128_gt.cpp rename to libff/algebra/curves/bn128/bn128_gt.cpp index 586430e0..9cbcf6a7 100755 --- a/src/algebra/curves/bn128/bn128_gt.cpp +++ b/libff/algebra/curves/bn128/bn128_gt.cpp @@ -5,7 +5,7 @@ * @copyright MIT license (see LICENSE file) *****************************************************************************/ -#include "algebra/curves/bn128/bn128_gt.hpp" +#include namespace libff { diff --git a/src/algebra/curves/bn128/bn128_gt.hpp b/libff/algebra/curves/bn128/bn128_gt.hpp similarity index 94% rename from src/algebra/curves/bn128/bn128_gt.hpp rename to libff/algebra/curves/bn128/bn128_gt.hpp index 3423ec9c..563f390e 100755 --- a/src/algebra/curves/bn128/bn128_gt.hpp +++ b/libff/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 +#include #include #include "third_party/ate-pairing/include/bn.h" diff --git a/src/algebra/curves/bn128/bn128_init.cpp b/libff/algebra/curves/bn128/bn128_init.cpp similarity index 98% rename from src/algebra/curves/bn128/bn128_init.cpp rename to libff/algebra/curves/bn128/bn128_init.cpp index 88054699..87ab3691 100755 --- a/src/algebra/curves/bn128/bn128_init.cpp +++ b/libff/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 +#include +#include +#include namespace libff { diff --git a/src/algebra/curves/bn128/bn128_init.hpp b/libff/algebra/curves/bn128/bn128_init.hpp similarity index 93% rename from src/algebra/curves/bn128/bn128_init.hpp rename to libff/algebra/curves/bn128/bn128_init.hpp index 3706d410..f75e1569 100755 --- a/src/algebra/curves/bn128/bn128_init.hpp +++ b/libff/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 +#include #include "third_party/ate-pairing/include/bn.h" namespace libff { diff --git a/src/algebra/curves/bn128/bn128_pairing.cpp b/libff/algebra/curves/bn128/bn128_pairing.cpp similarity index 95% rename from src/algebra/curves/bn128/bn128_pairing.cpp rename to libff/algebra/curves/bn128/bn128_pairing.cpp index c7dcf84e..d13ce4cb 100755 --- a/src/algebra/curves/bn128/bn128_pairing.cpp +++ b/libff/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 +#include +#include +#include +#include +#include namespace libff { diff --git a/src/algebra/curves/bn128/bn128_pairing.hpp b/libff/algebra/curves/bn128/bn128_pairing.hpp similarity index 92% rename from src/algebra/curves/bn128/bn128_pairing.hpp rename to libff/algebra/curves/bn128/bn128_pairing.hpp index 206d4b1e..d688cc0e 100755 --- a/src/algebra/curves/bn128/bn128_pairing.hpp +++ b/libff/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 +#include +#include #include "third_party/ate-pairing/include/bn.h" namespace libff { diff --git a/src/algebra/curves/bn128/bn128_pp.cpp b/libff/algebra/curves/bn128/bn128_pp.cpp similarity index 96% rename from src/algebra/curves/bn128/bn128_pp.cpp rename to libff/algebra/curves/bn128/bn128_pp.cpp index 0c5785fc..cea1ce35 100755 --- a/src/algebra/curves/bn128/bn128_pp.cpp +++ b/libff/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 +#include namespace libff { diff --git a/src/algebra/curves/bn128/bn128_pp.hpp b/libff/algebra/curves/bn128/bn128_pp.hpp similarity index 84% rename from src/algebra/curves/bn128/bn128_pp.hpp rename to libff/algebra/curves/bn128/bn128_pp.hpp index 2f7f7bc1..c2f42ab0 100755 --- a/src/algebra/curves/bn128/bn128_pp.hpp +++ b/libff/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 +#include +#include +#include +#include +#include namespace libff { diff --git a/src/algebra/curves/bn128/bn_utils.hpp b/libff/algebra/curves/bn128/bn_utils.hpp similarity index 91% rename from src/algebra/curves/bn128/bn_utils.hpp rename to libff/algebra/curves/bn128/bn_utils.hpp index 00b9d028..cc264bff 100755 --- a/src/algebra/curves/bn128/bn_utils.hpp +++ b/libff/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 #endif // BN_UTILS_HPP_ diff --git a/src/algebra/curves/bn128/bn_utils.tcc b/libff/algebra/curves/bn128/bn_utils.tcc similarity index 100% rename from src/algebra/curves/bn128/bn_utils.tcc rename to libff/algebra/curves/bn128/bn_utils.tcc diff --git a/src/algebra/curves/curve_utils.hpp b/libff/algebra/curves/curve_utils.hpp similarity index 86% rename from src/algebra/curves/curve_utils.hpp rename to libff/algebra/curves/curve_utils.hpp index 841c9090..aff03ba0 100755 --- a/src/algebra/curves/curve_utils.hpp +++ b/libff/algebra/curves/curve_utils.hpp @@ -9,7 +9,7 @@ #define CURVE_UTILS_HPP_ #include -#include "algebra/fields/bigint.hpp" +#include namespace libff { @@ -17,6 +17,6 @@ template GroupT scalar_mul(const GroupT &base, const bigint &scalar); } // libff -#include "algebra/curves/curve_utils.tcc" +#include #endif // CURVE_UTILS_HPP_ diff --git a/src/algebra/curves/curve_utils.tcc b/libff/algebra/curves/curve_utils.tcc similarity index 100% rename from src/algebra/curves/curve_utils.tcc rename to libff/algebra/curves/curve_utils.tcc diff --git a/src/algebra/curves/edwards/edwards_g1.cpp b/libff/algebra/curves/edwards/edwards_g1.cpp similarity index 99% rename from src/algebra/curves/edwards/edwards_g1.cpp rename to libff/algebra/curves/edwards/edwards_g1.cpp index b007081f..9db382a1 100755 --- a/src/algebra/curves/edwards/edwards_g1.cpp +++ b/libff/algebra/curves/edwards/edwards_g1.cpp @@ -5,7 +5,7 @@ * @copyright MIT license (see LICENSE file) *****************************************************************************/ -#include "algebra/curves/edwards/edwards_g1.hpp" +#include namespace libff { diff --git a/src/algebra/curves/edwards/edwards_g1.hpp b/libff/algebra/curves/edwards/edwards_g1.hpp similarity index 96% rename from src/algebra/curves/edwards/edwards_g1.hpp rename to libff/algebra/curves/edwards/edwards_g1.hpp index 8cca442c..7857615e 100755 --- a/src/algebra/curves/edwards/edwards_g1.hpp +++ b/libff/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 +#include namespace libff { diff --git a/src/algebra/curves/edwards/edwards_g2.cpp b/libff/algebra/curves/edwards/edwards_g2.cpp similarity index 99% rename from src/algebra/curves/edwards/edwards_g2.cpp rename to libff/algebra/curves/edwards/edwards_g2.cpp index 28f110b0..118a23d4 100755 --- a/src/algebra/curves/edwards/edwards_g2.cpp +++ b/libff/algebra/curves/edwards/edwards_g2.cpp @@ -5,7 +5,7 @@ * @copyright MIT license (see LICENSE file) *****************************************************************************/ -#include "algebra/curves/edwards/edwards_g2.hpp" +#include namespace libff { diff --git a/src/algebra/curves/edwards/edwards_g2.hpp b/libff/algebra/curves/edwards/edwards_g2.hpp similarity index 96% rename from src/algebra/curves/edwards/edwards_g2.hpp rename to libff/algebra/curves/edwards/edwards_g2.hpp index 562bacc0..dc5051c7 100755 --- a/src/algebra/curves/edwards/edwards_g2.hpp +++ b/libff/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 +#include namespace libff { diff --git a/src/algebra/curves/edwards/edwards_init.cpp b/libff/algebra/curves/edwards/edwards_init.cpp similarity index 98% rename from src/algebra/curves/edwards/edwards_init.cpp rename to libff/algebra/curves/edwards/edwards_init.cpp index f12b2f96..f2d373ba 100755 --- a/src/algebra/curves/edwards/edwards_init.cpp +++ b/libff/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 +#include +#include namespace libff { diff --git a/src/algebra/curves/edwards/edwards_init.hpp b/libff/algebra/curves/edwards/edwards_init.hpp similarity index 92% rename from src/algebra/curves/edwards/edwards_init.hpp rename to libff/algebra/curves/edwards/edwards_init.hpp index 6189e5f4..5871f8ad 100755 --- a/src/algebra/curves/edwards/edwards_init.hpp +++ b/libff/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 +#include +#include +#include namespace libff { diff --git a/src/algebra/curves/edwards/edwards_pairing.cpp b/libff/algebra/curves/edwards/edwards_pairing.cpp similarity index 99% rename from src/algebra/curves/edwards/edwards_pairing.cpp rename to libff/algebra/curves/edwards/edwards_pairing.cpp index a25ad0f5..dffb579a 100755 --- a/src/algebra/curves/edwards/edwards_pairing.cpp +++ b/libff/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 +#include #include -#include "algebra/curves/edwards/edwards_g1.hpp" -#include "algebra/curves/edwards/edwards_g2.hpp" -#include "common/profiling.hpp" +#include +#include +#include namespace libff { diff --git a/src/algebra/curves/edwards/edwards_pairing.hpp b/libff/algebra/curves/edwards/edwards_pairing.hpp similarity index 98% rename from src/algebra/curves/edwards/edwards_pairing.hpp rename to libff/algebra/curves/edwards/edwards_pairing.hpp index 4a0c8c45..f44b479c 100755 --- a/src/algebra/curves/edwards/edwards_pairing.hpp +++ b/libff/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 namespace libff { diff --git a/src/algebra/curves/edwards/edwards_pp.cpp b/libff/algebra/curves/edwards/edwards_pp.cpp similarity index 96% rename from src/algebra/curves/edwards/edwards_pp.cpp rename to libff/algebra/curves/edwards/edwards_pp.cpp index a1f7b9a4..a5516467 100755 --- a/src/algebra/curves/edwards/edwards_pp.cpp +++ b/libff/algebra/curves/edwards/edwards_pp.cpp @@ -5,7 +5,7 @@ * @copyright MIT license (see LICENSE file) *****************************************************************************/ -#include "algebra/curves/edwards/edwards_pp.hpp" +#include namespace libff { diff --git a/src/algebra/curves/edwards/edwards_pp.hpp b/libff/algebra/curves/edwards/edwards_pp.hpp similarity index 86% rename from src/algebra/curves/edwards/edwards_pp.hpp rename to libff/algebra/curves/edwards/edwards_pp.hpp index ae275d22..6bfac79c 100755 --- a/src/algebra/curves/edwards/edwards_pp.hpp +++ b/libff/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 +#include +#include +#include +#include namespace libff { diff --git a/src/algebra/curves/mnt/mnt4/mnt4_g1.cpp b/libff/algebra/curves/mnt/mnt4/mnt4_g1.cpp similarity index 99% rename from src/algebra/curves/mnt/mnt4/mnt4_g1.cpp rename to libff/algebra/curves/mnt/mnt4/mnt4_g1.cpp index 5c65002a..d0ef8e0c 100755 --- a/src/algebra/curves/mnt/mnt4/mnt4_g1.cpp +++ b/libff/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 namespace libff { diff --git a/src/algebra/curves/mnt/mnt4/mnt4_g1.hpp b/libff/algebra/curves/mnt/mnt4/mnt4_g1.hpp similarity index 96% rename from src/algebra/curves/mnt/mnt4/mnt4_g1.hpp rename to libff/algebra/curves/mnt/mnt4/mnt4_g1.hpp index 194118c1..7dcf9832 100755 --- a/src/algebra/curves/mnt/mnt4/mnt4_g1.hpp +++ b/libff/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 +#include namespace libff { diff --git a/src/algebra/curves/mnt/mnt4/mnt4_g2.cpp b/libff/algebra/curves/mnt/mnt4/mnt4_g2.cpp similarity index 99% rename from src/algebra/curves/mnt/mnt4/mnt4_g2.cpp rename to libff/algebra/curves/mnt/mnt4/mnt4_g2.cpp index ca30c59e..4d3856e2 100755 --- a/src/algebra/curves/mnt/mnt4/mnt4_g2.cpp +++ b/libff/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 namespace libff { diff --git a/src/algebra/curves/mnt/mnt4/mnt4_g2.hpp b/libff/algebra/curves/mnt/mnt4/mnt4_g2.hpp similarity index 96% rename from src/algebra/curves/mnt/mnt4/mnt4_g2.hpp rename to libff/algebra/curves/mnt/mnt4/mnt4_g2.hpp index 33546e91..fb794e34 100755 --- a/src/algebra/curves/mnt/mnt4/mnt4_g2.hpp +++ b/libff/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 +#include namespace libff { diff --git a/src/algebra/curves/mnt/mnt4/mnt4_init.cpp b/libff/algebra/curves/mnt/mnt4/mnt4_init.cpp similarity index 98% rename from src/algebra/curves/mnt/mnt4/mnt4_init.cpp rename to libff/algebra/curves/mnt/mnt4/mnt4_init.cpp index 96cffb66..cbcdda18 100755 --- a/src/algebra/curves/mnt/mnt4/mnt4_init.cpp +++ b/libff/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 +#include +#include namespace libff { diff --git a/src/algebra/curves/mnt/mnt4/mnt4_init.hpp b/libff/algebra/curves/mnt/mnt4/mnt4_init.hpp similarity index 90% rename from src/algebra/curves/mnt/mnt4/mnt4_init.hpp rename to libff/algebra/curves/mnt/mnt4/mnt4_init.hpp index 848748f3..cf7c32e6 100755 --- a/src/algebra/curves/mnt/mnt4/mnt4_init.hpp +++ b/libff/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 +#include +#include +#include +#include namespace libff { diff --git a/src/algebra/curves/mnt/mnt4/mnt4_pairing.cpp b/libff/algebra/curves/mnt/mnt4/mnt4_pairing.cpp similarity index 98% rename from src/algebra/curves/mnt/mnt4/mnt4_pairing.cpp rename to libff/algebra/curves/mnt/mnt4/mnt4_pairing.cpp index 62242b3e..b579e0bf 100755 --- a/src/algebra/curves/mnt/mnt4/mnt4_pairing.cpp +++ b/libff/algebra/curves/mnt/mnt4/mnt4_pairing.cpp @@ -13,13 +13,13 @@ #include -#include "algebra/curves/mnt/mnt4/mnt4_pairing.hpp" +#include -#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 +#include +#include +#include +#include namespace libff { diff --git a/src/algebra/curves/mnt/mnt4/mnt4_pairing.hpp b/libff/algebra/curves/mnt/mnt4/mnt4_pairing.hpp similarity index 98% rename from src/algebra/curves/mnt/mnt4/mnt4_pairing.hpp rename to libff/algebra/curves/mnt/mnt4/mnt4_pairing.hpp index 12f51b36..827411b0 100755 --- a/src/algebra/curves/mnt/mnt4/mnt4_pairing.hpp +++ b/libff/algebra/curves/mnt/mnt4/mnt4_pairing.hpp @@ -14,7 +14,7 @@ #include -#include "algebra/curves/mnt/mnt4/mnt4_init.hpp" +#include namespace libff { diff --git a/src/algebra/curves/mnt/mnt4/mnt4_pp.cpp b/libff/algebra/curves/mnt/mnt4/mnt4_pp.cpp similarity index 98% rename from src/algebra/curves/mnt/mnt4/mnt4_pp.cpp rename to libff/algebra/curves/mnt/mnt4/mnt4_pp.cpp index 825cfc68..5d589f3a 100755 --- a/src/algebra/curves/mnt/mnt4/mnt4_pp.cpp +++ b/libff/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 namespace libff { diff --git a/src/algebra/curves/mnt/mnt4/mnt4_pp.hpp b/libff/algebra/curves/mnt/mnt4/mnt4_pp.hpp similarity index 92% rename from src/algebra/curves/mnt/mnt4/mnt4_pp.hpp rename to libff/algebra/curves/mnt/mnt4/mnt4_pp.hpp index 22d9e3e7..87e0fd79 100755 --- a/src/algebra/curves/mnt/mnt4/mnt4_pp.hpp +++ b/libff/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 +#include +#include +#include +#include namespace libff { diff --git a/src/algebra/curves/mnt/mnt46_common.cpp b/libff/algebra/curves/mnt/mnt46_common.cpp similarity index 92% rename from src/algebra/curves/mnt/mnt46_common.cpp rename to libff/algebra/curves/mnt/mnt46_common.cpp index 752365cb..e2889855 100755 --- a/src/algebra/curves/mnt/mnt46_common.cpp +++ b/libff/algebra/curves/mnt/mnt46_common.cpp @@ -11,7 +11,7 @@ * @copyright MIT license (see LICENSE file) *****************************************************************************/ -#include "algebra/curves/mnt/mnt46_common.hpp" +#include namespace libff { diff --git a/src/algebra/curves/mnt/mnt46_common.hpp b/libff/algebra/curves/mnt/mnt46_common.hpp similarity index 95% rename from src/algebra/curves/mnt/mnt46_common.hpp rename to libff/algebra/curves/mnt/mnt46_common.hpp index 2e466e59..2029fe89 100755 --- a/src/algebra/curves/mnt/mnt46_common.hpp +++ b/libff/algebra/curves/mnt/mnt46_common.hpp @@ -12,7 +12,7 @@ #ifndef MNT46_COMMON_HPP_ #define MNT46_COMMON_HPP_ -#include "algebra/fields/bigint.hpp" +#include namespace libff { diff --git a/src/algebra/curves/mnt/mnt6/mnt6_g1.cpp b/libff/algebra/curves/mnt/mnt6/mnt6_g1.cpp similarity index 99% rename from src/algebra/curves/mnt/mnt6/mnt6_g1.cpp rename to libff/algebra/curves/mnt/mnt6/mnt6_g1.cpp index 15944d92..3c719786 100755 --- a/src/algebra/curves/mnt/mnt6/mnt6_g1.cpp +++ b/libff/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 namespace libff { diff --git a/src/algebra/curves/mnt/mnt6/mnt6_g1.hpp b/libff/algebra/curves/mnt/mnt6/mnt6_g1.hpp similarity index 96% rename from src/algebra/curves/mnt/mnt6/mnt6_g1.hpp rename to libff/algebra/curves/mnt/mnt6/mnt6_g1.hpp index 187fd306..59ec8755 100755 --- a/src/algebra/curves/mnt/mnt6/mnt6_g1.hpp +++ b/libff/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 +#include namespace libff { diff --git a/src/algebra/curves/mnt/mnt6/mnt6_g2.cpp b/libff/algebra/curves/mnt/mnt6/mnt6_g2.cpp similarity index 99% rename from src/algebra/curves/mnt/mnt6/mnt6_g2.cpp rename to libff/algebra/curves/mnt/mnt6/mnt6_g2.cpp index 9d758054..76103e50 100755 --- a/src/algebra/curves/mnt/mnt6/mnt6_g2.cpp +++ b/libff/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 namespace libff { diff --git a/src/algebra/curves/mnt/mnt6/mnt6_g2.hpp b/libff/algebra/curves/mnt/mnt6/mnt6_g2.hpp similarity index 96% rename from src/algebra/curves/mnt/mnt6/mnt6_g2.hpp rename to libff/algebra/curves/mnt/mnt6/mnt6_g2.hpp index 052c9fe3..80053193 100755 --- a/src/algebra/curves/mnt/mnt6/mnt6_g2.hpp +++ b/libff/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 +#include namespace libff { diff --git a/src/algebra/curves/mnt/mnt6/mnt6_init.cpp b/libff/algebra/curves/mnt/mnt6/mnt6_init.cpp similarity index 99% rename from src/algebra/curves/mnt/mnt6/mnt6_init.cpp rename to libff/algebra/curves/mnt/mnt6/mnt6_init.cpp index 46316293..37c5ba30 100755 --- a/src/algebra/curves/mnt/mnt6/mnt6_init.cpp +++ b/libff/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 +#include +#include namespace libff { diff --git a/src/algebra/curves/mnt/mnt6/mnt6_init.hpp b/libff/algebra/curves/mnt/mnt6/mnt6_init.hpp similarity index 90% rename from src/algebra/curves/mnt/mnt6/mnt6_init.hpp rename to libff/algebra/curves/mnt/mnt6/mnt6_init.hpp index 6f5fc66d..19e55112 100755 --- a/src/algebra/curves/mnt/mnt6/mnt6_init.hpp +++ b/libff/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 +#include +#include +#include +#include namespace libff { diff --git a/src/algebra/curves/mnt/mnt6/mnt6_pairing.cpp b/libff/algebra/curves/mnt/mnt6/mnt6_pairing.cpp similarity index 98% rename from src/algebra/curves/mnt/mnt6/mnt6_pairing.cpp rename to libff/algebra/curves/mnt/mnt6/mnt6_pairing.cpp index d039d86c..28317c04 100755 --- a/src/algebra/curves/mnt/mnt6/mnt6_pairing.cpp +++ b/libff/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 +#include +#include +#include +#include +#include namespace libff { diff --git a/src/algebra/curves/mnt/mnt6/mnt6_pairing.hpp b/libff/algebra/curves/mnt/mnt6/mnt6_pairing.hpp similarity index 98% rename from src/algebra/curves/mnt/mnt6/mnt6_pairing.hpp rename to libff/algebra/curves/mnt/mnt6/mnt6_pairing.hpp index 45f21de5..f636c8be 100755 --- a/src/algebra/curves/mnt/mnt6/mnt6_pairing.hpp +++ b/libff/algebra/curves/mnt/mnt6/mnt6_pairing.hpp @@ -14,7 +14,7 @@ #include -#include "algebra/curves/mnt/mnt6/mnt6_init.hpp" +#include namespace libff { diff --git a/src/algebra/curves/mnt/mnt6/mnt6_pp.cpp b/libff/algebra/curves/mnt/mnt6/mnt6_pp.cpp similarity index 98% rename from src/algebra/curves/mnt/mnt6/mnt6_pp.cpp rename to libff/algebra/curves/mnt/mnt6/mnt6_pp.cpp index a9065474..df63999d 100755 --- a/src/algebra/curves/mnt/mnt6/mnt6_pp.cpp +++ b/libff/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 namespace libff { diff --git a/src/algebra/curves/mnt/mnt6/mnt6_pp.hpp b/libff/algebra/curves/mnt/mnt6/mnt6_pp.hpp similarity index 92% rename from src/algebra/curves/mnt/mnt6/mnt6_pp.hpp rename to libff/algebra/curves/mnt/mnt6/mnt6_pp.hpp index 46f6b26d..af583f0f 100755 --- a/src/algebra/curves/mnt/mnt6/mnt6_pp.hpp +++ b/libff/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 +#include +#include +#include +#include namespace libff { diff --git a/src/algebra/curves/public_params.hpp b/libff/algebra/curves/public_params.hpp similarity index 100% rename from src/algebra/curves/public_params.hpp rename to libff/algebra/curves/public_params.hpp diff --git a/src/algebra/curves/tests/test_bilinearity.cpp b/libff/algebra/curves/tests/test_bilinearity.cpp similarity index 92% rename from src/algebra/curves/tests/test_bilinearity.cpp rename to libff/algebra/curves/tests/test_bilinearity.cpp index 8231bb56..2d8f8cd3 100755 --- a/src/algebra/curves/tests/test_bilinearity.cpp +++ b/libff/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 +#include #ifdef CURVE_BN128 -#include "algebra/curves/bn128/bn128_pp.hpp" +#include #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 +#include +#include using namespace libff; diff --git a/src/algebra/curves/tests/test_groups.cpp b/libff/algebra/curves/tests/test_groups.cpp similarity index 93% rename from src/algebra/curves/tests/test_groups.cpp rename to libff/algebra/curves/tests/test_groups.cpp index 22c3e1cc..90f042f5 100755 --- a/src/algebra/curves/tests/test_groups.cpp +++ b/libff/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 +#include +#include +#include #ifdef CURVE_BN128 -#include "algebra/curves/bn128/bn128_pp.hpp" +#include #endif -#include "algebra/curves/alt_bn128/alt_bn128_pp.hpp" +#include #include using namespace libff; diff --git a/src/algebra/exponentiation/exponentiation.hpp b/libff/algebra/exponentiation/exponentiation.hpp similarity index 88% rename from src/algebra/exponentiation/exponentiation.hpp rename to libff/algebra/exponentiation/exponentiation.hpp index 6f512789..0970983c 100755 --- a/src/algebra/exponentiation/exponentiation.hpp +++ b/libff/algebra/exponentiation/exponentiation.hpp @@ -14,7 +14,7 @@ #include -#include "algebra/fields/bigint.hpp" +#include namespace libff { @@ -26,6 +26,6 @@ FieldT power(const FieldT &base, const unsigned long exponent); } // libff -#include "algebra/exponentiation/exponentiation.tcc" +#include #endif // EXPONENTIATION_HPP_ diff --git a/src/algebra/exponentiation/exponentiation.tcc b/libff/algebra/exponentiation/exponentiation.tcc similarity index 97% rename from src/algebra/exponentiation/exponentiation.tcc rename to libff/algebra/exponentiation/exponentiation.tcc index 87bcd1c2..3da5287d 100755 --- a/src/algebra/exponentiation/exponentiation.tcc +++ b/libff/algebra/exponentiation/exponentiation.tcc @@ -14,7 +14,7 @@ #ifndef EXPONENTIATION_TCC_ #define EXPONENTIATION_TCC_ -#include "common/utils.hpp" +#include namespace libff { diff --git a/src/algebra/fields/bigint.hpp b/libff/algebra/fields/bigint.hpp similarity index 96% rename from src/algebra/fields/bigint.hpp rename to libff/algebra/fields/bigint.hpp index 2155f1cd..95e792a5 100755 --- a/src/algebra/fields/bigint.hpp +++ b/libff/algebra/fields/bigint.hpp @@ -12,7 +12,7 @@ #include #include #include -#include "common/serialization.hpp" +#include namespace libff { @@ -57,5 +57,5 @@ class bigint { }; } // libff -#include "algebra/fields/bigint.tcc" +#include #endif diff --git a/src/algebra/fields/bigint.tcc b/libff/algebra/fields/bigint.tcc similarity index 100% rename from src/algebra/fields/bigint.tcc rename to libff/algebra/fields/bigint.tcc diff --git a/src/algebra/fields/field_utils.hpp b/libff/algebra/fields/field_utils.hpp similarity index 91% rename from src/algebra/fields/field_utils.hpp rename to libff/algebra/fields/field_utils.hpp index 1bc194b7..04365caa 100755 --- a/src/algebra/fields/field_utils.hpp +++ b/libff/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 +#include +#include namespace libff { @@ -52,6 +52,6 @@ template void batch_invert(std::vector &vec); } // libff -#include "algebra/fields/field_utils.tcc" +#include #endif // FIELD_UTILS_HPP_ diff --git a/src/algebra/fields/field_utils.tcc b/libff/algebra/fields/field_utils.tcc similarity index 98% rename from src/algebra/fields/field_utils.tcc rename to libff/algebra/fields/field_utils.tcc index 573512c9..febb7389 100755 --- a/src/algebra/fields/field_utils.tcc +++ b/libff/algebra/fields/field_utils.tcc @@ -13,8 +13,8 @@ #include #include -#include "common/double.hpp" -#include "common/utils.hpp" +#include +#include namespace libff { diff --git a/src/algebra/fields/fp.hpp b/libff/algebra/fields/fp.hpp similarity index 97% rename from src/algebra/fields/fp.hpp rename to libff/algebra/fields/fp.hpp index 188e2002..da9f5ff6 100755 --- a/src/algebra/fields/fp.hpp +++ b/libff/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 +#include namespace libff { @@ -179,6 +179,6 @@ template& modulus> bigint Fp_model::Rcubed; } // libff -#include "algebra/fields/fp.tcc" +#include #endif // FP_HPP_ diff --git a/src/algebra/fields/fp.tcc b/libff/algebra/fields/fp.tcc similarity index 99% rename from src/algebra/fields/fp.tcc rename to libff/algebra/fields/fp.tcc index 4224b97a..6bb3c73d 100755 --- a/src/algebra/fields/fp.tcc +++ b/libff/algebra/fields/fp.tcc @@ -14,8 +14,8 @@ #include #include -#include "algebra/fields/fp_aux.tcc" -#include "algebra/fields/field_utils.hpp" +#include +#include namespace libff { diff --git a/src/algebra/fields/fp12_2over3over2.hpp b/libff/algebra/fields/fp12_2over3over2.hpp similarity index 96% rename from src/algebra/fields/fp12_2over3over2.hpp rename to libff/algebra/fields/fp12_2over3over2.hpp index bcaa41fe..7df95eb8 100755 --- a/src/algebra/fields/fp12_2over3over2.hpp +++ b/libff/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 +#include +#include #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 #endif // FP12_2OVER3OVER2_HPP_ diff --git a/src/algebra/fields/fp12_2over3over2.tcc b/libff/algebra/fields/fp12_2over3over2.tcc similarity index 100% rename from src/algebra/fields/fp12_2over3over2.tcc rename to libff/algebra/fields/fp12_2over3over2.tcc diff --git a/src/algebra/fields/fp2.hpp b/libff/algebra/fields/fp2.hpp similarity index 98% rename from src/algebra/fields/fp2.hpp rename to libff/algebra/fields/fp2.hpp index 8bb5afcc..faedd03e 100755 --- a/src/algebra/fields/fp2.hpp +++ b/libff/algebra/fields/fp2.hpp @@ -9,7 +9,7 @@ #ifndef FP2_HPP_ #define FP2_HPP_ -#include "algebra/fields/fp.hpp" +#include #include namespace libff { @@ -115,6 +115,6 @@ template& modulus> Fp_model Fp2_model::Frobenius_coeffs_c1[2]; } // libff -#include "algebra/fields/fp2.tcc" +#include #endif // FP2_HPP_ diff --git a/src/algebra/fields/fp2.tcc b/libff/algebra/fields/fp2.tcc similarity index 99% rename from src/algebra/fields/fp2.tcc rename to libff/algebra/fields/fp2.tcc index a2f42a9b..bc5cca79 100755 --- a/src/algebra/fields/fp2.tcc +++ b/libff/algebra/fields/fp2.tcc @@ -10,7 +10,7 @@ #ifndef FP2_TCC_ #define FP2_TCC_ -#include "algebra/fields/field_utils.hpp" +#include namespace libff { diff --git a/src/algebra/fields/fp3.hpp b/libff/algebra/fields/fp3.hpp similarity index 98% rename from src/algebra/fields/fp3.hpp rename to libff/algebra/fields/fp3.hpp index b665b495..d8ef1a7a 100755 --- a/src/algebra/fields/fp3.hpp +++ b/libff/algebra/fields/fp3.hpp @@ -9,7 +9,7 @@ #ifndef FP3_HPP_ #define FP3_HPP_ -#include "algebra/fields/fp.hpp" +#include #include namespace libff { @@ -117,6 +117,6 @@ template& modulus> Fp_model Fp3_model::Frobenius_coeffs_c2[3]; } // libff -#include "algebra/fields/fp3.tcc" +#include #endif // FP3_HPP_ diff --git a/src/algebra/fields/fp3.tcc b/libff/algebra/fields/fp3.tcc similarity index 99% rename from src/algebra/fields/fp3.tcc rename to libff/algebra/fields/fp3.tcc index d635b0ac..d3ea3fa6 100755 --- a/src/algebra/fields/fp3.tcc +++ b/libff/algebra/fields/fp3.tcc @@ -10,7 +10,7 @@ #ifndef FP3_TCC_ #define FP3_TCC_ -#include "algebra/fields/field_utils.hpp" +#include namespace libff { diff --git a/src/algebra/fields/fp4.hpp b/libff/algebra/fields/fp4.hpp similarity index 96% rename from src/algebra/fields/fp4.hpp rename to libff/algebra/fields/fp4.hpp index fbfebb79..a9630436 100755 --- a/src/algebra/fields/fp4.hpp +++ b/libff/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 +#include namespace libff { @@ -99,6 +99,6 @@ Fp_model Fp4_model::Frobenius_coeffs_c1[4]; } // libff -#include "algebra/fields/fp4.tcc" +#include #endif // FP4_HPP_ diff --git a/src/algebra/fields/fp4.tcc b/libff/algebra/fields/fp4.tcc similarity index 98% rename from src/algebra/fields/fp4.tcc rename to libff/algebra/fields/fp4.tcc index 8f6ef56b..bd2d4646 100755 --- a/src/algebra/fields/fp4.tcc +++ b/libff/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 +#include namespace libff { diff --git a/src/algebra/fields/fp6_2over3.hpp b/libff/algebra/fields/fp6_2over3.hpp similarity index 96% rename from src/algebra/fields/fp6_2over3.hpp rename to libff/algebra/fields/fp6_2over3.hpp index 9bdc9e23..7a256872 100755 --- a/src/algebra/fields/fp6_2over3.hpp +++ b/libff/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 +#include +#include 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 #endif // FP6_2OVER3_HPP_ diff --git a/src/algebra/fields/fp6_2over3.tcc b/libff/algebra/fields/fp6_2over3.tcc similarity index 98% rename from src/algebra/fields/fp6_2over3.tcc rename to libff/algebra/fields/fp6_2over3.tcc index 297e5d97..ea75a82a 100755 --- a/src/algebra/fields/fp6_2over3.tcc +++ b/libff/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 +#include namespace libff { diff --git a/src/algebra/fields/fp6_3over2.hpp b/libff/algebra/fields/fp6_3over2.hpp similarity index 96% rename from src/algebra/fields/fp6_3over2.hpp rename to libff/algebra/fields/fp6_3over2.hpp index b368f698..c31808ab 100755 --- a/src/algebra/fields/fp6_3over2.hpp +++ b/libff/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 +#include #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 #endif // FP6_3OVER2_HPP_ diff --git a/src/algebra/fields/fp6_3over2.tcc b/libff/algebra/fields/fp6_3over2.tcc similarity index 99% rename from src/algebra/fields/fp6_3over2.tcc rename to libff/algebra/fields/fp6_3over2.tcc index c1f7f261..de305678 100755 --- a/src/algebra/fields/fp6_3over2.tcc +++ b/libff/algebra/fields/fp6_3over2.tcc @@ -9,7 +9,7 @@ #ifndef FP6_3OVER2_TCC_ #define FP6_3OVER2_TCC_ -#include "algebra/fields/field_utils.hpp" +#include namespace libff { diff --git a/src/algebra/fields/fp_aux.tcc b/libff/algebra/fields/fp_aux.tcc similarity index 100% rename from src/algebra/fields/fp_aux.tcc rename to libff/algebra/fields/fp_aux.tcc diff --git a/src/algebra/fields/tests/test_fields.cpp b/libff/algebra/fields/tests/test_fields.cpp similarity index 95% rename from src/algebra/fields/tests/test_fields.cpp rename to libff/algebra/fields/tests/test_fields.cpp index 49fc98bd..32aac6e7 100755 --- a/src/algebra/fields/tests/test_fields.cpp +++ b/libff/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 +#include +#include +#include #ifdef CURVE_BN128 -#include "algebra/curves/bn128/bn128_pp.hpp" +#include #endif -#include "algebra/curves/alt_bn128/alt_bn128_pp.hpp" -#include "algebra/fields/fp6_3over2.hpp" -#include "algebra/fields/fp12_2over3over2.hpp" +#include +#include +#include using namespace libff; diff --git a/src/algebra/scalar_multiplication/multiexp.hpp b/libff/algebra/scalar_multiplication/multiexp.hpp similarity index 98% rename from src/algebra/scalar_multiplication/multiexp.hpp rename to libff/algebra/scalar_multiplication/multiexp.hpp index ca08f96c..c9bdf060 100755 --- a/src/algebra/scalar_multiplication/multiexp.hpp +++ b/libff/algebra/scalar_multiplication/multiexp.hpp @@ -105,6 +105,6 @@ void batch_to_special(std::vector &vec); } // libff -#include "algebra/scalar_multiplication/multiexp.tcc" +#include #endif // MULTIEXP_HPP_ diff --git a/src/algebra/scalar_multiplication/multiexp.tcc b/libff/algebra/scalar_multiplication/multiexp.tcc similarity index 99% rename from src/algebra/scalar_multiplication/multiexp.tcc rename to libff/algebra/scalar_multiplication/multiexp.tcc index a3bfa601..21f0a6d7 100755 --- a/src/algebra/scalar_multiplication/multiexp.tcc +++ b/libff/algebra/scalar_multiplication/multiexp.tcc @@ -14,15 +14,15 @@ #ifndef MULTIEXP_TCC_ #define MULTIEXP_TCC_ -#include "algebra/fields/fp_aux.tcc" +#include #include #include #include -#include "common/profiling.hpp" -#include "common/utils.hpp" -#include "algebra/scalar_multiplication/wnaf.hpp" +#include +#include +#include namespace libff { diff --git a/src/algebra/scalar_multiplication/wnaf.hpp b/libff/algebra/scalar_multiplication/wnaf.hpp similarity index 95% rename from src/algebra/scalar_multiplication/wnaf.hpp rename to libff/algebra/scalar_multiplication/wnaf.hpp index 316ea54c..f5fc585e 100755 --- a/src/algebra/scalar_multiplication/wnaf.hpp +++ b/libff/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 #endif // WNAF_HPP_ diff --git a/src/algebra/scalar_multiplication/wnaf.tcc b/libff/algebra/scalar_multiplication/wnaf.tcc similarity index 100% rename from src/algebra/scalar_multiplication/wnaf.tcc rename to libff/algebra/scalar_multiplication/wnaf.tcc diff --git a/src/common/default_types/ec_pp.hpp b/libff/common/default_types/ec_pp.hpp similarity index 80% rename from src/common/default_types/ec_pp.hpp rename to libff/common/default_types/ec_pp.hpp index 31d91681..ba5d93f0 100755 --- a/src/common/default_types/ec_pp.hpp +++ b/libff/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 namespace libff { typedef alt_bn128_pp default_ec_pp; } // libff #endif #ifdef CURVE_BN128 -#include "algebra/curves/bn128/bn128_pp.hpp" +#include namespace libff { typedef bn128_pp default_ec_pp; } // libff #endif #ifdef CURVE_EDWARDS -#include "algebra/curves/edwards/edwards_pp.hpp" +#include namespace libff { typedef edwards_pp default_ec_pp; } // libff #endif #ifdef CURVE_MNT4 -#include "algebra/curves/mnt/mnt4/mnt4_pp.hpp" +#include namespace libff { typedef mnt4_pp default_ec_pp; } // libff #endif #ifdef CURVE_MNT6 -#include "algebra/curves/mnt/mnt6/mnt6_pp.hpp" +#include namespace libff { typedef mnt6_pp default_ec_pp; } // libff diff --git a/src/common/double.cpp b/libff/common/double.cpp similarity index 97% rename from src/common/double.cpp rename to libff/common/double.cpp index a9dd3fc5..256cd45d 100755 --- a/src/common/double.cpp +++ b/libff/common/double.cpp @@ -13,9 +13,9 @@ #include #include -#include "algebra/fields/bigint.hpp" +#include -#include "double.hpp" +#include namespace libff { diff --git a/src/common/double.hpp b/libff/common/double.hpp similarity index 97% rename from src/common/double.hpp rename to libff/common/double.hpp index 95e8dece..398f2c61 100755 --- a/src/common/double.hpp +++ b/libff/common/double.hpp @@ -13,7 +13,7 @@ #define DOUBLE_HPP_ #include -#include "algebra/fields/bigint.hpp" +#include namespace libff { diff --git a/src/common/profiling.cpp b/libff/common/profiling.cpp similarity index 98% rename from src/common/profiling.cpp rename to libff/common/profiling.cpp index 6c7032e1..83d43619 100755 --- a/src/common/profiling.cpp +++ b/libff/common/profiling.cpp @@ -11,7 +11,7 @@ * @copyright MIT license (see LICENSE file) *****************************************************************************/ -#include "common/profiling.hpp" +#include #include #include #include @@ -19,8 +19,8 @@ #include #include #include -#include "common/default_types/ec_pp.hpp" -#include "common/utils.hpp" +#include +#include #ifndef NO_PROCPS #include diff --git a/src/common/profiling.hpp b/libff/common/profiling.hpp similarity index 100% rename from src/common/profiling.hpp rename to libff/common/profiling.hpp diff --git a/src/common/rng.hpp b/libff/common/rng.hpp similarity index 95% rename from src/common/rng.hpp rename to libff/common/rng.hpp index 50d9f1b4..c5b31204 100755 --- a/src/common/rng.hpp +++ b/libff/common/rng.hpp @@ -21,6 +21,6 @@ FieldT SHA512_rng(const uint64_t idx); } // libff -#include "common/rng.tcc" +#include #endif // RNG_HPP_ diff --git a/src/common/rng.tcc b/libff/common/rng.tcc similarity index 100% rename from src/common/rng.tcc rename to libff/common/rng.tcc diff --git a/src/common/serialization.hpp b/libff/common/serialization.hpp similarity index 98% rename from src/common/serialization.hpp rename to libff/common/serialization.hpp index f0ce4059..e811555e 100755 --- a/src/common/serialization.hpp +++ b/libff/common/serialization.hpp @@ -101,6 +101,6 @@ std::istream& operator>>(std::istream& in, std::set &s); } // libff -#include "common/serialization.tcc" +#include #endif // SERIALIZATION_HPP_ diff --git a/src/common/serialization.tcc b/libff/common/serialization.tcc similarity index 99% rename from src/common/serialization.tcc rename to libff/common/serialization.tcc index 322ef1c8..5ff3f30c 100755 --- a/src/common/serialization.tcc +++ b/libff/common/serialization.tcc @@ -16,7 +16,7 @@ #include #include -#include "common/utils.hpp" +#include namespace libff { diff --git a/src/common/template_utils.hpp b/libff/common/template_utils.hpp similarity index 100% rename from src/common/template_utils.hpp rename to libff/common/template_utils.hpp diff --git a/src/common/utils.cpp b/libff/common/utils.cpp similarity index 98% rename from src/common/utils.cpp rename to libff/common/utils.cpp index 3830075b..9198bfca 100755 --- a/src/common/utils.cpp +++ b/libff/common/utils.cpp @@ -11,7 +11,7 @@ #include #include #include -#include "common/utils.hpp" +#include namespace libff { diff --git a/src/common/utils.hpp b/libff/common/utils.hpp similarity index 93% rename from src/common/utils.hpp rename to libff/common/utils.hpp index 4cb05123..c1aba970 100755 --- a/src/common/utils.hpp +++ b/libff/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 /* note that utils has a templatized part (utils.tcc) and non-templatized part (utils.cpp) */ #endif // UTILS_HPP_ diff --git a/src/common/utils.tcc b/libff/common/utils.tcc similarity index 100% rename from src/common/utils.tcc rename to libff/common/utils.tcc