Clearmatics Libsnark  0.1
C++ library for zkSNARK proofs
libsnark::pairing_selector< ppT > Class Template Reference

#include <pairing_params.hpp>

Detailed Description

template<typename ppT>
class libsnark::pairing_selector< ppT >

The interfaces of pairing gadgets are templatized via the parameter ec_ppT. When used, the interfaces must be invoked with a particular parameter choice; let 'my_ec_pp' denote this choice.

Moreover, one must provide a template specialization for the class pairing_selector (below), containing typedefs for the typenames

For example, if you want to use the types my_Field, my_Fqe, etc, then you would do as follows. First declare a new type:

class my_ec_pp;

Second, specialize pairing_selector<ec_ppT> for the case ec_ppT = my_ec_pp, using the above types:

template<> class pairing_selector<my_ec_pp> { typedef my_Field FieldT; typedef my_Fqe FqeT; typedef my_Fqk FqkT; typedef my_Fqe_variable_type Fqe_variable_type; typedef my_Fqe_mul_gadget_type Fqe_mul_gadget_type; typedef my_Fqe_mul_by_lc_gadget_type Fqe_mul_by_lc_gadget_type; typedef my_Fqe_sqr_gadget_type Fqe_sqr_gadget_type; typedef my_Fqk_variable_type Fqk_variable_type; typedef my_Fqk_mul_gadget_type Fqk_mul_gadget_type; typedef my_Fqk_sqr_gadget_type Fqk_sqr_gadget_type; typedef my_other_curve_type other_curve_type; typedef my_miller_loop_gadget_type miller_loop_gadget_type; typedef my_e_over_e_miller_loop_gadget_type e_over_e_miller_loop_gadget_type; typedef my_e_times_e_over_e_miller_loop_gadget_type e_times_e_over_e_miller_loop_gadget_type; typedef my_e_times_e_times_e_over_e_miller_loop_gadget_type e_times_e_times_e_over_e_miller_loop_gadget_type; typedef my_final_exp_gadget_type final_exp_gadget_type; };

Having done the above, my_ec_pp can be used as a template parameter.

See mnt_pairing_params.hpp for examples for the case of fixing ec_ppT to "MNT4" and "MNT6".

Definition at line 84 of file pairing_params.hpp.


The documentation for this class was generated from the following file: