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

Function chunk_fq12_square

bitvm/src/chunk/taps_mul.rs:348–362  ·  view source on GitHub ↗
(a: ark_bn254::Fq6)

Source from the content-addressed store, hash-verified

346}
347
348pub(crate) fn chunk_fq12_square(a: ark_bn254::Fq6) -> (ark_bn254::Fq6, bool, Script, Vec<Hint>) {
349 let (asq, is_valid_input, asq_scr, asq_hints) = utils_fq12_square(a);
350 let _hash_scr = hash_messages(vec![ElementType::Fp6, ElementType::Fp6]);
351 let scr = script! {
352 // [hints, a, c] [chash, ahash]
353 { Fq6::check_validity() }
354 { Fq6::check_validity() }
355 { Fq6::fromaltstack() }
356 { Fq6::fromaltstack() }
357 {asq_scr}
358 // [a, asq, 0/1] [chash, ahash]
359 };
360
361 (asq, is_valid_input, scr, asq_hints)
362}
363
364pub(crate) fn chunk_dense_dense_mul(
365 a: ark_bn254::Fq6,

Callers 3

verify_pairing_scriptedFunction · 0.85
wrap_hint_squaringFunction · 0.85
test_chunk_hinted_squareFunction · 0.85

Calls 2

utils_fq12_squareFunction · 0.85
hash_messagesFunction · 0.85

Tested by 1

test_chunk_hinted_squareFunction · 0.68