MCPcopy Create free account
hub / github.com/docknetwork/crypto / get_values_to_commit

Method get_values_to_commit

saver/src/commitment.rs:94–105  ·  view source on GitHub ↗
(
        message: &G::ScalarField,
        blinding: &G::ScalarField,
        chunk_bit_size: u8,
    )

Source from the content-addressed store, hash-verified

92 }
93
94 fn get_values_to_commit(
95 message: &G::ScalarField,
96 blinding: &G::ScalarField,
97 chunk_bit_size: u8,
98 ) -> crate::Result<Vec<<G::ScalarField as PrimeField>::BigInt>> {
99 let mut decomposed = decompose(message, chunk_bit_size)?
100 .into_iter()
101 .map(|m| <G::ScalarField as PrimeField>::BigInt::from(m as u64))
102 .collect::<Vec<_>>();
103 decomposed.push(blinding.into_bigint());
104 Ok(decomposed)
105 }
106
107 fn commitment_key_for_radix_power_of_2(
108 g: G::Group,

Callers

nothing calls this directly

Calls 3

mapMethod · 0.80
decomposeFunction · 0.70
into_iterMethod · 0.45

Tested by

no test coverage detected