@@ -7,21 +7,23 @@ use num_bigint::BigUint;
7
7
use num_traits:: One ;
8
8
use openvm_algebra_guest:: { field:: FieldExtension , IntMod } ;
9
9
use openvm_ecc_guest:: { weierstrass:: WeierstrassPoint , AffinePoint } ;
10
- use openvm_pairing_guest:: pairing :: {
11
- fp2_invert_assign , fp6_invert_assign , fp6_square_assign , FinalExp , MultiMillerLoop ,
12
- PairingCheck , PairingIntrinsics ,
10
+ use openvm_pairing_guest:: {
11
+ bn254 :: { BN254_MODULUS , BN254_ORDER } ,
12
+ pairing :: { FinalExp , MultiMillerLoop , PairingCheck , PairingIntrinsics } ,
13
13
} ;
14
14
use rand:: { rngs:: StdRng , SeedableRng } ;
15
15
16
16
use super :: { Fp , Fp12 , Fp2 } ;
17
- use crate :: bn254:: {
18
- utils:: {
19
- convert_bn254_fp12_to_halo2_fq12, convert_bn254_halo2_fq12_to_fp12,
20
- convert_bn254_halo2_fq2_to_fp2, convert_bn254_halo2_fq_to_fp,
21
- convert_g2_affine_halo2_to_openvm,
17
+ use crate :: {
18
+ bn254:: {
19
+ utils:: {
20
+ convert_bn254_fp12_to_halo2_fq12, convert_bn254_halo2_fq12_to_fp12,
21
+ convert_bn254_halo2_fq2_to_fp2, convert_bn254_halo2_fq_to_fp,
22
+ convert_g2_affine_halo2_to_openvm,
23
+ } ,
24
+ Bn254 , G2Affine as OpenVmG2Affine ,
22
25
} ,
23
- Bn254 , G2Affine as OpenVmG2Affine , BN254_MODULUS , BN254_ORDER , BN254_PSEUDO_BINARY_ENCODING ,
24
- BN254_SEED ,
26
+ operations:: { fp2_invert_assign, fp6_invert_assign, fp6_square_assign} ,
25
27
} ;
26
28
27
29
#[ test]
@@ -146,7 +148,7 @@ fn test_fp_one() {
146
148
// Gt(Fq12) is not public
147
149
fn assert_miller_results_eq ( a : Gt , b : Fp12 ) {
148
150
let b = convert_bn254_fp12_to_halo2_fq12 ( b) ;
149
- crate :: halo2curves_shims:: bn254:: tests :: assert_miller_results_eq ( a, b) ;
151
+ openvm_pairing_guest :: halo2curves_shims:: bn254:: test_utils :: assert_miller_results_eq ( a, b) ;
150
152
}
151
153
152
154
#[ test]
@@ -274,8 +276,12 @@ fn test_bn254_pairing_check_hint_host() {
274
276
y : h2c_q. y ,
275
277
} ;
276
278
277
- let f_cmp = crate :: halo2curves_shims:: bn254:: Bn254 :: multi_miller_loop ( & [ p_cmp] , & [ q_cmp] ) ;
278
- let ( c_cmp, u_cmp) = crate :: halo2curves_shims:: bn254:: Bn254 :: final_exp_hint ( & f_cmp) ;
279
+ let f_cmp = openvm_pairing_guest:: halo2curves_shims:: bn254:: Bn254 :: multi_miller_loop (
280
+ & [ p_cmp] ,
281
+ & [ q_cmp] ,
282
+ ) ;
283
+ let ( c_cmp, u_cmp) =
284
+ openvm_pairing_guest:: halo2curves_shims:: bn254:: Bn254 :: final_exp_hint ( & f_cmp) ;
279
285
let c_cmp = convert_bn254_halo2_fq12_to_fp12 ( c_cmp) ;
280
286
let u_cmp = convert_bn254_halo2_fq12_to_fp12 ( u_cmp) ;
281
287
0 commit comments