Clearmatics Libff  0.1
C++ library for Finite Fields and Elliptic Curves
curve_utils.hpp
Go to the documentation of this file.
1 
8 #ifndef CURVE_UTILS_HPP_
9 #define CURVE_UTILS_HPP_
10 #include <cstdint>
13 
14 namespace libff
15 {
16 
17 template<typename GroupT, mp_size_t m>
18 GroupT scalar_mul(const GroupT &base, const bigint<m> &scalar);
19 
20 // Utility function to compute Y coordinate of a point on the curve E(Fq) with
21 // the given x coordinate. This function does not check whether E(Fq) has a
22 // solution at x, and will hang indefinitely if it does not.
23 template<typename GroupT>
24 decltype(((GroupT *)nullptr)->X) curve_point_y_at_x(
25  const decltype(((GroupT *)nullptr)->X) &x);
26 
27 // Utility function to compute a point on the curve E(Fq) with the given x
28 // coordinate. If the curve has no solution, this function throws an
29 // exception.
30 template<typename GroupT>
31 GroupT g1_curve_point_at_x(const typename GroupT::base_field &x);
32 
33 // Utility function to compute a point on the twisted curve E'(Fqe) with the
34 // given x coordinate.
35 template<typename GroupT>
36 GroupT g2_curve_point_at_x(const typename GroupT::twist_field &x);
37 
38 } // namespace libff
40 
41 #endif // CURVE_UTILS_HPP_
libff
Definition: ffi.cpp:8
bigint.hpp
libff::curve_point_y_at_x
decltype(((GroupT *) nullptr) ->X) curve_point_y_at_x(const decltype(((GroupT *) nullptr) ->X) &x)
Definition: curve_utils.hpp:24
libff::g2_curve_point_at_x
GroupT g2_curve_point_at_x(const typename GroupT::twist_field &x)
libff::scalar_mul
GroupT scalar_mul(const GroupT &base, const bigint< m > &scalar)
libff::g1_curve_point_at_x
GroupT g1_curve_point_at_x(const typename GroupT::base_field &x)
public_params.hpp
curve_utils.tcc