MCPcopy Create free account
hub / github.com/BitVM/BitVM / frob_q_power

Function frob_q_power

bitvm/src/chunk/taps_point_ops.rs:28–111  ·  view source on GitHub ↗

[q1, -q2, q3]

(q: ark_bn254::G2Affine, ate: i8)

Source from the content-addressed store, hash-verified

26
27// [q1, -q2, q3]
28pub(crate) fn frob_q_power(q: ark_bn254::G2Affine, ate: i8) -> ark_bn254::G2Affine {
29 let beta_12x = BigUint::from_str(
30 "21575463638280843010398324269430826099269044274347216827212613867836435027261",
31 )
32 .unwrap();
33 let beta_12y = BigUint::from_str(
34 "10307601595873709700152284273816112264069230130616436755625194854815875713954",
35 )
36 .unwrap();
37 let beta_12 = ark_bn254::Fq2::from_base_prime_field_elems([
38 ark_bn254::Fq::from(beta_12x.clone()),
39 ark_bn254::Fq::from(beta_12y.clone()),
40 ])
41 .unwrap();
42 let beta_13x = BigUint::from_str(
43 "2821565182194536844548159561693502659359617185244120367078079554186484126554",
44 )
45 .unwrap();
46 let beta_13y = BigUint::from_str(
47 "3505843767911556378687030309984248845540243509899259641013678093033130930403",
48 )
49 .unwrap();
50 let beta_13 = ark_bn254::Fq2::from_base_prime_field_elems([
51 ark_bn254::Fq::from(beta_13x.clone()),
52 ark_bn254::Fq::from(beta_13y.clone()),
53 ])
54 .unwrap();
55
56 let beta_22x = BigUint::from_str(
57 "21888242871839275220042445260109153167277707414472061641714758635765020556616",
58 )
59 .unwrap();
60 let beta_22y = BigUint::from_str("0").unwrap();
61 let beta_22 = ark_bn254::Fq2::from_base_prime_field_elems([
62 ark_bn254::Fq::from(beta_22x.clone()),
63 ark_bn254::Fq::from(beta_22y.clone()),
64 ])
65 .unwrap();
66
67 let beta_32x = BigUint::from_str(
68 "3772000881919853776433695186713858239009073593817195771773381919316419345261",
69 )
70 .unwrap();
71 let beta_32y = BigUint::from_str(
72 "2236595495967245188281701248203181795121068902605861227855261137820944008926",
73 )
74 .unwrap();
75 let beta_32 = ark_bn254::Fq2::from_base_prime_field_elems([
76 ark_bn254::Fq::from(beta_32x.clone()),
77 ark_bn254::Fq::from(beta_32y.clone()),
78 ])
79 .unwrap();
80
81 let beta_33x = BigUint::from_str(
82 "19066677689644738377698246183563772429336693972053703295610958340458742082029",
83 )
84 .unwrap();
85 let beta_33y = BigUint::from_str(

Callers 5

test_frobFunction · 0.85
verify_pairingFunction · 0.85
verify_pairing_scriptedFunction · 0.85

Calls 1

cloneMethod · 0.80

Tested by 2

test_frobFunction · 0.68