blueprint/include/nil/crypto3/zk/components/algebra/pairing/weierstrass/final_exponentiation.hpp
Go to the documentation of this file.
1 //---------------------------------------------------------------------------//
2 // Copyright (c) 2018-2021 Mikhail Komarov <nemo@nil.foundation>
3 // Copyright (c) 2020-2021 Nikita Kaskov <nbering@nil.foundation>
4 //
5 // MIT License
6 //
7 // Permission is hereby granted, free of charge, to any person obtaining a copy
8 // of this software and associated documentation files (the "Software"), to deal
9 // in the Software without restriction, including without limitation the rights
10 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 // copies of the Software, and to permit persons to whom the Software is
12 // furnished to do so, subject to the following conditions:
13 //
14 // The above copyright notice and this permission notice shall be included in all
15 // copies or substantial portions of the Software.
16 //
17 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23 // SOFTWARE.
24 //---------------------------------------------------------------------------//
25 // @file Declaration of interfaces for final exponentiation components.
26 //
27 // The components verify final exponentiation for Weiersrass curves with embedding
28 // degrees 4 and 6.
29 //---------------------------------------------------------------------------//
30 
31 #ifndef CRYPTO3_ZK_BLUEPRINT_WEIERSTRASS_FINAL_EXPONENTIATION_HPP
32 #define CRYPTO3_ZK_BLUEPRINT_WEIERSTRASS_FINAL_EXPONENTIATION_HPP
33 
34 #include <memory>
35 
37 
42 
43 namespace nil {
44  namespace crypto3 {
45  namespace zk {
46  namespace components {
47 
51  template<typename CurveType>
53 
54  template<std::size_t Version>
55  class final_exp_component<curves::mnt4<Version>>
56  : public component<typename curves::mnt4<Version>::scalar_field_type> {
57 
59 
60  using Fqk_variable_type =
62  using Fqk_mul_component_type =
64 
65  public:
67 
68  Fqk_variable_type el;
69  std::shared_ptr<Fqk_variable_type> one;
70  std::shared_ptr<Fqk_variable_type> el_inv;
71  std::shared_ptr<Fqk_variable_type> el_q_3;
72  std::shared_ptr<Fqk_variable_type> el_q_3_minus_1;
73  std::shared_ptr<Fqk_variable_type> alpha;
74  std::shared_ptr<Fqk_variable_type> beta;
75  std::shared_ptr<Fqk_variable_type> beta_q;
76  std::shared_ptr<Fqk_variable_type> el_inv_q_3;
77  std::shared_ptr<Fqk_variable_type> el_inv_q_3_minus_1;
78  std::shared_ptr<Fqk_variable_type> inv_alpha;
79  std::shared_ptr<Fqk_variable_type> inv_beta;
80  std::shared_ptr<Fqk_variable_type> w1;
81  std::shared_ptr<Fqk_variable_type> w0;
82  std::shared_ptr<Fqk_variable_type> result;
83 
84  std::shared_ptr<Fqk_mul_component_type> compute_el_inv;
85  std::shared_ptr<Fqk_mul_component_type> compute_el_q_3_minus_1;
86  std::shared_ptr<Fqk_mul_component_type> compute_beta;
87  std::shared_ptr<Fqk_mul_component_type> compute_el_inv_q_3_minus_1;
88  std::shared_ptr<Fqk_mul_component_type> compute_inv_beta;
89 
91  exponentiation_component<typename curve_type::pairing::fqk_type,
95 
96  std::shared_ptr<exponentiation_component_type> compute_w1;
97  std::shared_ptr<exponentiation_component<typename curve_type::pairing::fqk_type,
102  std::shared_ptr<Fqk_mul_component_type> compute_result;
103 
105 
107  const Fqk_variable_type &el,
108  const blueprint_variable<field_type> &result_is_one) :
109  component<field_type>(bp),
110  el(el), result_is_one(result_is_one) {
111  one.reset(new Fqk_variable_type(bp));
112  el_inv.reset(new Fqk_variable_type(bp));
113  el_q_3.reset(new Fqk_variable_type(el.Frobenius_map(3)));
114  el_q_3_minus_1.reset(new Fqk_variable_type(bp));
115  alpha.reset(new Fqk_variable_type(el_q_3_minus_1->Frobenius_map(1)));
116  beta.reset(new Fqk_variable_type(bp));
117  beta_q.reset(new Fqk_variable_type(beta->Frobenius_map(1)));
118 
119  el_inv_q_3.reset(new Fqk_variable_type(el_inv->Frobenius_map(3)));
120  el_inv_q_3_minus_1.reset(new Fqk_variable_type(bp));
121  inv_alpha.reset(new Fqk_variable_type(el_inv_q_3_minus_1->Frobenius_map(1)));
122  inv_beta.reset(new Fqk_variable_type(bp));
123  w1.reset(new Fqk_variable_type(bp));
124  w0.reset(new Fqk_variable_type(bp));
125  result.reset(new Fqk_variable_type(bp));
126 
127  compute_el_inv.reset(new Fqk_mul_component_type(bp, el, *el_inv, *one));
128  compute_el_q_3_minus_1.reset(new Fqk_mul_component_type(bp, *el_q_3, *el_inv, *el_q_3_minus_1));
129  compute_beta.reset(new Fqk_mul_component_type(bp, *alpha, *el_q_3_minus_1, *beta));
130 
131  compute_el_inv_q_3_minus_1.reset(
132  new Fqk_mul_component_type(bp, *el_inv_q_3, el, *el_inv_q_3_minus_1));
133  compute_inv_beta.reset(
134  new Fqk_mul_component_type(bp, *inv_alpha, *el_inv_q_3_minus_1, *inv_beta));
135 
136  compute_w1.reset(new exponentiation_component<typename curve_type::pairing::fqk_type,
140  bp, *beta_q, curve_type::pairing::final_exponent_last_chunk_w1, *w1));
141 
142  compute_w0.reset(new exponentiation_component<typename curve_type::pairing::fqk_type,
146  bp,
147  (curve_type::pairing::final_exponent_last_chunk_is_w0_neg ? *inv_beta : *beta),
148  curve_type::pairing::final_exponent_last_chunk_abs_of_w0,
149  *w0));
150 
151  compute_result.reset(new Fqk_mul_component_type(bp, *w1, *w0, *result));
152  }
153 
155  one->generate_r1cs_equals_const_constraints(
156  curve_type::pairing::pair_curve_type::pairing::fqk_type::value_type::one());
157 
158  compute_el_inv->generate_r1cs_constraints();
159  compute_el_q_3_minus_1->generate_r1cs_constraints();
160  compute_beta->generate_r1cs_constraints();
161 
162  compute_el_inv_q_3_minus_1->generate_r1cs_constraints();
163  compute_inv_beta->generate_r1cs_constraints();
164 
165  compute_w0->generate_r1cs_constraints();
166  compute_w1->generate_r1cs_constraints();
167  compute_result->generate_r1cs_constraints();
168 
169  generate_boolean_r1cs_constraint<field_type>(this->bp, result_is_one);
170  this->bp.add_r1cs_constraint(
171  snark::r1cs_constraint<field_type>(result_is_one, 1 - result->c0.c0, 0));
172  this->bp.add_r1cs_constraint(
173  snark::r1cs_constraint<field_type>(result_is_one, result->c0.c1, 0));
174  this->bp.add_r1cs_constraint(
175  snark::r1cs_constraint<field_type>(result_is_one, result->c0.c2, 0));
176  this->bp.add_r1cs_constraint(
177  snark::r1cs_constraint<field_type>(result_is_one, result->c1.c0, 0));
178  this->bp.add_r1cs_constraint(
179  snark::r1cs_constraint<field_type>(result_is_one, result->c1.c1, 0));
180  this->bp.add_r1cs_constraint(
181  snark::r1cs_constraint<field_type>(result_is_one, result->c1.c2, 0));
182  }
183 
185  one->generate_r1cs_witness(
186  curve_type::pairing::pair_curve_type::pairing::fqk_type::value_type::one());
187  el_inv->generate_r1cs_witness(el.get_element().inversed());
188 
189  compute_el_inv->generate_r1cs_witness();
190  el_q_3->evaluate();
191  compute_el_q_3_minus_1->generate_r1cs_witness();
192  alpha->evaluate();
193  compute_beta->generate_r1cs_witness();
194  beta_q->evaluate();
195 
196  el_inv_q_3->evaluate();
197  compute_el_inv_q_3_minus_1->generate_r1cs_witness();
198  inv_alpha->evaluate();
199  compute_inv_beta->generate_r1cs_witness();
200 
201  compute_w0->generate_r1cs_witness();
202  compute_w1->generate_r1cs_witness();
203  compute_result->generate_r1cs_witness();
204 
205  this->bp.val(result_is_one) =
206  (result->get_element() == one->get_element() ? field_type::value_type::one() :
207  field_type::value_type::zero());
208  }
209  };
210 
214  template<std::size_t Version>
215  class final_exp_component<curves::mnt6<Version>>
216  : public component<typename curves::mnt6<Version>::scalar_field_type> {
217 
219 
220  using Fqk_variable_type =
222  using Fqk_mul_component_type =
224 
225  public:
227 
228  Fqk_variable_type el;
229  std::shared_ptr<Fqk_variable_type> one;
230  std::shared_ptr<Fqk_variable_type> el_inv;
231  std::shared_ptr<Fqk_variable_type> el_q_2;
232  std::shared_ptr<Fqk_variable_type> el_q_2_minus_1;
233  std::shared_ptr<Fqk_variable_type> el_q_3_minus_q;
234  std::shared_ptr<Fqk_variable_type> el_inv_q_2;
235  std::shared_ptr<Fqk_variable_type> el_inv_q_2_minus_1;
236  std::shared_ptr<Fqk_variable_type> w1;
237  std::shared_ptr<Fqk_variable_type> w0;
238  std::shared_ptr<Fqk_variable_type> result;
239 
240  std::shared_ptr<Fqk_mul_component_type> compute_el_inv;
241  std::shared_ptr<Fqk_mul_component_type> compute_el_q_2_minus_1;
242  std::shared_ptr<Fqk_mul_component_type> compute_el_inv_q_2_minus_1;
243 
244  std::shared_ptr<exponentiation_component<typename curve_type::pairing::fqk_type,
245  element_fp4,
249  std::shared_ptr<exponentiation_component<typename curve_type::pairing::fqk_type,
250  element_fp4,
254  std::shared_ptr<Fqk_mul_component_type> compute_result;
255 
257 
259  const Fqk_variable_type &el,
260  const blueprint_variable<field_type> &result_is_one) :
261  component<field_type>(bp),
262  el(el), result_is_one(result_is_one) {
263  one.reset(new Fqk_variable_type(bp));
264  el_inv.reset(new Fqk_variable_type(bp));
265  el_q_2.reset(new Fqk_variable_type(el.Frobenius_map(2)));
266  el_q_2_minus_1.reset(new Fqk_variable_type(bp));
267  el_q_3_minus_q.reset(new Fqk_variable_type(el_q_2_minus_1->Frobenius_map(1)));
268  el_inv_q_2.reset(new Fqk_variable_type(el_inv->Frobenius_map(2)));
269  el_inv_q_2_minus_1.reset(new Fqk_variable_type(bp));
270  w1.reset(new Fqk_variable_type(bp));
271  w0.reset(new Fqk_variable_type(bp));
272  result.reset(new Fqk_variable_type(bp));
273 
274  compute_el_inv.reset(new Fqk_mul_component_type(bp, el, *el_inv, *one));
275  compute_el_q_2_minus_1.reset(new Fqk_mul_component_type(bp, *el_q_2, *el_inv, *el_q_2_minus_1));
276  compute_el_inv_q_2_minus_1.reset(
277  new Fqk_mul_component_type(bp, *el_inv_q_2, el, *el_inv_q_2_minus_1));
278 
279  compute_w1.reset(new exponentiation_component<typename curve_type::pairing::fqk_type,
280  element_fp4,
283  (bp, *el_q_3_minus_q, curve_type::pairing::final_exponent_last_chunk_w1, *w1));
284  compute_w0.reset(
285  new exponentiation_component<typename curve_type::pairing::fqk_type,
286  element_fp4,
289  (bp,
290  (curve_type::pairing::final_exponent_last_chunk_is_w0_neg ? *el_inv_q_2_minus_1 :
291  *el_q_2_minus_1),
292  curve_type::pairing::final_exponent_last_chunk_abs_of_w0,
293  *w0));
294  compute_result.reset(new Fqk_mul_component_type(bp, *w1, *w0, *result));
295  }
296 
298  one->generate_r1cs_equals_const_constraints(
299  curve_type::pairing::pair_curve_type::pairing::fqk_type::value_type::one());
300 
301  compute_el_inv->generate_r1cs_constraints();
302  compute_el_q_2_minus_1->generate_r1cs_constraints();
303  compute_el_inv_q_2_minus_1->generate_r1cs_constraints();
304  compute_w1->generate_r1cs_constraints();
305  compute_w0->generate_r1cs_constraints();
306  compute_result->generate_r1cs_constraints();
307 
308  generate_boolean_r1cs_constraint<field_type>(this->bp, result_is_one);
309  this->bp.add_r1cs_constraint(
310  snark::r1cs_constraint<field_type>(result_is_one, 1 - result->c0.c0, 0));
311  this->bp.add_r1cs_constraint(
312  snark::r1cs_constraint<field_type>(result_is_one, result->c0.c1, 0));
313  this->bp.add_r1cs_constraint(
314  snark::r1cs_constraint<field_type>(result_is_one, result->c1.c0, 0));
315  this->bp.add_r1cs_constraint(
316  snark::r1cs_constraint<field_type>(result_is_one, result->c1.c1, 0));
317  }
318 
320  one->generate_r1cs_witness(
321  curve_type::pairing::pair_curve_type::pairing::fqk_type::value_type::one());
322  el_inv->generate_r1cs_witness(el.get_element().inversed());
323 
324  compute_el_inv->generate_r1cs_witness();
325  el_q_2->evaluate();
326  compute_el_q_2_minus_1->generate_r1cs_witness();
327  el_q_3_minus_q->evaluate();
328  el_inv_q_2->evaluate();
329  compute_el_inv_q_2_minus_1->generate_r1cs_witness();
330  compute_w1->generate_r1cs_witness();
331  compute_w0->generate_r1cs_witness();
332  compute_result->generate_r1cs_witness();
333 
334  this->bp.val(result_is_one) =
335  (result->get_element() == one->get_element() ? field_type::value_type::one() :
336  field_type::value_type::zero());
337  }
338  };
339  } // namespace components
340  } // namespace zk
341  } // namespace crypto3
342 } // namespace nil
343 
344 #endif // CRYPTO3_ZK_BLUEPRINT_WEIERSTRASS_FINAL_EXPONENTIATION_HPP
Definition: blueprint.hpp:46
Definition: component.hpp:37
Definition: blueprint/include/nil/crypto3/zk/components/algebra/pairing/detail/mnt4.hpp:46
Definition: element_fp6_2over3.hpp:137
Definition: element_fp6_2over3.hpp:51
Definition: blueprint/include/nil/crypto3/zk/components/algebra/fields/exponentiation.hpp:56
std::shared_ptr< Fqk_variable_type > el_q_3_minus_1
Definition: blueprint/include/nil/crypto3/zk/components/algebra/pairing/weierstrass/final_exponentiation.hpp:72
std::shared_ptr< Fqk_variable_type > el_inv_q_3_minus_1
Definition: blueprint/include/nil/crypto3/zk/components/algebra/pairing/weierstrass/final_exponentiation.hpp:77
std::shared_ptr< Fqk_variable_type > el_q_3
Definition: blueprint/include/nil/crypto3/zk/components/algebra/pairing/weierstrass/final_exponentiation.hpp:71
std::shared_ptr< Fqk_mul_component_type > compute_el_q_3_minus_1
Definition: blueprint/include/nil/crypto3/zk/components/algebra/pairing/weierstrass/final_exponentiation.hpp:85
std::shared_ptr< Fqk_variable_type > result
Definition: blueprint/include/nil/crypto3/zk/components/algebra/pairing/weierstrass/final_exponentiation.hpp:82
blueprint_variable< field_type > result_is_one
Definition: blueprint/include/nil/crypto3/zk/components/algebra/pairing/weierstrass/final_exponentiation.hpp:104
std::shared_ptr< Fqk_variable_type > alpha
Definition: blueprint/include/nil/crypto3/zk/components/algebra/pairing/weierstrass/final_exponentiation.hpp:73
std::shared_ptr< Fqk_variable_type > el_inv_q_3
Definition: blueprint/include/nil/crypto3/zk/components/algebra/pairing/weierstrass/final_exponentiation.hpp:76
curve_type::scalar_field_type field_type
Definition: blueprint/include/nil/crypto3/zk/components/algebra/pairing/weierstrass/final_exponentiation.hpp:66
std::shared_ptr< Fqk_variable_type > el_inv
Definition: blueprint/include/nil/crypto3/zk/components/algebra/pairing/weierstrass/final_exponentiation.hpp:70
void generate_r1cs_witness()
Definition: blueprint/include/nil/crypto3/zk/components/algebra/pairing/weierstrass/final_exponentiation.hpp:184
std::shared_ptr< exponentiation_component< typename curve_type::pairing::fqk_type, element_fp6_2over3, element_fp6_2over3_mul, element_fp6_2over3_cyclotomic_squared > > compute_w0
Definition: blueprint/include/nil/crypto3/zk/components/algebra/pairing/weierstrass/final_exponentiation.hpp:101
std::shared_ptr< Fqk_variable_type > inv_alpha
Definition: blueprint/include/nil/crypto3/zk/components/algebra/pairing/weierstrass/final_exponentiation.hpp:78
std::shared_ptr< Fqk_mul_component_type > compute_el_inv_q_3_minus_1
Definition: blueprint/include/nil/crypto3/zk/components/algebra/pairing/weierstrass/final_exponentiation.hpp:87
Fqk_variable_type el
Definition: blueprint/include/nil/crypto3/zk/components/algebra/pairing/weierstrass/final_exponentiation.hpp:68
std::shared_ptr< Fqk_variable_type > one
Definition: blueprint/include/nil/crypto3/zk/components/algebra/pairing/weierstrass/final_exponentiation.hpp:69
std::shared_ptr< Fqk_mul_component_type > compute_el_inv
Definition: blueprint/include/nil/crypto3/zk/components/algebra/pairing/weierstrass/final_exponentiation.hpp:84
void generate_r1cs_constraints()
Definition: blueprint/include/nil/crypto3/zk/components/algebra/pairing/weierstrass/final_exponentiation.hpp:154
final_exp_component(blueprint< field_type > &bp, const Fqk_variable_type &el, const blueprint_variable< field_type > &result_is_one)
Definition: blueprint/include/nil/crypto3/zk/components/algebra/pairing/weierstrass/final_exponentiation.hpp:106
std::shared_ptr< Fqk_mul_component_type > compute_beta
Definition: blueprint/include/nil/crypto3/zk/components/algebra/pairing/weierstrass/final_exponentiation.hpp:86
std::shared_ptr< Fqk_variable_type > beta_q
Definition: blueprint/include/nil/crypto3/zk/components/algebra/pairing/weierstrass/final_exponentiation.hpp:75
std::shared_ptr< Fqk_variable_type > w1
Definition: blueprint/include/nil/crypto3/zk/components/algebra/pairing/weierstrass/final_exponentiation.hpp:80
std::shared_ptr< Fqk_mul_component_type > compute_inv_beta
Definition: blueprint/include/nil/crypto3/zk/components/algebra/pairing/weierstrass/final_exponentiation.hpp:88
std::shared_ptr< Fqk_variable_type > beta
Definition: blueprint/include/nil/crypto3/zk/components/algebra/pairing/weierstrass/final_exponentiation.hpp:74
std::shared_ptr< exponentiation_component_type > compute_w1
Definition: blueprint/include/nil/crypto3/zk/components/algebra/pairing/weierstrass/final_exponentiation.hpp:96
std::shared_ptr< Fqk_variable_type > inv_beta
Definition: blueprint/include/nil/crypto3/zk/components/algebra/pairing/weierstrass/final_exponentiation.hpp:79
std::shared_ptr< Fqk_mul_component_type > compute_result
Definition: blueprint/include/nil/crypto3/zk/components/algebra/pairing/weierstrass/final_exponentiation.hpp:102
std::shared_ptr< Fqk_variable_type > w0
Definition: blueprint/include/nil/crypto3/zk/components/algebra/pairing/weierstrass/final_exponentiation.hpp:81
final_exp_component(blueprint< field_type > &bp, const Fqk_variable_type &el, const blueprint_variable< field_type > &result_is_one)
Definition: blueprint/include/nil/crypto3/zk/components/algebra/pairing/weierstrass/final_exponentiation.hpp:258
std::shared_ptr< Fqk_variable_type > one
Definition: blueprint/include/nil/crypto3/zk/components/algebra/pairing/weierstrass/final_exponentiation.hpp:229
std::shared_ptr< Fqk_variable_type > w0
Definition: blueprint/include/nil/crypto3/zk/components/algebra/pairing/weierstrass/final_exponentiation.hpp:237
curve_type::scalar_field_type field_type
Definition: blueprint/include/nil/crypto3/zk/components/algebra/pairing/weierstrass/final_exponentiation.hpp:226
std::shared_ptr< Fqk_mul_component_type > compute_el_inv_q_2_minus_1
Definition: blueprint/include/nil/crypto3/zk/components/algebra/pairing/weierstrass/final_exponentiation.hpp:242
void generate_r1cs_witness()
Definition: blueprint/include/nil/crypto3/zk/components/algebra/pairing/weierstrass/final_exponentiation.hpp:319
std::shared_ptr< Fqk_variable_type > el_q_2_minus_1
Definition: blueprint/include/nil/crypto3/zk/components/algebra/pairing/weierstrass/final_exponentiation.hpp:232
std::shared_ptr< exponentiation_component< typename curve_type::pairing::fqk_type, element_fp4, element_fp4_mul, element_fp4_cyclotomic_squared > > compute_w0
Definition: blueprint/include/nil/crypto3/zk/components/algebra/pairing/weierstrass/final_exponentiation.hpp:253
void generate_r1cs_constraints()
Definition: blueprint/include/nil/crypto3/zk/components/algebra/pairing/weierstrass/final_exponentiation.hpp:297
std::shared_ptr< Fqk_mul_component_type > compute_el_inv
Definition: blueprint/include/nil/crypto3/zk/components/algebra/pairing/weierstrass/final_exponentiation.hpp:240
blueprint_variable< field_type > result_is_one
Definition: blueprint/include/nil/crypto3/zk/components/algebra/pairing/weierstrass/final_exponentiation.hpp:256
Fqk_variable_type el
Definition: blueprint/include/nil/crypto3/zk/components/algebra/pairing/weierstrass/final_exponentiation.hpp:228
std::shared_ptr< Fqk_variable_type > el_inv_q_2_minus_1
Definition: blueprint/include/nil/crypto3/zk/components/algebra/pairing/weierstrass/final_exponentiation.hpp:235
std::shared_ptr< exponentiation_component< typename curve_type::pairing::fqk_type, element_fp4, element_fp4_mul, element_fp4_cyclotomic_squared > > compute_w1
Definition: blueprint/include/nil/crypto3/zk/components/algebra/pairing/weierstrass/final_exponentiation.hpp:248
std::shared_ptr< Fqk_mul_component_type > compute_result
Definition: blueprint/include/nil/crypto3/zk/components/algebra/pairing/weierstrass/final_exponentiation.hpp:254
std::shared_ptr< Fqk_mul_component_type > compute_el_q_2_minus_1
Definition: blueprint/include/nil/crypto3/zk/components/algebra/pairing/weierstrass/final_exponentiation.hpp:241
std::shared_ptr< Fqk_variable_type > el_inv
Definition: blueprint/include/nil/crypto3/zk/components/algebra/pairing/weierstrass/final_exponentiation.hpp:230
std::shared_ptr< Fqk_variable_type > result
Definition: blueprint/include/nil/crypto3/zk/components/algebra/pairing/weierstrass/final_exponentiation.hpp:238
std::shared_ptr< Fqk_variable_type > el_inv_q_2
Definition: blueprint/include/nil/crypto3/zk/components/algebra/pairing/weierstrass/final_exponentiation.hpp:234
std::shared_ptr< Fqk_variable_type > el_q_2
Definition: blueprint/include/nil/crypto3/zk/components/algebra/pairing/weierstrass/final_exponentiation.hpp:231
std::shared_ptr< Fqk_variable_type > el_q_3_minus_q
Definition: blueprint/include/nil/crypto3/zk/components/algebra/pairing/weierstrass/final_exponentiation.hpp:233
std::shared_ptr< Fqk_variable_type > w1
Definition: blueprint/include/nil/crypto3/zk/components/algebra/pairing/weierstrass/final_exponentiation.hpp:236
mnt4_base_field< Version > mnt4
Definition: mnt4/base_field.hpp:86
mnt6_base_field< Version > mnt6
Definition: mnt6/base_field.hpp:86
element_fp4_direct_mul< Fp4T > element_fp4_mul
Definition: element_fp4.hpp:427
Definition: pair.hpp:31
A struct representing a mnt4 curve.
Definition: algebra/include/nil/crypto3/algebra/curves/mnt4.hpp:46
A struct representing a mnt6 curve.
Definition: algebra/include/nil/crypto3/algebra/curves/mnt6.hpp:46
IETF IPsec groups.
Definition: mnt4/base_field.hpp:46
IETF IPsec groups.
Definition: mnt6/base_field.hpp:46
Definition: element_fp4.hpp:50
Definition: blueprint/include/nil/crypto3/zk/components/algebra/pairing/weierstrass/final_exponentiation.hpp:52