1use core::ops::{Add, Neg};
2
3use hex_literal::hex;
4#[cfg(not(target_os = "zkvm"))]
5use lazy_static::lazy_static;
6#[cfg(not(target_os = "zkvm"))]
7use num_bigint::BigUint;
8use openvm_algebra_guest::{Field, IntMod};
9use openvm_algebra_moduli_macros::moduli_declare;
10use openvm_ecc_guest::{
11 weierstrass::{CachedMulTable, IntrinsicCurve},
12 CyclicGroup, Group,
13};
14use openvm_ecc_sw_macros::sw_declare;
15
16use crate::pairing::PairingIntrinsics;
17
18mod fp12;
19mod fp2;
20pub mod pairing;
21#[cfg(all(feature = "halo2curves", not(target_os = "zkvm")))]
22pub(crate) mod utils;
23
24pub use fp12::*;
25pub use fp2::*;
26
27#[cfg(all(test, feature = "halo2curves", not(target_os = "zkvm")))]
28pub mod tests;
29
30#[cfg(not(target_os = "zkvm"))]
31lazy_static! {
32 pub static ref BN254_MODULUS: BigUint = BigUint::from_bytes_be(&hex!(
33 "30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47"
34 ));
35 pub static ref BN254_ORDER: BigUint = BigUint::from_bytes_be(&hex!(
36 "30644e72e131a029b85045b68181585d2833e84879b9709143e1f593f0000001"
37 ));
38}
39
40pub const BN254_XI_ISIZE: [isize; 2] = [9, 1];
41pub const BN254_NUM_LIMBS: usize = 32;
42pub const BN254_LIMB_BITS: usize = 8;
43pub const BN254_BLOCK_SIZE: usize = 32;
44
45pub const BN254_SEED: u64 = 0x44e992b44a6909f1;
46pub const BN254_PSEUDO_BINARY_ENCODING: [i8; 66] = [
51 0, 0, 0, 1, 0, 1, 0, -1, 0, 0, -1, 0, 0, 0, 1, 0, 0, -1, 0, -1, 0, 0, 0, 1, 0, -1, 0, 0, 0, 0,
52 -1, 0, 0, 1, 0, -1, 0, 0, 1, 0, 0, 0, 0, 0, -1, 0, 0, -1, 0, 1, 0, -1, 0, 0, 0, -1, 0, -1, 0,
53 0, 0, 1, 0, -1, 0, 1,
54];
55
56moduli_declare! {
57 Bn254Fp { modulus = "21888242871839275222246405745257275088696311157297823662689037894645226208583" },
58 Bn254Scalar { modulus = "21888242871839275222246405745257275088548364400416034343698204186575808495617" },
59}
60
61const CURVE_B: Bn254Fp = Bn254Fp::from_const_bytes(hex!(
62 "0300000000000000000000000000000000000000000000000000000000000000"
63));
64
65sw_declare! {
66 Bn254G1Affine { mod_type = Bn254Fp, b = CURVE_B },
67}
68
69pub type Fp = Bn254Fp;
70pub type Scalar = Bn254Scalar;
71pub type G1Affine = Bn254G1Affine;
72pub use g2::G2Affine;
73
74impl Field for Fp {
75 type SelfRef<'a> = &'a Self;
76 const ZERO: Self = <Self as IntMod>::ZERO;
77 const ONE: Self = <Self as IntMod>::ONE;
78
79 fn double_assign(&mut self) {
80 IntMod::double_assign(self);
81 }
82
83 fn square_assign(&mut self) {
84 IntMod::square_assign(self);
85 }
86}
87
88impl Field for Scalar {
89 type SelfRef<'a> = &'a Self;
90 const ZERO: Self = <Self as IntMod>::ZERO;
91 const ONE: Self = <Self as IntMod>::ONE;
92
93 fn double_assign(&mut self) {
94 IntMod::double_assign(self);
95 }
96
97 fn square_assign(&mut self) {
98 IntMod::square_assign(self);
99 }
100}
101
102impl CyclicGroup for G1Affine {
103 const GENERATOR: Self = G1Affine {
105 x: Bn254Fp::from_const_u8(1),
106 y: Bn254Fp::from_const_u8(2),
107 };
108 const NEG_GENERATOR: Self = G1Affine {
109 x: Bn254Fp::from_const_u8(1),
110 y: Bn254Fp::from_const_bytes(hex!(
111 "45FD7CD8168C203C8DCA7168916A81975D588181B64550B829A031E1724E6430"
112 )),
113 };
114}
115
116mod g2 {
119 use hex_literal::hex;
120 use openvm_algebra_guest::Field;
121 use openvm_ecc_guest::{
122 impl_sw_affine, impl_sw_group_ops, weierstrass::WeierstrassPoint, AffinePoint, Group,
123 };
124
125 use super::{Fp, Fp2};
126
127 const THREE: Fp2 = Fp2::new(Fp::from_const_u8(3), Fp::ZERO);
128 const B: Fp2 = Fp2::new(
131 Fp::from_const_bytes(hex!(
132 "e538a124dce66732a3efdb59e5c5b4b5c36ae01b9918be81aeaab8ce409d142b"
133 )),
134 Fp::from_const_bytes(hex!(
135 "d215c38506bda2e452182de584a04fa7f4fdd8eeadaf2ccdd4fef03ab0139700"
136 )),
137 );
138 impl_sw_affine!(G2Affine, Fp2, THREE, B);
139 impl_sw_group_ops!(G2Affine, Fp2);
140
141 #[test]
142 fn test_g2_curve_equation_b() {
143 use openvm_algebra_guest::DivUnsafe;
144 let b = Fp2::new(Fp::from_const_u8(3), Fp::ZERO)
145 .div_unsafe(Fp2::new(Fp::from_const_u8(9), Fp::ONE));
146 assert_eq!(b, B);
147 }
148}
149
150pub struct Bn254;
151
152impl Bn254 {
153 pub const FROBENIUS_COEFF_FQ6_C1: [Fp2; 3] = [
156 Fp2 {
157 c0: Bn254Fp(hex!(
158 "0100000000000000000000000000000000000000000000000000000000000000"
159 )),
160 c1: Bn254Fp(hex!(
161 "0000000000000000000000000000000000000000000000000000000000000000"
162 )),
163 },
164 Fp2 {
165 c0: Bn254Fp(hex!(
166 "3d556f175795e3990c33c3c210c38cb743b159f53cec0b4cf711794f9847b32f"
167 )),
168 c1: Bn254Fp(hex!(
169 "a2cb0f641cd56516ce9d7c0b1d2aae3294075ad78bcca44b20aeeb6150e5c916"
170 )),
171 },
172 Fp2 {
173 c0: Bn254Fp(hex!(
174 "48fd7c60e544bde43d6e96bb9f068fc2b0ccace0e7d96d5e29a031e1724e6430"
175 )),
176 c1: Bn254Fp(hex!(
177 "0000000000000000000000000000000000000000000000000000000000000000"
178 )),
179 },
180 ];
181
182 pub const XI_TO_Q_MINUS_1_OVER_2: Fp2 = Fp2 {
185 c0: Bn254Fp(hex!(
186 "5a13a071460154dc9859c9a9ede0aadbb9f9e2b698c65edcdcf59a4805f33c06"
187 )),
188 c1: Bn254Fp(hex!(
189 "e3b02326637fd382d25ba28fc97d80212b6f79eca7b504079a0441acbc3cc007"
190 )),
191 };
192
193 pub const FINAL_EXPONENT: [u8; 349] = hex!(
196 "2f4b6dc97020fddadf107d20bc842d43bf6369b1ff6a1c71015f3f7be2e1e30a73bb94fec0daf15466b2383a5d3ec3d15ad524d8f70c54efee1bd8c3b21377e563a09a1b705887e72eceaddea3790364a61f676baaf977870e88d5c6c8fef0781361e443ae77f5b63a2a2264487f2940a8b1ddb3d15062cd0fb2015dfc6668449aed3cc48a82d0d602d268c7daab6a41294c0cc4ebe5664568dfc50e1648a45a4a1e3a5195846a3ed011a337a02088ec80e0ebae8755cfe107acf3aafb40494e406f804216bb10cf430b0f37856b42db8dc5514724ee93dfb10826f0dd4a0364b9580291d2cd65664814fde37ca80bb4ea44eacc5e641bbadf423f9a2cbf813b8d145da90029baee7ddadda71c7f3811c4105262945bba1668c3be69a3c230974d83561841d766f9c9d570bb7fbe04c7e8a6c3c760c0de81def35692da361102b6b9b2b918837fa97896e84abb40a4efb7e54523a486964b64ca86f120"
197 );
198}
199
200impl IntrinsicCurve for Bn254 {
201 type Scalar = Scalar;
202 type Point = G1Affine;
203
204 fn msm(coeffs: &[Self::Scalar], bases: &[Self::Point]) -> Self::Point
205 where
206 for<'a> &'a Self::Point: Add<&'a Self::Point, Output = Self::Point>,
207 {
208 if coeffs.len() < 25 {
210 let table = CachedMulTable::<Self>::new_with_prime_order(bases, 4);
213 table.windowed_mul(coeffs)
214 } else {
215 openvm_ecc_guest::msm(coeffs, bases)
216 }
217 }
218}
219
220impl PairingIntrinsics for Bn254 {
221 type Fp = Fp;
222 type Fp2 = Fp2;
223 type Fp12 = Fp12;
224
225 const PAIRING_IDX: usize = 0;
226 const XI: Fp2 = Fp2::new(Fp::from_const_u8(9), Fp::from_const_u8(1));
228 const FP2_TWO: Fp2 = Fp2::new(Fp::from_const_u8(2), Fp::from_const_u8(0));
229 const FP2_THREE: Fp2 = Fp2::new(Fp::from_const_u8(3), Fp::from_const_u8(0));
230 const FROBENIUS_COEFFS: [[Self::Fp2; 5]; 12] = [
235 [
236 Fp2 {
237 c0: Bn254Fp(hex!(
238 "0100000000000000000000000000000000000000000000000000000000000000"
239 )),
240 c1: Bn254Fp(hex!(
241 "0000000000000000000000000000000000000000000000000000000000000000"
242 )),
243 },
244 Fp2 {
245 c0: Bn254Fp(hex!(
246 "0100000000000000000000000000000000000000000000000000000000000000"
247 )),
248 c1: Bn254Fp(hex!(
249 "0000000000000000000000000000000000000000000000000000000000000000"
250 )),
251 },
252 Fp2 {
253 c0: Bn254Fp(hex!(
254 "0100000000000000000000000000000000000000000000000000000000000000"
255 )),
256 c1: Bn254Fp(hex!(
257 "0000000000000000000000000000000000000000000000000000000000000000"
258 )),
259 },
260 Fp2 {
261 c0: Bn254Fp(hex!(
262 "0100000000000000000000000000000000000000000000000000000000000000"
263 )),
264 c1: Bn254Fp(hex!(
265 "0000000000000000000000000000000000000000000000000000000000000000"
266 )),
267 },
268 Fp2 {
269 c0: Bn254Fp(hex!(
270 "0100000000000000000000000000000000000000000000000000000000000000"
271 )),
272 c1: Bn254Fp(hex!(
273 "0000000000000000000000000000000000000000000000000000000000000000"
274 )),
275 },
276 ],
277 [
278 Fp2 {
279 c0: Bn254Fp(hex!(
280 "70e4c9dcda350bd676212f29081e525c608be676dd9fb9e8dfa765281cb78412"
281 )),
282 c1: Bn254Fp(hex!(
283 "ac62f3805ff05ccae5c7ee8e779279748e0b1512fe7c32a6e6e7fab4f3966924"
284 )),
285 },
286 Fp2 {
287 c0: Bn254Fp(hex!(
288 "3d556f175795e3990c33c3c210c38cb743b159f53cec0b4cf711794f9847b32f"
289 )),
290 c1: Bn254Fp(hex!(
291 "a2cb0f641cd56516ce9d7c0b1d2aae3294075ad78bcca44b20aeeb6150e5c916"
292 )),
293 },
294 Fp2 {
295 c0: Bn254Fp(hex!(
296 "5a13a071460154dc9859c9a9ede0aadbb9f9e2b698c65edcdcf59a4805f33c06"
297 )),
298 c1: Bn254Fp(hex!(
299 "e3b02326637fd382d25ba28fc97d80212b6f79eca7b504079a0441acbc3cc007"
300 )),
301 },
302 Fp2 {
303 c0: Bn254Fp(hex!(
304 "62a71e92551f8a8472ec94bef76533d3841e185ab7c0f38001a8ee645e4fb505"
305 )),
306 c1: Bn254Fp(hex!(
307 "26812bcd11473bc163c7de1bead28536921c0b3bb0803a9fee8afde7db5e142c"
308 )),
309 },
310 Fp2 {
311 c0: Bn254Fp(hex!(
312 "2f69b7ea10c8a22ed31baa559b455c42f43f35a461363ae94986794fe7c18301"
313 )),
314 c1: Bn254Fp(hex!(
315 "4b2c0c6eeeb8c624c02a8e6799cb80b07d9f72c746b27fa27506fd76caf2ac12"
316 )),
317 },
318 ],
319 [
320 Fp2 {
321 c0: Bn254Fp(hex!(
322 "49fd7c60e544bde43d6e96bb9f068fc2b0ccace0e7d96d5e29a031e1724e6430"
323 )),
324 c1: Bn254Fp(hex!(
325 "0000000000000000000000000000000000000000000000000000000000000000"
326 )),
327 },
328 Fp2 {
329 c0: Bn254Fp(hex!(
330 "48fd7c60e544bde43d6e96bb9f068fc2b0ccace0e7d96d5e29a031e1724e6430"
331 )),
332 c1: Bn254Fp(hex!(
333 "0000000000000000000000000000000000000000000000000000000000000000"
334 )),
335 },
336 Fp2 {
337 c0: Bn254Fp(hex!(
338 "46fd7cd8168c203c8dca7168916a81975d588181b64550b829a031e1724e6430"
339 )),
340 c1: Bn254Fp(hex!(
341 "0000000000000000000000000000000000000000000000000000000000000000"
342 )),
343 },
344 Fp2 {
345 c0: Bn254Fp(hex!(
346 "feffff77314763574f5cdbacf163f2d4ac8bd4a0ce6be2590000000000000000"
347 )),
348 c1: Bn254Fp(hex!(
349 "0000000000000000000000000000000000000000000000000000000000000000"
350 )),
351 },
352 Fp2 {
353 c0: Bn254Fp(hex!(
354 "ffffff77314763574f5cdbacf163f2d4ac8bd4a0ce6be2590000000000000000"
355 )),
356 c1: Bn254Fp(hex!(
357 "0000000000000000000000000000000000000000000000000000000000000000"
358 )),
359 },
360 ],
361 [
362 Fp2 {
363 c0: Bn254Fp(hex!(
364 "7fa6d41e397d6fe84ad255be8db34c8990aaacd08c60e9efbbe482cccf81dc19"
365 )),
366 c1: Bn254Fp(hex!(
367 "01c1c0f42baa9476ec39d497e3a5037f9d137635e3eecb06737de70bb6f8ab00"
368 )),
369 },
370 Fp2 {
371 c0: Bn254Fp(hex!(
372 "6dfbdc7be86e747bd342695d3dfd5f80ac259f95771cffba0aef55b778e05608"
373 )),
374 c1: Bn254Fp(hex!(
375 "de86a5aa2bab0c383126ff98bf31df0f4f0926ec6d0ef3a96f76d1b341def104"
376 )),
377 },
378 Fp2 {
379 c0: Bn254Fp(hex!(
380 "ede9dc66d08acc5ff470a8bea389d6bba35e9eca1d7ff1db4caa96986d5b272a"
381 )),
382 c1: Bn254Fp(hex!(
383 "644c59b2b30c4db9ba6ecfd8c7ec007632e907950e904bb18f9bf034b611a428"
384 )),
385 },
386 Fp2 {
387 c0: Bn254Fp(hex!(
388 "66f0cb3cbc921a0ecb6bb075450933e64e44b2b5f7e0be19ab8dc011668cc50b"
389 )),
390 c1: Bn254Fp(hex!(
391 "9f230c739dede35fe5967f73089e4aa4041dd20ceff6b0fe120a91e199e9d523"
392 )),
393 },
394 Fp2 {
395 c0: Bn254Fp(hex!(
396 "431b26767084deeba5847c969880d62e693f4d3bfa99167105092c954490c413"
397 )),
398 c1: Bn254Fp(hex!(
399 "992428841304251f21800220eada2d3e3d63482a28b2b19f0bddb1596a36db16"
400 )),
401 },
402 ],
403 [
404 Fp2 {
405 c0: Bn254Fp(hex!(
406 "48fd7c60e544bde43d6e96bb9f068fc2b0ccace0e7d96d5e29a031e1724e6430"
407 )),
408 c1: Bn254Fp(hex!(
409 "0000000000000000000000000000000000000000000000000000000000000000"
410 )),
411 },
412 Fp2 {
413 c0: Bn254Fp(hex!(
414 "feffff77314763574f5cdbacf163f2d4ac8bd4a0ce6be2590000000000000000"
415 )),
416 c1: Bn254Fp(hex!(
417 "0000000000000000000000000000000000000000000000000000000000000000"
418 )),
419 },
420 Fp2 {
421 c0: Bn254Fp(hex!(
422 "0100000000000000000000000000000000000000000000000000000000000000"
423 )),
424 c1: Bn254Fp(hex!(
425 "0000000000000000000000000000000000000000000000000000000000000000"
426 )),
427 },
428 Fp2 {
429 c0: Bn254Fp(hex!(
430 "48fd7c60e544bde43d6e96bb9f068fc2b0ccace0e7d96d5e29a031e1724e6430"
431 )),
432 c1: Bn254Fp(hex!(
433 "0000000000000000000000000000000000000000000000000000000000000000"
434 )),
435 },
436 Fp2 {
437 c0: Bn254Fp(hex!(
438 "feffff77314763574f5cdbacf163f2d4ac8bd4a0ce6be2590000000000000000"
439 )),
440 c1: Bn254Fp(hex!(
441 "0000000000000000000000000000000000000000000000000000000000000000"
442 )),
443 },
444 ],
445 [
446 Fp2 {
447 c0: Bn254Fp(hex!(
448 "0fc20a425e476412d4b026958595fa2c301fc659afc02f07dc3c1da4b3ca5707"
449 )),
450 c1: Bn254Fp(hex!(
451 "9c5b4a4ce34558e8933c5771fd7d0ba26c60e2a49bb7e918b6351e3835b0a60c"
452 )),
453 },
454 Fp2 {
455 c0: Bn254Fp(hex!(
456 "e4a9ad1dee13e9623a1fb7b0d41416f7cad90978b8829569513f94bbd474be28"
457 )),
458 c1: Bn254Fp(hex!(
459 "c7aac7c9ce0baeed8d06f6c3b40ef4547a4701bebc6ab8c2997b74cbe08aa814"
460 )),
461 },
462 Fp2 {
463 c0: Bn254Fp(hex!(
464 "5a13a071460154dc9859c9a9ede0aadbb9f9e2b698c65edcdcf59a4805f33c06"
465 )),
466 c1: Bn254Fp(hex!(
467 "e3b02326637fd382d25ba28fc97d80212b6f79eca7b504079a0441acbc3cc007"
468 )),
469 },
470 Fp2 {
471 c0: Bn254Fp(hex!(
472 "7f65920905da7ba94f722c3454fb1ade89f5b67107a49d1d7d6a826aae72e91e"
473 )),
474 c1: Bn254Fp(hex!(
475 "c955c2707ee32157d136854130643254247725bbcd13b5d251abd4f86f54de10"
476 )),
477 },
478 Fp2 {
479 c0: Bn254Fp(hex!(
480 "14b26e8b5fbc3bbdd268d240fd3a7aec74ff17979863dc87bb82b2455dce4012"
481 )),
482 c1: Bn254Fp(hex!(
483 "4ef81b16254b5efa605574b8500fad8dbfc3d562e1ff31fd95d6b4e29f432e04"
484 )),
485 },
486 ],
487 [
488 Fp2 {
489 c0: Bn254Fp(hex!(
490 "46fd7cd8168c203c8dca7168916a81975d588181b64550b829a031e1724e6430"
491 )),
492 c1: Bn254Fp(hex!(
493 "0000000000000000000000000000000000000000000000000000000000000000"
494 )),
495 },
496 Fp2 {
497 c0: Bn254Fp(hex!(
498 "0100000000000000000000000000000000000000000000000000000000000000"
499 )),
500 c1: Bn254Fp(hex!(
501 "0000000000000000000000000000000000000000000000000000000000000000"
502 )),
503 },
504 Fp2 {
505 c0: Bn254Fp(hex!(
506 "46fd7cd8168c203c8dca7168916a81975d588181b64550b829a031e1724e6430"
507 )),
508 c1: Bn254Fp(hex!(
509 "0000000000000000000000000000000000000000000000000000000000000000"
510 )),
511 },
512 Fp2 {
513 c0: Bn254Fp(hex!(
514 "0100000000000000000000000000000000000000000000000000000000000000"
515 )),
516 c1: Bn254Fp(hex!(
517 "0000000000000000000000000000000000000000000000000000000000000000"
518 )),
519 },
520 Fp2 {
521 c0: Bn254Fp(hex!(
522 "46fd7cd8168c203c8dca7168916a81975d588181b64550b829a031e1724e6430"
523 )),
524 c1: Bn254Fp(hex!(
525 "0000000000000000000000000000000000000000000000000000000000000000"
526 )),
527 },
528 ],
529 [
530 Fp2 {
531 c0: Bn254Fp(hex!(
532 "d718b3fb3b56156616a9423f894c2f3bfdcc9a0ad9a596cf49f8cbb85697df1d"
533 )),
534 c1: Bn254Fp(hex!(
535 "9b9a8957b79bc371a70283d919d80723cf4c6c6fb8c81d1243b8362c7fb7fa0b"
536 )),
537 },
538 Fp2 {
539 c0: Bn254Fp(hex!(
540 "3d556f175795e3990c33c3c210c38cb743b159f53cec0b4cf711794f9847b32f"
541 )),
542 c1: Bn254Fp(hex!(
543 "a2cb0f641cd56516ce9d7c0b1d2aae3294075ad78bcca44b20aeeb6150e5c916"
544 )),
545 },
546 Fp2 {
547 c0: Bn254Fp(hex!(
548 "ede9dc66d08acc5ff470a8bea389d6bba35e9eca1d7ff1db4caa96986d5b272a"
549 )),
550 c1: Bn254Fp(hex!(
551 "644c59b2b30c4db9ba6ecfd8c7ec007632e907950e904bb18f9bf034b611a428"
552 )),
553 },
554 Fp2 {
555 c0: Bn254Fp(hex!(
556 "62a71e92551f8a8472ec94bef76533d3841e185ab7c0f38001a8ee645e4fb505"
557 )),
558 c1: Bn254Fp(hex!(
559 "26812bcd11473bc163c7de1bead28536921c0b3bb0803a9fee8afde7db5e142c"
560 )),
561 },
562 Fp2 {
563 c0: Bn254Fp(hex!(
564 "1894c5ed05c47d0dbaaec712f624255569184cdd540f16cfdf19b8918b8ce02e"
565 )),
566 c1: Bn254Fp(hex!(
567 "fcd0706a28d35917cd9fe300f89e00e7dfb80eba6f93d015b499346aa85bb71d"
568 )),
569 },
570 ],
571 [
572 Fp2 {
573 c0: Bn254Fp(hex!(
574 "feffff77314763574f5cdbacf163f2d4ac8bd4a0ce6be2590000000000000000"
575 )),
576 c1: Bn254Fp(hex!(
577 "0000000000000000000000000000000000000000000000000000000000000000"
578 )),
579 },
580 Fp2 {
581 c0: Bn254Fp(hex!(
582 "48fd7c60e544bde43d6e96bb9f068fc2b0ccace0e7d96d5e29a031e1724e6430"
583 )),
584 c1: Bn254Fp(hex!(
585 "0000000000000000000000000000000000000000000000000000000000000000"
586 )),
587 },
588 Fp2 {
589 c0: Bn254Fp(hex!(
590 "0100000000000000000000000000000000000000000000000000000000000000"
591 )),
592 c1: Bn254Fp(hex!(
593 "0000000000000000000000000000000000000000000000000000000000000000"
594 )),
595 },
596 Fp2 {
597 c0: Bn254Fp(hex!(
598 "feffff77314763574f5cdbacf163f2d4ac8bd4a0ce6be2590000000000000000"
599 )),
600 c1: Bn254Fp(hex!(
601 "0000000000000000000000000000000000000000000000000000000000000000"
602 )),
603 },
604 Fp2 {
605 c0: Bn254Fp(hex!(
606 "48fd7c60e544bde43d6e96bb9f068fc2b0ccace0e7d96d5e29a031e1724e6430"
607 )),
608 c1: Bn254Fp(hex!(
609 "0000000000000000000000000000000000000000000000000000000000000000"
610 )),
611 },
612 ],
613 [
614 Fp2 {
615 c0: Bn254Fp(hex!(
616 "c856a8b9dd0eb15342f81baa03b7340ecdadd4b029e566c86dbbae14a3cc8716"
617 )),
618 c1: Bn254Fp(hex!(
619 "463cbce3eae18bc5a0909dd0adc47d18c0440b4cd35684b1b6224ad5bc55b82f"
620 )),
621 },
622 Fp2 {
623 c0: Bn254Fp(hex!(
624 "6dfbdc7be86e747bd342695d3dfd5f80ac259f95771cffba0aef55b778e05608"
625 )),
626 c1: Bn254Fp(hex!(
627 "de86a5aa2bab0c383126ff98bf31df0f4f0926ec6d0ef3a96f76d1b341def104"
628 )),
629 },
630 Fp2 {
631 c0: Bn254Fp(hex!(
632 "5a13a071460154dc9859c9a9ede0aadbb9f9e2b698c65edcdcf59a4805f33c06"
633 )),
634 c1: Bn254Fp(hex!(
635 "e3b02326637fd382d25ba28fc97d80212b6f79eca7b504079a0441acbc3cc007"
636 )),
637 },
638 Fp2 {
639 c0: Bn254Fp(hex!(
640 "66f0cb3cbc921a0ecb6bb075450933e64e44b2b5f7e0be19ab8dc011668cc50b"
641 )),
642 c1: Bn254Fp(hex!(
643 "9f230c739dede35fe5967f73089e4aa4041dd20ceff6b0fe120a91e199e9d523"
644 )),
645 },
646 Fp2 {
647 c0: Bn254Fp(hex!(
648 "04e25662a6074250e745f5d1f8e9aa68f4183446bcab39472497054c2ebe9f1c"
649 )),
650 c1: Bn254Fp(hex!(
651 "aed854540388fb1c6c4a6f48a78f535920f538578e939e181ec37f8708188919"
652 )),
653 },
654 ],
655 [
656 Fp2 {
657 c0: Bn254Fp(hex!(
658 "ffffff77314763574f5cdbacf163f2d4ac8bd4a0ce6be2590000000000000000"
659 )),
660 c1: Bn254Fp(hex!(
661 "0000000000000000000000000000000000000000000000000000000000000000"
662 )),
663 },
664 Fp2 {
665 c0: Bn254Fp(hex!(
666 "feffff77314763574f5cdbacf163f2d4ac8bd4a0ce6be2590000000000000000"
667 )),
668 c1: Bn254Fp(hex!(
669 "0000000000000000000000000000000000000000000000000000000000000000"
670 )),
671 },
672 Fp2 {
673 c0: Bn254Fp(hex!(
674 "46fd7cd8168c203c8dca7168916a81975d588181b64550b829a031e1724e6430"
675 )),
676 c1: Bn254Fp(hex!(
677 "0000000000000000000000000000000000000000000000000000000000000000"
678 )),
679 },
680 Fp2 {
681 c0: Bn254Fp(hex!(
682 "48fd7c60e544bde43d6e96bb9f068fc2b0ccace0e7d96d5e29a031e1724e6430"
683 )),
684 c1: Bn254Fp(hex!(
685 "0000000000000000000000000000000000000000000000000000000000000000"
686 )),
687 },
688 Fp2 {
689 c0: Bn254Fp(hex!(
690 "49fd7c60e544bde43d6e96bb9f068fc2b0ccace0e7d96d5e29a031e1724e6430"
691 )),
692 c1: Bn254Fp(hex!(
693 "0000000000000000000000000000000000000000000000000000000000000000"
694 )),
695 },
696 ],
697 [
698 Fp2 {
699 c0: Bn254Fp(hex!(
700 "383b7296b844bc29b9194bd30bd5866a2d39bb27078520b14d63143dbf830c29"
701 )),
702 c1: Bn254Fp(hex!(
703 "aba1328c3346c853f98d1af793ec75f5f0f79edc1a8e669f736a13a93d9ebd23"
704 )),
705 },
706 Fp2 {
707 c0: Bn254Fp(hex!(
708 "e4a9ad1dee13e9623a1fb7b0d41416f7cad90978b8829569513f94bbd474be28"
709 )),
710 c1: Bn254Fp(hex!(
711 "c7aac7c9ce0baeed8d06f6c3b40ef4547a4701bebc6ab8c2997b74cbe08aa814"
712 )),
713 },
714 Fp2 {
715 c0: Bn254Fp(hex!(
716 "ede9dc66d08acc5ff470a8bea389d6bba35e9eca1d7ff1db4caa96986d5b272a"
717 )),
718 c1: Bn254Fp(hex!(
719 "644c59b2b30c4db9ba6ecfd8c7ec007632e907950e904bb18f9bf034b611a428"
720 )),
721 },
722 Fp2 {
723 c0: Bn254Fp(hex!(
724 "7f65920905da7ba94f722c3454fb1ade89f5b67107a49d1d7d6a826aae72e91e"
725 )),
726 c1: Bn254Fp(hex!(
727 "c955c2707ee32157d136854130643254247725bbcd13b5d251abd4f86f54de10"
728 )),
729 },
730 Fp2 {
731 c0: Bn254Fp(hex!(
732 "334b0e4db7cfe47eba619f27942f07abe85869ea1de273306e1d7f9b1580231e"
733 )),
734 c1: Bn254Fp(hex!(
735 "f90461c2f140c2412c75fdaf405bd4099e94ab1ed5451ebb93c97cfed20a362c"
736 )),
737 },
738 ],
739 ];
740}