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

Function chunk_dense_dense_mul

bitvm/src/chunk/taps_mul.rs:364–385  ·  view source on GitHub ↗
(
    a: ark_bn254::Fq6,
    b: ark_bn254::Fq6,
)

Source from the content-addressed store, hash-verified

362}
363
364pub(crate) fn chunk_dense_dense_mul(
365 a: ark_bn254::Fq6,
366 b: ark_bn254::Fq6,
367) -> (ark_bn254::Fq6, bool, Script, Vec<Hint>) {
368 let (amulb, input_is_valid, amulb_scr, amulb_hints) = utils_fq12_dd_mul(a, b);
369 let _hash_scr = script! {
370 {hash_messages(vec![ElementType::Fp6, ElementType::Fp6, ElementType::Fp6])}
371 };
372 let scr = script! {
373 // [hints, a, b, c] [chash, bhash, ahash]
374 { Fq6::check_validity() }
375 { Fq6::check_validity() }
376 { Fq6::check_validity() }
377 { Fq6::fromaltstack() }
378 { Fq6::fromaltstack() }
379 { Fq6::fromaltstack() }
380 {amulb_scr}
381 // [a, b, amulb, 0/1] [chash, bhash, ahash]
382 };
383
384 (amulb, input_is_valid, scr, amulb_hints)
385}
386
387#[cfg(test)]
388mod test {

Calls 1

utils_fq12_dd_mulFunction · 0.85