blueprint/include/nil/crypto3/zk/components/algebra/curves/edwards/element_g1.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 G1 components.
26 //
27 // TODO: Change the curve equation
28 // The components verify curve arithmetic in G1 = E(F) where E/F: y^2 = x^3 + A * X + B
29 // is an elliptic curve over F in short Weierstrass form.
30 //---------------------------------------------------------------------------//
31 
32 #ifndef CRYPTO3_ZK_BLUEPRINT_TWISTED_EDWARDS_G1_COMPONENT_HPP
33 #define CRYPTO3_ZK_BLUEPRINT_TWISTED_EDWARDS_G1_COMPONENT_HPP
34 
37 
39 
40 namespace nil {
41  namespace crypto3 {
42  namespace zk {
43  namespace components {
44 
50  template<typename CurveType>
51  class element_g1 : public component<typename CurveType::scalar_field_type> {
52  using underlying_field_type = typename CurveType::scalar_field_type;
54 
55  public:
58 
60 
63 
64  X_var.allocate(bp);
65  Y_var.allocate(bp);
66 
67  X = underlying_element_type(X_var);
68  Y = underlying_element_type(Y_var);
69 
70  all_vars.emplace_back(X);
71  all_vars.emplace_back(Y);
72  }
73 
75  const typename CurveType::pairing::chained_curve_type::template g1_type<>::value_type &P) :
76  component<scalar_field_type>(bp) {
77 
78  // typename CurveType::pairing::chained_curve_type::template g1_type<>::value_type Pcopy =
79  // P.to_affine();
80 
81  X.assign(bp, P.X);
82  Y.assign(bp, P.Y);
83  X.evaluate(bp);
84  Y.evaluate(bp);
85  all_vars.emplace_back(X);
86  all_vars.emplace_back(Y);
87  }
88 
90  const typename CurveType::pairing::chained_curve_type::template g1_type<>::value_type &el) {
91  typename CurveType::pairing::chained_curve_type::template g1_type<>::value_type el_normalized =
92  el.to_affine();
93 
94  this->bp.lc_val(X) = el_normalized.X;
95  this->bp.lc_val(Y) = el_normalized.Y;
96  }
97 
98  // (See a comment in r1cs_ppzksnark_verifier_component.hpp about why
99  // we mark this function noinline.) TODO: remove later
100  static std::size_t __attribute__((noinline)) size_in_bits() {
101  return 2 * scalar_field_type::modulus_bits; // This probably should be value_bits, not
102  // modulus_bits
103  }
104  static std::size_t num_variables() {
105  return 2;
106  }
107  };
108 
113  template<typename CurveType>
114  class element_g1_is_well_formed : public component<typename CurveType::scalar_field_type> {
115  typedef typename CurveType::scalar_field_type scalar_field_type;
116 
117  public:
119 
122 
123  // Intermeditate variables:
131 
134  a,
136  d,
137  const element_g1<CurveType> &P) :
138  component<scalar_field_type>(bp),
139  P(P), a(a), d(d) {
140 
141  XX.allocate(this->bp);
142  aXX.allocate(this->bp);
143  dXX.allocate(this->bp);
144  YY.allocate(this->bp);
145  dXXYY.allocate(this->bp);
146  lhs.allocate(this->bp);
147  rhs.allocate(this->bp);
148  }
150  // A check, that a*X*X + Y*Y = 1 + d*X*X*Y*Y
151 
152  this->bp.add_r1cs_constraint(snark::r1cs_constraint<scalar_field_type>({P.X}, {P.X}, {XX}));
153  this->bp.add_r1cs_constraint(snark::r1cs_constraint<scalar_field_type>({P.Y}, {P.Y}, {YY}));
154  this->bp.add_r1cs_constraint(snark::r1cs_constraint<scalar_field_type>({a}, {XX}, {aXX}));
155  this->bp.add_r1cs_constraint(snark::r1cs_constraint<scalar_field_type>(
156  {aXX, YY}, {scalar_field_type::value_type::one()}, {lhs}));
157  this->bp.add_r1cs_constraint(snark::r1cs_constraint<scalar_field_type>({d}, {XX}, {dXX}));
158  this->bp.add_r1cs_constraint(snark::r1cs_constraint<scalar_field_type>({dXX}, {YY}, {dXXYY}));
159  this->bp.add_r1cs_constraint(
160  snark::r1cs_constraint<scalar_field_type>({dXXYY, scalar_field_type::value_type::one()},
161  {scalar_field_type::value_type::one()},
162  {rhs}));
163  this->bp.add_r1cs_constraint(snark::r1cs_constraint<scalar_field_type>(
164  {lhs}, {scalar_field_type::value_type::one()}, {rhs}));
165  }
167  typename scalar_field_type::value_type x = this->bp.lc_val(this->P.X);
168  typename scalar_field_type::value_type y = this->bp.lc_val(this->P.Y);
169  typename scalar_field_type::value_type temp_a = this->bp.val(this->a);
170  typename scalar_field_type::value_type temp_d = this->bp.val(this->d);
171 
172  // this->bp.val(this->P.X) = x;
173  // this->bp.val(this->P.Y) = y;
174  // this->bp.val(this->a) = temp_a;
175  // this->bp.val(this->d) = temp_d;
176 
177  this->bp.val(this->XX) = x * x;
178  this->bp.val(this->YY) = y * y;
179  this->bp.val(this->aXX) = temp_a * x * x;
180  this->bp.val(this->lhs) = temp_a * x * x + y * y;
181  this->bp.val(this->dXX) = x * x * temp_d;
182  this->bp.val(this->dXXYY) = temp_d * x * x * y * y;
183 
184  this->bp.val(this->rhs) = temp_d * x * x * y * y + scalar_field_type::value_type::one();
185  }
186  };
187 
192  template<typename CurveType>
193  class element_g1_add : public component<typename CurveType::scalar_field_type> {
194  typedef typename CurveType::scalar_field_type scalar_field_type;
195 
196  public:
199 
203 
204  // std::shared_ptr<element_g1_is_well_formed<CurveType>> el_is_well_formed;
205 
206  // intermeditate variables
214 
217  a,
219  d,
220  const element_g1<CurveType> &P1,
221  const element_g1<CurveType> &P2,
222  const element_g1<CurveType> &P1pP2) :
223  component<scalar_field_type>(bp),
224  P1(P1), P2(P2), P1pP2(P1pP2), a(a), d(d) {
225 
226  // el_is_well_formed.reset(
227  // new element_g1_is_well_formed <CurveType> (
228  // this->bp, a, d, P1pP2));
229 
230  X1X2.allocate(this->bp);
231  X1Y2.allocate(this->bp);
232  Y1Y2.allocate(this->bp);
233  Y1X2.allocate(this->bp);
234  X1X2Y1Y2.allocate(this->bp);
235  dX1X2Y1Y2.allocate(this->bp);
236  aX1X2.allocate(this->bp);
237  }
239  // A check, that
240  // X3 = (X1*Y2 + Y1*X2) / (Fq.ONE + D*X1*X2*Y1*Y2)
241  // y3 = (Y1*Y2 - A*X1*X2) / (Fq.ONE - D*X1*X2*Y1*Y2)
242 
243  this->bp.add_r1cs_constraint(snark::r1cs_constraint<scalar_field_type>({P1.Y}, {P2.X}, {Y1X2}));
244  this->bp.add_r1cs_constraint(snark::r1cs_constraint<scalar_field_type>({P1.X}, {P2.Y}, {X1Y2}));
245  this->bp.add_r1cs_constraint(snark::r1cs_constraint<scalar_field_type>({P1.X}, {P2.X}, {X1X2}));
246  this->bp.add_r1cs_constraint(snark::r1cs_constraint<scalar_field_type>({P1.Y}, {P2.Y}, {Y1Y2}));
247  this->bp.add_r1cs_constraint(
249  this->bp.add_r1cs_constraint(
251  this->bp.add_r1cs_constraint(snark::r1cs_constraint<scalar_field_type>({a}, {X1X2}, {aX1X2}));
252  this->bp.add_r1cs_constraint(snark::r1cs_constraint<scalar_field_type>(
253  {P1pP2.Y}, {scalar_field_type::value_type::one(), -dX1X2Y1Y2}, {Y1Y2, -aX1X2}));
254  this->bp.add_r1cs_constraint(snark::r1cs_constraint<scalar_field_type>(
255  {P1pP2.X}, {scalar_field_type::value_type::one(), dX1X2Y1Y2}, {X1Y2, Y1X2}));
256  }
258 
259  typename scalar_field_type::value_type x1 = this->bp.lc_val(this->P1.X);
260  typename scalar_field_type::value_type y1 = this->bp.lc_val(this->P1.Y);
261  typename scalar_field_type::value_type x2 = this->bp.lc_val(this->P2.X);
262  typename scalar_field_type::value_type y2 = this->bp.lc_val(this->P2.Y);
263  typename scalar_field_type::value_type temp_a = this->bp.lc_val(this->a);
264  typename scalar_field_type::value_type temp_d = this->bp.lc_val(this->d);
265 
266  this->bp.val(X1X2) = x1 * x2;
267  this->bp.val(X1Y2) = x1 * y2;
268  this->bp.val(Y1Y2) = y1 * y2;
269  this->bp.val(Y1X2) = y1 * x2;
270  this->bp.val(X1X2Y1Y2) = x1 * x2 * y1 * y2;
271  this->bp.val(dX1X2Y1Y2) = temp_d * x1 * x2 * y1 * y2;
272  this->bp.val(aX1X2) = temp_a * x1 * x2;
273 
274  this->bp.lc_val(P1pP2.X) =
275  (x1 * y2 + y1 * x2) *
276  ((scalar_field_type::value_type::one() + (temp_d * x1 * x2 * y1 * y2)).inversed());
277  this->bp.lc_val(P1pP2.Y) =
278  (y1 * y2 - temp_a * x1 * x2) *
279  ((scalar_field_type::value_type::one() - (temp_d * x1 * x2 * y1 * y2)).inversed());
280 
281  // el_is_well_formed->generate_r1cs_witness();
282  }
283  };
284 
288  template<typename CurveType>
289  class element_g1_conditional_add : public component<typename CurveType::scalar_field_type> {
290  typedef typename CurveType::scalar_field_type scalar_field_type;
291 
292  public:
295 
299 
301 
302  // intermeditate variables
304  // blueprint_variable<scalar_field_type> x_toAdd;
305  // blueprint_variable<scalar_field_type> y_toAdd;
309 
310  std::shared_ptr<element_g1_add<CurveType>> el_add;
311 
314  a,
316  d,
317  const element_g1<CurveType> &P1,
318  const element_g1<CurveType> &P2,
321  canAdd) :
322  component<scalar_field_type>(bp),
323  P1(P1), P2(P2), P1pP2(P1pP2), a(a), d(d), canAdd(canAdd), P_toAdd() {
324 
327 
328  not_canAdd.allocate(this->bp);
329 
330  el_add.reset(new element_g1_add<CurveType>(this->bp, a, d, P1, P_toAdd, P1pP2));
331  }
332 
334  // if coef == 1 then x_ret[i] + x_base
335  // x_add[i] = coef[i] * x_base;
336  this->bp.add_r1cs_constraint(
338 
339  // else do nothing. Ie add the zero point (0, 1)
340  // y_add[i] = coef[i] * y_base + !coef[i];
341  this->bp.add_r1cs_constraint(
343 
344  // not coef
345  // make sure canAdd == 0 or canAdd == 1
346  this->bp.add_r1cs_constraint(
348  scalar_field_type::value_type::one() - canAdd,
349  scalar_field_type::value_type::zero()));
350 
351  // make sure not_canAdd == 0 or not_canAdd == 1
352  this->bp.add_r1cs_constraint(
354  scalar_field_type::value_type::one() - not_canAdd,
355  scalar_field_type::value_type::zero()));
356 
357  // make sure that the sum of canAdd, not_canAdd == 1 which means canAdd!=not_canAdd
358  this->bp.add_r1cs_constraint(
360  {scalar_field_type::value_type::one()},
361  {scalar_field_type::value_type::one()}));
362 
363  // because the are bool and because they are not equal we know that the inverse of one
364  // is the other.
365  this->bp.add_r1cs_constraint(snark::r1cs_constraint<scalar_field_type>(
366  {not_canAdd}, {scalar_field_type::value_type::one()}, {Y_intermediate_toAdd2}));
367 
368  this->bp.add_r1cs_constraint(
370  {scalar_field_type::value_type::one()},
371  {P_toAdd.Y}));
372 
373  // do the addition of either y1 , y1 plus x2, y2 if canAdd == true else x1 , y1 + 0
374  el_add->generate_r1cs_constraints();
375  }
377  this->bp.lc_val(P_toAdd.X) = this->bp.lc_val(this->P2.X) * this->bp.val(this->canAdd);
378 
379  this->bp.val(this->Y_intermediate_toAdd1) =
380  this->bp.lc_val(this->P2.Y) * this->bp.val(this->canAdd);
381 
382  if (this->bp.val(this->canAdd) == scalar_field_type::value_type::one()) {
383 
384  this->bp.val(this->not_canAdd) = scalar_field_type::value_type::zero();
385  this->bp.val(this->Y_intermediate_toAdd2) =
386  this->bp.val(this->not_canAdd) * scalar_field_type::value_type::one();
387  this->bp.lc_val(this->P_toAdd.Y) = this->bp.val(this->Y_intermediate_toAdd1);
388 
389  } else {
390 
391  this->bp.val(this->not_canAdd) = scalar_field_type::value_type::one();
392  this->bp.val(this->Y_intermediate_toAdd2) =
393  this->bp.val(this->not_canAdd) * scalar_field_type::value_type::one();
394  this->bp.lc_val(this->P_toAdd.Y) = scalar_field_type::value_type::one();
395  // this->bp.lc_val(this->Y_intermediate_toAdd2));
396  }
397 
398  el_add->generate_r1cs_witness();
399  }
400  };
401  } // namespace components
402  } // namespace zk
403  } // namespace crypto3
404 } // namespace nil
405 
406 #endif // CRYPTO3_ZK_BLUEPRINT_TWISTED_EDWARDS_G1_COMPONENT_HPP
Definition: blueprint_linear_combination.hpp:47
void assign(blueprint< field_type > &bp, const snark::linear_combination< field_type > &lc)
Definition: blueprint_linear_combination.hpp:65
void evaluate(blueprint< field_type > &bp) const
Definition: blueprint_linear_combination.hpp:71
void allocate(blueprint< FieldType > &bp)
Definition: blueprint_variable.hpp:51
Definition: blueprint.hpp:46
Definition: component.hpp:37
blueprint< CurveType::scalar_field_type > & bp
Definition: component.hpp:39
Definition: blueprint/include/nil/crypto3/zk/components/algebra/curves/edwards/element_g1.hpp:193
blueprint_variable< scalar_field_type > d
Definition: blueprint/include/nil/crypto3/zk/components/algebra/curves/edwards/element_g1.hpp:198
element_g1< CurveType > P1
Definition: blueprint/include/nil/crypto3/zk/components/algebra/curves/edwards/element_g1.hpp:200
element_g1< CurveType > P2
Definition: blueprint/include/nil/crypto3/zk/components/algebra/curves/edwards/element_g1.hpp:201
blueprint_variable< scalar_field_type > X1Y2
Definition: blueprint/include/nil/crypto3/zk/components/algebra/curves/edwards/element_g1.hpp:208
void generate_r1cs_constraints()
Definition: blueprint/include/nil/crypto3/zk/components/algebra/curves/edwards/element_g1.hpp:238
blueprint_variable< scalar_field_type > aX1X2
Definition: blueprint/include/nil/crypto3/zk/components/algebra/curves/edwards/element_g1.hpp:213
element_g1< CurveType > P1pP2
Definition: blueprint/include/nil/crypto3/zk/components/algebra/curves/edwards/element_g1.hpp:202
element_g1_add(blueprint< scalar_field_type > &bp, blueprint_variable< scalar_field_type > a, blueprint_variable< scalar_field_type > d, const element_g1< CurveType > &P1, const element_g1< CurveType > &P2, const element_g1< CurveType > &P1pP2)
Definition: blueprint/include/nil/crypto3/zk/components/algebra/curves/edwards/element_g1.hpp:215
blueprint_variable< scalar_field_type > a
Definition: blueprint/include/nil/crypto3/zk/components/algebra/curves/edwards/element_g1.hpp:197
blueprint_variable< scalar_field_type > Y1Y2
Definition: blueprint/include/nil/crypto3/zk/components/algebra/curves/edwards/element_g1.hpp:209
blueprint_variable< scalar_field_type > X1X2
Definition: blueprint/include/nil/crypto3/zk/components/algebra/curves/edwards/element_g1.hpp:207
blueprint_variable< scalar_field_type > X1X2Y1Y2
Definition: blueprint/include/nil/crypto3/zk/components/algebra/curves/edwards/element_g1.hpp:211
blueprint_variable< scalar_field_type > Y1X2
Definition: blueprint/include/nil/crypto3/zk/components/algebra/curves/edwards/element_g1.hpp:210
void generate_r1cs_witness()
Definition: blueprint/include/nil/crypto3/zk/components/algebra/curves/edwards/element_g1.hpp:257
blueprint_variable< scalar_field_type > dX1X2Y1Y2
Definition: blueprint/include/nil/crypto3/zk/components/algebra/curves/edwards/element_g1.hpp:212
Definition: blueprint/include/nil/crypto3/zk/components/algebra/curves/edwards/element_g1.hpp:289
element_g1< CurveType > P1
Definition: blueprint/include/nil/crypto3/zk/components/algebra/curves/edwards/element_g1.hpp:296
void generate_r1cs_constraints()
Definition: blueprint/include/nil/crypto3/zk/components/algebra/curves/edwards/element_g1.hpp:333
blueprint_variable< scalar_field_type > Y_intermediate_toAdd2
Definition: blueprint/include/nil/crypto3/zk/components/algebra/curves/edwards/element_g1.hpp:307
element_g1_conditional_add(blueprint< scalar_field_type > &bp, blueprint_variable< scalar_field_type > a, blueprint_variable< scalar_field_type > d, const element_g1< CurveType > &P1, const element_g1< CurveType > &P2, const element_g1< CurveType > &P1pP2, blueprint_variable< scalar_field_type > canAdd)
Definition: blueprint/include/nil/crypto3/zk/components/algebra/curves/edwards/element_g1.hpp:312
blueprint_variable< scalar_field_type > Y_intermediate_toAdd1
Definition: blueprint/include/nil/crypto3/zk/components/algebra/curves/edwards/element_g1.hpp:306
void generate_r1cs_witness()
Definition: blueprint/include/nil/crypto3/zk/components/algebra/curves/edwards/element_g1.hpp:376
blueprint_variable< scalar_field_type > canAdd
Definition: blueprint/include/nil/crypto3/zk/components/algebra/curves/edwards/element_g1.hpp:300
element_g1< CurveType > P_toAdd
Definition: blueprint/include/nil/crypto3/zk/components/algebra/curves/edwards/element_g1.hpp:303
element_g1< CurveType > P1pP2
Definition: blueprint/include/nil/crypto3/zk/components/algebra/curves/edwards/element_g1.hpp:298
blueprint_variable< scalar_field_type > d
Definition: blueprint/include/nil/crypto3/zk/components/algebra/curves/edwards/element_g1.hpp:294
std::shared_ptr< element_g1_add< CurveType > > el_add
Definition: blueprint/include/nil/crypto3/zk/components/algebra/curves/edwards/element_g1.hpp:310
blueprint_variable< scalar_field_type > not_canAdd
Definition: blueprint/include/nil/crypto3/zk/components/algebra/curves/edwards/element_g1.hpp:308
blueprint_variable< scalar_field_type > a
Definition: blueprint/include/nil/crypto3/zk/components/algebra/curves/edwards/element_g1.hpp:293
element_g1< CurveType > P2
Definition: blueprint/include/nil/crypto3/zk/components/algebra/curves/edwards/element_g1.hpp:297
Definition: blueprint/include/nil/crypto3/zk/components/algebra/curves/edwards/element_g1.hpp:114
blueprint_variable< scalar_field_type > rhs
Definition: blueprint/include/nil/crypto3/zk/components/algebra/curves/edwards/element_g1.hpp:130
element_g1_is_well_formed(blueprint< scalar_field_type > &bp, blueprint_variable< scalar_field_type > a, blueprint_variable< scalar_field_type > d, const element_g1< CurveType > &P)
Definition: blueprint/include/nil/crypto3/zk/components/algebra/curves/edwards/element_g1.hpp:132
blueprint_variable< scalar_field_type > XX
Definition: blueprint/include/nil/crypto3/zk/components/algebra/curves/edwards/element_g1.hpp:124
blueprint_variable< scalar_field_type > aXX
Definition: blueprint/include/nil/crypto3/zk/components/algebra/curves/edwards/element_g1.hpp:125
blueprint_variable< scalar_field_type > dXX
Definition: blueprint/include/nil/crypto3/zk/components/algebra/curves/edwards/element_g1.hpp:126
void generate_r1cs_witness()
Definition: blueprint/include/nil/crypto3/zk/components/algebra/curves/edwards/element_g1.hpp:166
blueprint_variable< scalar_field_type > dXXYY
Definition: blueprint/include/nil/crypto3/zk/components/algebra/curves/edwards/element_g1.hpp:128
blueprint_variable< scalar_field_type > lhs
Definition: blueprint/include/nil/crypto3/zk/components/algebra/curves/edwards/element_g1.hpp:129
blueprint_variable< scalar_field_type > d
Definition: blueprint/include/nil/crypto3/zk/components/algebra/curves/edwards/element_g1.hpp:121
void generate_r1cs_constraints()
Definition: blueprint/include/nil/crypto3/zk/components/algebra/curves/edwards/element_g1.hpp:149
blueprint_variable< scalar_field_type > a
Definition: blueprint/include/nil/crypto3/zk/components/algebra/curves/edwards/element_g1.hpp:120
blueprint_variable< scalar_field_type > YY
Definition: blueprint/include/nil/crypto3/zk/components/algebra/curves/edwards/element_g1.hpp:127
element_g1< CurveType > P
Definition: blueprint/include/nil/crypto3/zk/components/algebra/curves/edwards/element_g1.hpp:118
Definition: blueprint/include/nil/crypto3/zk/components/algebra/curves/edwards/element_g1.hpp:51
element_g1(blueprint< scalar_field_type > &bp)
Definition: blueprint/include/nil/crypto3/zk/components/algebra/curves/edwards/element_g1.hpp:61
underlying_element_type X
Definition: blueprint/include/nil/crypto3/zk/components/algebra/curves/edwards/element_g1.hpp:56
element_g1(blueprint< scalar_field_type > &bp, const typename CurveType::pairing::chained_curve_type::template g1_type<>::value_type &P)
Definition: blueprint/include/nil/crypto3/zk/components/algebra/curves/edwards/element_g1.hpp:74
underlying_element_type Y
Definition: blueprint/include/nil/crypto3/zk/components/algebra/curves/edwards/element_g1.hpp:57
void generate_r1cs_witness(const typename CurveType::pairing::chained_curve_type::template g1_type<>::value_type &el)
Definition: blueprint/include/nil/crypto3/zk/components/algebra/curves/edwards/element_g1.hpp:89
static std::size_t __attribute__((noinline)) size_in_bits()
Definition: blueprint/include/nil/crypto3/zk/components/algebra/curves/edwards/element_g1.hpp:100
blueprint_linear_combination_vector< scalar_field_type > all_vars
Definition: blueprint/include/nil/crypto3/zk/components/algebra/curves/edwards/element_g1.hpp:59
static std::size_t num_variables()
Definition: blueprint/include/nil/crypto3/zk/components/algebra/curves/edwards/element_g1.hpp:104
Definition: pair.hpp:31