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

Method number_of_limbs_of_hashing_preimage

bitvm/src/chunk/elements.rs:94–104  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

92
93impl ElementType {
94 pub fn number_of_limbs_of_hashing_preimage(&self) -> usize {
95 match self {
96 ElementType::Fp6 => 6, // six coefficients of field element
97 ElementType::FieldElem => 0, // field element is not hashed, directly bit-comitted
98 ElementType::G1 => 2, // x, y co-ordinates
99 ElementType::ScalarElem => 0, // scalar element is not hashed, directly bit-comitted
100 ElementType::G2EvalPoint => 4 + 1, // t, Hash_partial_product
101 ElementType::G2EvalMul => 14 + 1, // partial_product, Hash_t
102 ElementType::G2Eval => 14 + 4, // t, partial_product
103 }
104 }
105}
106
107pub(crate) type HashBytes = [u8; 64];

Callers 1

hash_messagesFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected